svcName = InputBox("Service name", "Service Uninstall", "MyService") Set objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\cimv2") Set objService = objWMIService.ExecQuery("select * from Win32_BaseService where Name='" + svcName + "'") found = False For Each x in objService If x.Delete = 0 then MsgBox "Uninstall complete" found = True Next If Not found then MsgBox "Service not found"