Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Uninstall Windows Service VBScript
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
You can’t perform that action at this time.