Created
June 8, 2016 12:20
-
-
Save mayrund/1d317fb64cc882e45a1f3eea493113da to your computer and use it in GitHub Desktop.
Uninstall Windows Service VBScript
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
strComputer = "." | |
Set objWMIService = GetObject("winmgmts:" _ | |
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2") | |
Set colListOfServices = objWMIService.ExecQuery _ | |
("Select * from Win32_Service Where Name = 'Name_Of_Service_You_Want_To_Uninstall_Here'") | |
For Each objService in colListOfServices | |
objService.StopService() | |
objService.Delete() | |
Next |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment