NulisDefo
NulisDefo

Reputation: 335

Can i make batch unclosable

Ive been looking for answer to this question but so far unsucessfully. Can i somehow make it that after batch file is started it wouldnt close if you would press X button on top right (the exit button)? If yes, how to do that?

code for "fake virus"

@echo off
color 47
net stop themes >nul
title DEEP VIRAL INFECTION!
echo VIRAL INFECTION!!!
echo VIRAL INFECTION!!!
echo VIRAL INFECTION!!!
echo ERROR!!!
echo -
echo virus - TROJAN_DEMOLISHER code #45643676
echo -
echo FIREWALL - FAILED
echo -
echo ANTI-VIRUS - FAILED
echo -
echo IP ADDRESS BREACHED!
echo -
echo VIRUS ATTAINING: ****-****-****-8894
echo -

pause
cls
echo -
echo SCANNING INFECTED AREAS...
echo -

pause
title SCANNING INFECTED AREAS...
dir /s "C:\program files\"
dir /s "C:\program files\"
dir /s "C:\program files\"
dir /s "C:\program files\"
dir /s "C:\program files\"
:end
cls
title DEEP VIRAL INFECTION!
echo -
echo 86.5 PERCENT OF MEMORY INFECTED
echo -
echo INFECTION FATAL!
echo -
echo DELETION OF ENTIRE CONTENTS OF LOCAL DISK C: REQUIRED
echo -

pause
cls
echo -
title DELETING HARD-DRIVE C:
echo -
dir /s "C:\program files\"
dir /s "C:\program files\"
dir /s "C:\program files\"
dir /s "C:\program files\"
dir /s "C:\program files\"


cls
title DEEP VIRAL INFECTION!
echo -
echo CONTENTS OF HARD-DRIVE C: ERASED
echo -

pause
cls
echo -
echo SCANNING...
echo -

title SCANNING...
dir /s "C:\program files\"
dir /s "C:\program files\"
dir /s "C:\program files\"
dir /s "C:\program files\"
dir /s "C:\program files\"
:end1
cls
title DEEP VIRAL INFECTION!
echo -
echo 0.00 PERCENT OF HARD-DRIVE INFECTED
echo -
pause


echo ERROR
echo ERROR
echo ERROR
echo ERROR
echo ERROR
echo ERROR
echo ERROR
echo ERROR
echo ERROR
echo ERROR
echo ERROR
echo ERROR
echo ERROR
echo ERROR
echo ERROR
echo ERROR
echo ERROR
echo ERROR
echo ERROR

pause
cls
title SYSTEM FAILURE
color 17
echo ERROR!
echo -
echo VISUAL MEMORY LOST!
echo -
echo RAM LOST!
echo -
echo CORE PROCESSOR FAILING...
echo -
echo TOTAL SYSTEM CRASH IMMINENT!
echo -
echo -

pause
cls
echo -
echo -
echo -
echo SHUTDOWN COMPUTER NOW TO AVOID RISK OF FIRE!
echo -
echo -
echo -

pause
cls
echo -
echo -
echo -
echo SEEK PROFESSIONAL HELP IMMEDIATLY TO PREVENT FURTHER DAMAGE!
echo -
echo -
echo -
pause
start shutdown /s /t 60 /c "SYSTEM FAILURE<SHUTTING DOWN TO AVOID FURTHER DAMAGE!"  

multiple dir lines are to give the effect of smth actually happening

Upvotes: 0

Views: 12509

Answers (5)

user18731824
user18731824

Reputation:

Well instead of deleting task mgr you could just kill taskmgr and then rename it to say nottaskmgr.exe and after the prank thing is done just kill taskmgr and rename it back to taskmgr.exe

Upvotes: 0

Kaileau Ryan
Kaileau Ryan

Reputation: 1

Also, you were worried about losing the virus effect. Heres a way to make that not happen

  1. Make another Notepad document and put,

    start C:\Users\%username%\Documents\The_Name_Of_Virus

    start C:\Users\%username%\Documents\The_Name_Of_Virus

    start C:\Users\%username%\Documents\The_Name_Of_Virus

    start C:\Users\%username%\Documents\The_Name_Of_Virus

    start C:\Users\%username%\Documents\The_Name_Of_Virus

    pause

  2. Replace The_Name_Of_Virus with the file name of the batch file.

Doing that tells the computer to open the file 5 times. Then if someone closes one of them and it restarts the code, there are still 4 left that are still going. Making it run 5 batch files at the same time will slow your system down a bit. The %username% command uses the username so you do not need to replace %username% with your PC username.

Someone please correct me if I got anything wrong (I don't think I did). Also, I think you should only put 1 dir command in there because on computers with a lot of filled memory (like mine), it will take a long time to go through every file. I have about 400GB filled on my computer and it took 15mins just to finish the first block of dir commands.

Upvotes: 0

user10607692
user10607692

Reputation: 1

You could copy your .Bat file source and re-create it in a command prompt applications, this will require Visual Studio Community or better.

You can remove this windows Top-Bar utilities through the application frames Properties. (Use the property tab for this)

You could also make a simple prank virus using a regular windows form application by using the following code with a looped (copy 'n paste) prompt.

MessageBox.Show("message", title);

I hope this helped you.

Yours sincerely, OTA

Upvotes: -1

Kaileau Ryan
Kaileau Ryan

Reputation: 1

Instead of putting "pause" at the end of each speech part you can put

ping -n 2 localhost >nul

That gives it a small delay before moving on the next part. It basically just tells the system to ping itself and depending on your computer that will take a different amount of time. The 2 is telling the system to ping itself 2 times.

Upvotes: -1

Aacini
Aacini

Reputation: 67256

There is no way to avoid that the cmd.exe session be closed when the user press the X button, but your Batch file can start a second cmd.exe session via start command and restart it again as soon as it terminates. If the window size of both the initial and second cmd.exe sessions are adjusted properly, you will get the desired effect.

@echo off
if "%1" equ "Restarted" goto %1

:again
echo N|start "" /WAIT cmd.exe /C "%~F0" Restarted > NUL
goto :again

:Restarted
echo I am a virus!
:loop
echo You can't close me!
timeout /T 1 > NUL
goto loop

Upvotes: 3

Related Questions