SharpShooter Posted September 11, 2010 Posted September 11, 2010 hello how do i uninstall a service? i prefer simple ways...
wakillon Posted September 11, 2010 Posted September 11, 2010 (edited) hello how do i uninstall a service? i prefer simple ways... An autoit service or another ? 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 September 11, 2010 by wakillon AutoIt 3.3.18.0 X86 - SciTE 5.5.7 - WIN 11 24H2 X64 - Other Examples Scripts
SharpShooter Posted September 11, 2010 Author Posted September 11, 2010 it's another service installed by some other program. 'll this code work for that? i want to permanently suspend or uninstall a service.
wakillon Posted September 11, 2010 Posted September 11, 2010 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.18.0 X86 - SciTE 5.5.7 - WIN 11 24H2 X64 - Other Examples Scripts
SharpShooter Posted September 11, 2010 Author Posted September 11, 2010 Thanks, i have one more question. what if i have to restore the uninstalled Service?
Juvigy Posted September 13, 2010 Posted September 13, 2010 Open CMD and type "sc /?" You will see all the info you need.
HavikTech Posted September 13, 2010 Posted September 13, 2010 (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 September 13, 2010 by HavikTech
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now