Depicus wake on lan batch file question

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
Haris1977
Posts: 16
Joined: 23 Sep 2014 03:48

Depicus wake on lan batch file question

#1 Post by Haris1977 » 05 May 2020 14:11

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?

elzooilogico
Posts: 128
Joined: 23 May 2016 15:39
Location: Spain

Re: Depicus wake on lan batch file question

#2 Post by elzooilogico » 05 May 2020 14:37

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

Haris1977
Posts: 16
Joined: 23 Sep 2014 03:48

Re: Depicus wake on lan batch file question

#3 Post by Haris1977 » 06 May 2020 03:26

Thanks! That did the trick! :D

Samir
Posts: 384
Joined: 16 Jul 2013 12:00
Location: HSV
Contact:

Re: Depicus wake on lan batch file question

#4 Post by Samir » 22 May 2020 17:23

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.

Post Reply