views:

252

answers:

2

Can I start a service on remote machine using NSIS script. I know we can use:

sc \\machine start servicename

through DOS prompt. But can we do the same in NSIS? Can SimpleSC be used for this?

A: 

You could use exec.

ExecWait 'net start $servicename'

Edit: Oh, you meant starting the service on the remote machine...well:

ExecWait 'sc \\machine start servicename'
Bobby
Hey that was quick and it works perfectly fine. Thanks!!!
Pia
A: 

You could also use something like Service Hawk on the remote machine to montior and restart the service for you automatically.

ExtraLean