Service Desk Practitioners Forum
cancel

Restart Server service

Highlighted
Akies
Outstanding Contributor.

Restart Server service

Hi,

I want to restart "HP Openview service desk 4.5 server" service in services.msc through a batch file...How can I do the same?

Regards,
Akhil
7 REPLIES
Steve Burford
Respected Contributor.

Re: Restart Server service

Use the "net stop" and "net start" command to stop/start services
Akies
Outstanding Contributor.

Re: Restart Server service

Hi Steve,

Thanks for reply...Tell me "net start/stop" is the command for above mentioned service or for all services?
Steve Burford
Respected Contributor.

Re: Restart Server service

It is for all services. So you would use

net stop
net start

eg to stop print spooler service type...
net stop spooler

Not exactly sure what the hpsd service is called though. You will probably also need a sleep command in between stopping and starting the service to give it time to stop first.
Akies
Outstanding Contributor.

Re: Restart Server service

Great Steve..

It worked..Now how can I use sleep command in the same batch file?
Akies
Outstanding Contributor.

Re: Restart Server service

Hey Steve!!

Even if I simply use:

net stop XX
net start XX

in the batch file, it first stops and then starts..and this is what I wanted..Thanks..

Regards,
Akhil
Steve Burford
Respected Contributor.

Re: Restart Server service

Just for reference, sleep.exe is a little utility you can download from many places (just google it)

Usage: sleep
Akies
Outstanding Contributor.

Re: Restart Server service

Thanks again steve,

Hope I could give u more points..:-(

Regards,
Akhil