Question I cant get this BATCH FILE to work

May 12, 2019
3
0
10
0
i am trying to create a batch file that remote shutdowns a computer with as few lines of code as possible, why? cause why the hell not. anyways, this is what i have:

@Echo off
Echo -S (Shuts down computer) -R (Restarts computer)
Set /p option="Enter option here: "
Set /p IP="Enter IP here: "
Set /p Timer="Enter the amount of secounds before shutdown here: "
set /p comment="Enter a comment here (max amount of characters are 512): "
Shutdown -%option% -m \\%IP% -t %Timer% -c "%comment%"'



Whenever i run it, it goes perfeclty to the end, but when i get to the last line, it simply restarts, i honestly have no idea why it would do this..... Any tips?
 
May 12, 2019
3
0
10
0
this other wierd thing happened to me right now, i created a other batch file wich only had 2 lines of code,
Shutdown -I
Exit
when i ran this, i got an info message about the shutdown -i thing and than the third line from the other batch file (Set /p option="Enter option here: " ) started running, do you have any idea how this could have possibly happened? (i edit in notepad++)
 
Thread starter Similar threads Forum Replies Date
S Apps and Software 4
D Apps and Software 2

Similar threads


ASK THE COMMUNITY

TRENDING THREADS