SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
Service stop error

 
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite View previous topic
View next topic
Service stop error
Author Message
Don Rector



Joined: 08 Jun 2001
Posts: 10

Post Service stop error Reply with quote

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?

Mon Aug 06, 2001 4:48 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7948

Post Re: Service stop error Reply with quote

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?

Mon Aug 06, 2001 4:58 pm View user's profile Send private message
Display posts from previous:    
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite All times are GMT - 4 Hours
Page 1 of 1

 
Jump to: 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


 

 

Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Flowers Online.