Page 1 of 1

Depicus wake on lan batch file question

Posted: 05 May 2020 14:11
by Haris1977
Greetings

I ve downloaded depicus wake on lan file (https://www.depicus.com/wake-on-lan/wake-on-lan-cmd) and i ve created a bat file to wake on my server.

my bat file is this

echo on
WolCmd.exe [MAC ADR] [IP] 255.255.255.0 7
pause

When i double click it i get a window that says "press any key to continue". I do not want this message to appear (i want the window to disappear after 2-3 seconds). How could i do that?

Re: Depicus wake on lan batch file question

Posted: 05 May 2020 14:37
by elzooilogico
that's what pause command does, wait for user to press a key. simply change

Code: Select all

pause
to

Code: Select all

timeout /t 2
to wait two seconds

Re: Depicus wake on lan batch file question

Posted: 06 May 2020 03:26
by Haris1977
Thanks! That did the trick! :D

Re: Depicus wake on lan batch file question

Posted: 22 May 2020 17:23
by Samir
For older versions of windows that do not have timeout as a command, but do have a tcp/ip stack installed, I use the following for a timer:

Code: Select all

ping -n SECONDS 127.0.0.1 > NUL
where SECONDS is the number of seconds you want to pause.