Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a batch file I run that, among other things, reset's the NICs in the machine. I have some watchdog software running on another machine that monitors the first one. I'd like to run this batch file using PSExec when it detects certain types of failures. The problem I'm having is that since the batch file reset's the NIC's it kills the connection PSExec has (I'm OK with that). The real issue is that when PSExec dies the batch file stops running (leaving the NIC's disabled).

I've tried using the -i option with PSExec with no luck. Any ideas about basically just fire off the batch file and NOT have it stop when PSExec is disconnected?

share|improve this question
up vote 5 down vote accepted

And, as usually, I figure things out 10 minutes after asking the question. It turns out I had the parameters in the wrong order. Here's what worked:

psexec \\MyServer -i -d C:\Misc\ResetNICs.bat
share|improve this answer
Ha! I should have looked a little harder at what you were doing. It would have saved me 15 minutes worth of fixing something that wasn't broken. =) – Nathan Hartley Jul 17 '09 at 18:30

Use the START command to run things asynchronously. The trick here though, is that START can not be called directly through PSExec. Calling it through the command interpreter will get around this limitation. Like so...

psexec \\RemoteMachine cmd.exe /c start c:\test.bat

Or if you want more power, you could call psexec on the remote machine with the -d parameter, similar to the START command above.

share|improve this answer

How about using the SOON.exe from the Windows Resource kit to schedule the batch file in a few seconds.

share|improve this answer

the best way to do it is this:

PsExec.exe \\server -s -d  cmd /c \\servershared\shared\install.cmd

-s (run as system) -d (non interactive)

of course the remote machine have to had the c$ shared, and you need to be "domain admin"

of if you are not "domain admin" you can use the -u and -p params to pass your user and password, example:

PsExec.exe \\server -u user p password -d  cmd /c \\servershared\shared\install.cmd
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.