Sign in to follow this  
Followers 0
SharpShooter

how to Uninstall a Service?

7 posts in this topic

hello

how do i uninstall a service?

i prefer simple ways...

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

hello

how do i uninstall a service?

i prefer simple ways...

An autoit service or another ? Posted Image

Otherwise you can stop it and disable it !

_StopService ( "Java Quick Starter" )
_SetServiceStartMode ( "Java Quick Starter", 4 )

Func _StartService ( $_ServiceName )
    RunWait ( @ComSpec & ' /c net start "' & $_ServiceName & '"', "", @SW_HIDE )
EndFunc ;==> _StartService ( )

Func _StopService ( $_ServiceName )
    RunWait ( @ComSpec & ' /c net stop "' & $_ServiceName & '"', "", @SW_HIDE )
EndFunc ;==> _StopService ( )

Func _SetServiceStartMode ( $_ServiceName, $_StartMode )
    If $_StartMode > 1 And $_StartMode < 5 Then _ ; 2 = auto , 3 = manual , 4 = disable
    RegWrite ( "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\" & $_ServiceName, "Start", "REG_DWORD", "0x0000000" & $_StartMode )
EndFunc ;==> _SetServiceStartMode ( )
Edited by wakillon

AutoIt 3.3.14.2 X86 - SciTE 3.6.0WIN 8.1 X64 - Other Example Scripts

Share this post


Link to post
Share on other sites

it's another service installed by some other program.

'll this code work for that?

i want to permanently suspend or uninstall a service.

Share this post


Link to post
Share on other sites

it's another service installed by some other program.

'll this code work for that?

i want to permanently suspend or uninstall a service.

yes you can find his name in windows service


AutoIt 3.3.14.2 X86 - SciTE 3.6.0WIN 8.1 X64 - Other Example Scripts

Share this post


Link to post
Share on other sites

Thanks, i have one more question.

what if i have to restore the uninstalled Service?

Share this post


Link to post
Share on other sites

Open CMD and type "sc /?"

You will see all the info you need.

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

Try:

RunWait(@COMSPEC & " /c sc delete 'service name'")

Or

RegEnum this HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services

there you can delete the service.

Reboot is required for the changes to take effect ;)

Edited by HavikTech

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0