-1

On my SBS 2011 I have a batch file called wakeup-nas.bat, with the following contents:

wol.exe 5475e0d59ffa

wol.exe is an executable for sending wake on lan packets. It is in the same directory as the batch file.

Strangely the command is only working when I write it directly in the command prompt. When I open the batch file nothing happens, although I see the output from wol.exe that the packet has successfully been sent.

I also have tried to open the batch file "as administrator" with no success either.

4
  • does it work if you specify the full path to it?
    – Petter H
    Aug 18, 2013 at 10:54
  • A couple of possibilities: Put a pause at the end off your batch file and let it hang there for a while. Does the command still fail? (Can you post the output?) Also, put a set at the beginning of the batch file and compare it with the output of set in a command prompt. There may be some context differences you can spot. Aug 18, 2013 at 11:08
  • Is WOL.exe in your path or the working directory of the batch file? I'm guessing not.
    – MDMarra
    Aug 18, 2013 at 14:30
  • wol.exe and the batch file are in the same directory
    – Alex
    Aug 18, 2013 at 15:45

2 Answers 2

2

Try putting the full path to wol.exe. Also try putting an echo statement on your batch file. That might help.

0

Hmmm. I don't really know why, but it's working now with the batch file too, even without "run as administrator". May have something to do with the network card drivers I updated yesterday.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .