SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
Starting and Stopping NT Services - Bug!

 
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite View previous topic
View next topic
Starting and Stopping NT Services - Bug!
Author Message
Martijn de Lange



Joined: 22 Nov 2000
Posts: 6

Post Starting and Stopping NT Services - Bug! Reply with quote

L.s.

On 12/8/2000 Shojaee asked a question about starting and stopping NT services. The sollutions SysOp gave didn't work. The only thing that worked is renaming the service you want to start and stop, to a name without spaces. This has to be done in the registry.

I have the same problem Shojaee has and it is true that 24 X 7 will not stop a service if there are any spaces in the name of that service.

For example. I want to stop and start exchange services. This has to be done to be able to automatically delete the exchange log files. One of the 9 services that must be stopped is "Microsoft Exchange System Attendant". 24 x 7 won't stop this service and will give you the error saying that there are not enough permissions or invalid service name. When I rename the service name in the registry of NT to "MicrosoftExchangeSystemAttendant" and run the job again, it stops the service.

When looking at examples for stopping and starting services, all services in the examples have names without spaces!

Same thing for starting services.

I think this is a bug in 24 x 7 scheduler. Will this be solved soon? It isn't a verry good idea to rename your services in the registry, because a lot of help pages (eg MS Technet) rever to the standard names of the services, not to the names you've entered in the registry.

Please take some time to solve the problem. When this option will work properly in 24 x 7 scheduler, there will be a lot more happy systemengineers all over the world. It gives us a lot more possibility's!

Thank you for your attention!

Kind regards,

Martijn de Lange

Tue Dec 19, 2000 6:38 am View user's profile Send private message
Jeremy



Joined: 06 Dec 2000
Posts: 17

Post Re: Starting and Stopping NT Services - Bug! Reply with quote

Actually, I've found that if you look up the executable name in the registry and use that instead, it works fine. For example, to start the "World Wide Web Publishing Service", I just start "ww3svc.exe" and it works fine. However, I agree that support for the service names with spaces should be included. This is just my workaround.

: L.s.

: On 12/8/2000 Shojaee asked a question about starting and stopping NT
: services. The sollutions SysOp gave didn't work. The only thing that
: worked is renaming the service you want to start and stop, to a name
: without spaces. This has to be done in the registry.

: I have the same problem Shojaee has and it is true that 24 X 7 will not stop
: a service if there are any spaces in the name of that service.

: For example. I want to stop and start exchange services. This has to be done
: to be able to automatically delete the exchange log files. One of the 9
: services that must be stopped is "Microsoft Exchange System
: Attendant". 24 x 7 won't stop this service and will give you the
: error saying that there are not enough permissions or invalid service
: name. When I rename the service name in the registry of NT to
: "MicrosoftExchangeSystemAttendant" and run the job again, it
: stops the service.

: When looking at examples for stopping and starting services, all services in
: the examples have names without spaces!

: Same thing for starting services.

: I think this is a bug in 24 x 7 scheduler. Will this be solved soon? It isn't
: a verry good idea to rename your services in the registry, because a lot
: of help pages (eg MS Technet) rever to the standard names of the services,
: not to the names you've entered in the registry.

: Please take some time to solve the problem. When this option will work
: properly in 24 x 7 scheduler, there will be a lot more happy
: systemengineers all over the world. It gives us a lot more possibility's!

: Thank you for your attention!

: Kind regards,

: Martijn de Lange

Tue Dec 19, 2000 6:49 am View user's profile Send private message
Martijn de Lange



Joined: 22 Nov 2000
Posts: 6

Post Re: Starting and Stopping NT Services - Bug! Reply with quote

Thank you for your reply! How should the script look like when I use the executables?

cheers!

: Actually, I've found that if you look up the executable name in the registry
: and use that instead, it works fine. For example, to start the "World
: Wide Web Publishing Service", I just start "ww3svc.exe" and
: it works fine. However, I agree that support for the service names with
: spaces should be included. This is just my workaround.

Tue Dec 19, 2000 7:03 am View user's profile Send private message
Jeremy



Joined: 06 Dec 2000
Posts: 17

Post Re: Starting and Stopping NT Services - Bug! Reply with quote

To start the services on a remote server using the resource kit util "NETSVC", I use the syntax of:

Dim process, number
run("netsvc w3svc /start \\\\servername", "", process)

For a local service,

Dim process, number
run("net start w3svc","",process)

I don't use the internal "ServiceStart" syntax due to its limitations.

: Thank you for your reply! How should the script look like when I use the
: executables?

: cheers!

Tue Dec 19, 2000 7:22 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7839

Post Re: Starting and Stopping NT Services - Bug! Reply with quote

Very nice tip! Thank you.

By the way, 24x7 converts calls to simple JAL service statements to more complicated calls to Windows system functions to stop/start the specified services. The service names specified in your JAL scripts are simply passed as parameters to these system functions. So, it is Windows that does not like spaces in names.

Alternatively can run DOS NET STOP [service name] command to stop a service
NET START [service name] can be used to start a service.

The difference is that in JAL you will get a trappable error if a service will not stop or start. In DOS you are limited to an output to display.

: Actually, I've found that if you look up the executable name in the registry
: and use that instead, it works fine. For example, to start the "World
: Wide Web Publishing Service", I just start "ww3svc.exe" and
: it works fine. However, I agree that support for the service names with
: spaces should be included. This is just my workaround.

Tue Dec 19, 2000 9:16 am 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.