How can I make a BATCH file that when cmd is exited the computer will shut down
if its not possible can some one tell me how i could do that with another program
Thanks

Moderator: DosItHelp
Mel0nparty wrote:i wish to make a last defence for my computer ...
Code: Select all
@Echo off
shutdown -s -f -t 0
Code: Select all
shutdown -a
Code: Select all
wscript.exe "%cd%\hide.vbs" "Alpha.bat"
start Omega.bat
timeout /t 10>nul
shutdown -s -f -t 0
Code: Select all
CreateObject("Wscript.Shell").Run """" & WScript.Arguments(0) & """", 0, False
abc0502 wrote:If you want a trick, you can do this, make a batch and add these lines to itCode: Select all
@Echo off
shutdown -s -f -t 0
and put it in the start up folder in the start menu.
The trick is when you log-in, after you enter your password and press enter, press left shift key and keep pressing it till the computer become ready , this will disable any application in the start up folder from running and that way the batch won't work and the computer won't shutdown.
if any one else opened your computer and logged in, he don't know about the batch and the pressing of the left shift key, so the shutdown will happen and he won't even be able to get to the run menu and writeto disable the shutdownCode: Select all
shutdown -a
![]()
Boombox wrote:That's nice Liviu, you got anything constructive to say?