Most likely "IBM MQSeries" is not the true service name. It is just the service display name. Not all services have the same name in the system registry and for display. To find out the correct service name use the registry editor and look up keys under "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services". note that service display name is a value under the service name key. I think that "net stop" command searches both name types while 24x7 simply makes a system call to the Windows service control manager passing the name you specified as a parameter. It is the Windows service control manager that returns the error. : I can use ServiceGetStatus( "servicename", servtest ) and : ServiceStop( "servicename" ) as long as the service name does : NOT have any spaces in the name. I have a service called "IBM : MQSeries" that contains a space. The status is "ERROR" for : ServiceGetStatus if I try any of the following: ServiceGetStatus( : "IBM MQSeries", servtest) : ServiceGetStatus( "\"IBM MQSeries\"", servtest) : or : Set servname, "\"IBM MQSeries\"" : ServiceGetStatus( servname, servtest ) : I can stop the service with: RunAndWait( "net stop \"IBM : MQSeries\"", "", vtimeout, returnvar ) : Why do all of the ServiceGetStatus commands result in "ERROR" : instead of returning the status of the service?
|