Main Menu

Wake on Lan Questions

Started by Jeff Zylstra, June 21, 2011, 12:30:07 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Jeff Zylstra

No, it didn't work, unfortunately.  I got in this morning and had 1 workstation that had "trust issues" and wouldn't speak to the domain controller.  I couldn't get a hold of Dr. Phil, so I had to un-join and re-join the computer to the domain to get it running again. 

I don't know if my batch file was executed or not.  I run it as a scheduled task on the server, so I'll have to check if it ran this morning or not.  None of the machines were on, not even the XP machines, so I'm assuming that it didn't run for some reason since the XP machines will usually wake up from that batch file. 
"We hang the petty thieves, and appoint the great ones to public office"  -  Aesop

Alice

Jeff - put a pause at the end of your batch file so the window doesn't close. You'll be able to see any errors during execution.

Jeff Zylstra

Thank you, Alice, I'll do that! 
"We hang the petty thieves, and appoint the great ones to public office"  -  Aesop

Mark

+1 for Alice!  @pause is a great idea for this situation.
Mark Piontek, MBA
Director of Information Systems
BS in Information Systems Security

Alice

you're welcome  :)  It's how I test them to make sure they work. Scheduled Tasks will run them even if they are broken. All it cares about is that it kicked it off.
Hope it works for you Jeff!

Jeff Zylstra

Well, I shut down one Windows 7 machine and was successful in getting it to wake up from the command line using the same WOL.EXE utility that is in the batch file.  I just have to figure out now why it didn't work from the batch file, since windows task manager says that it executed successfully this morning.  I'll have to try to execute it using the "run now" command from the task manager along with the pause command in my script.  Success is only a moment away!
"We hang the petty thieves, and appoint the great ones to public office"  -  Aesop

Jeff Zylstra

#21
I finally got it to work, but it took a couple of tricks to get it to function properly. 

For some reason I had to change the task scheduler option to "run only when user is logged on".  For some reason it would absolutely not work with the "run whether user is logged on or not" option.

I also had to fake out the network because only the first machine would wake up, and the rest of the packets were getting lost or ignored.   I used a simple trick to cause a time delay between each command.  Here's the code:


REM faxserver.dza.com             
mc-wol.exe 00:13:78:A4:46:AE
PING 1.1.1.1 -n 1 -w 5000 >NUL


Pinging the non-existing IP address acts like a timer with a 5 second timeout before moving on to the next command.  This is enough time for my network to allow the next transmission of the wake up packets.  Seems to work well now, and my machines now wake up early for their weekly bath and virus cleaning scans.
"We hang the petty thieves, and appoint the great ones to public office"  -  Aesop

Mark

Excellent!  You could probably have just pinged an existing IP all the same, but yes, this is an old trick.  Odd that it works that way for you --  I have a master script to wake all my machines and don't have a delay in there anywhere.  There is always something different between networks though.

Glad you got it figured out.
Mark Piontek, MBA
Director of Information Systems
BS in Information Systems Security

Jeff Zylstra

Thanks, Mark.  It's a great benefit to both me and my users to not have to run virus scans during working hours.  I don't know who's "law" it is, but it always seems that the available computer resources can always be consumed by the program or utility to be run.  If that "law" hasn't been written yet, I'm laying claim to it!  ;)
"We hang the petty thieves, and appoint the great ones to public office"  -  Aesop