Ok, I just tried that and now I am getting another error. I went back and referenced where I found this code and it was pulled out of a larger script. There was lots more going on prior to this part and other variables set prior to this. I don't think i can use this.
It was pulled from this...
I get a line 9 char 58 Unterminated string constant error. Is this valid?
Option explicit
dim strServiceName
strServiceName = "Service Name"
Set colServiceList = objServices.ExecQuery("Select * From
Win32_Service Where Name='" & _
strServiceName & "'")
'Error check
If (Err.Number = 0) And...
This is what I found on another board. It is reported to work. I have not been able to get it to work. Can i just tweak this one to launch an .exe if WMI_Service_Exists= False?
Set colServiceList = objServices.ExecQuery("Select * From
Win32_Service Where Name='" & _
strServiceName & "'")...
I have looked for a couple of days now and I am still not able to borrow enough code and piece it together to work. I am a beginner when it comes to trying to write this stuff. I have looked through this site as well as others including the purchase of a few books to help. I still can't get it...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.