Forcing a remote service to restart.

Cat

Golden Member
Oct 10, 1999
1,059
0
0
Is there a way, via the command line, to force a service on a remote machine to restart? This service is Mental Ray, if anyone's interested. If you terminate a distributed render, the clients don't respond again until the service is stopped and then started. I have access to all the machines. They're all in the same workgroup, but some are running XP, and some are running 2K.
 

spyordie007

Diamond Member
May 28, 2001
6,229
0
0
sc \\computername stop servicename
sc \\computername start servicename

sc can be found on the resource CD (may be the Win2K CD, but I think it's the resource CD)

-Spy
 

spyordie007

Diamond Member
May 28, 2001
6,229
0
0
or you could connect to the services MMC if you dont mind the GUI, but I only mentioned SC because it's a command line application that will do what you are looking for.
 

Cat

Golden Member
Oct 10, 1999
1,059
0
0
Yes, I'd like to do this programmatically. I'm going to write a GUI front-end for the artists to use. A CLI based method is a hack, but it's quick for now. I'll look into the Platform SDK docs later. Thanks a bunch!
 

spyordie007

Diamond Member
May 28, 2001
6,229
0
0
You wouldnt really need much of a GUI for this. A quick, dirty, easy batch file could take care of it easily enough :D

"If you terminate a distributed render than just double click on this, no options neccisary just let it run"

Yes a GUI would be "pretty", but I'm a big fan of simple and easy ;)

-Spy
 

Cat

Golden Member
Oct 10, 1999
1,059
0
0
Whoops, wasn't more specific. This will let them restart on multiple machines, select those they want to use for the current network render, and a whole bunch of other command line options that are specific to Mental Ray. The standalone client is command line only, and there are a crapload of options. I'm just going to make it easy for them to do the whole thing. Then it's off to write my next engine. I'm no Carmack, but at least I get paid to pretend. :)