CMD Commander V3

19K2144

Intro: CMD Commander V3

If you're interested in coding or batch scripting, check out my latest Ible here.

I've read a few Instructables about playing with school computers in which people complain about how difficult it is to open Command Prompt. Yes, you can usually find a way past the school restrictions, or you can download Command Prompt Portable from portableapps.com, but I have a batch file that will do the exact same thing.

STEP 1: The Script

To make CMD Commander, Version 3 (so-named because it commands the Command Prompt program), simply copy/paste the following into NotePad:

@echo off
color 0a
:Input
title @ %CD%
echo.
set/p "command= +++> "
%command%
goto Input

Save as a batch file (CMD Commander.bat, All Program Files), and run it. You now have a portable Command Prompt that is only a few bites in size (miniscule)!

STEP 2: Commanding CMD

CMD Commander will allow you to do almost anything you can do with the real Command Prompt. Just type in a command and you can navigate directories, delete files, or shut down the computer without bypassing the computer's security. Just place it on your flash drive and it becomes completely portable (or simply memorize the basic code, and you can type it into NotepPad in about a minute). Unfortunately, you can't do anything with variables (attrib %CD% -h, echo %TIME%) because the command you give is stored in a variable, and a variable stored in a variable just gives the name. If you need to use a variable for something using CMD Commander, use the follwing script and enter "goto Extras" into the program.

@echo off
color 0a
:Input
title @ %CD%
echo.
set/p "command= +++> "
%command%
goto Input

:Extras
*YOUR COMMANDS HERE*
goto Input


******************************

El Mano:


How to hide Computer Files from the Tecnically Illiterate

Keep your Eyes working Great

This simple health switch will Keep you Warm

Wreak Havok with this simple Computer Virus


******************************

40 Comments

haha... nice way of thinking about it, but can't you just go to run and type 'cmd'????? it's so much easier than doing whatever you're doing. but, if what you mean by 'restrictions' is that you can't open command prompt, then forget whatever i said at the top. nice tutorial either way tho!
I agree with being confused with the purpose of the file.
You can, but I like to add my own touch to things. CMD Commander is also useful when manipulating files/folders, as you can just drag and drop the batch file into any file-to-be-changed, instead of "Run, CMD, cd C:\Documents and Settings\Me\etc."
what if you dont have notepad and the portable one is blocked too?
Well, then you better learn C++ real fast and write a program to do whatever you're trying to do, because the patron saint of batch scripters has decided that you're ugly! Ha ha ! Ha! Ha!..Thunk!.. "Ugh..." (gurgle) Sorry about that; I just hit my sarcasm streak over the head with a 9-Iron. Batch is a rather limited language, which I use for various tasks because it's easy and I couldn't find a C++ compiler that worked simply enough to keep me persevering in learning the language. Chances are that if your school computer has blocked NotePad, CMD, Run, and Command Prompt Portable, the process of unblocking said programs would involve some tedious research, some sneaky skullduggery, and a trip to the principal's office when your librarian (who is technologically advanced enough to affectively block the desired programs) notices your attempts to hack the system. You could try VBS or, if you have a lot of time on your hands, a home-made, compiled program (or a ready-made program off the web; if you do find one that works, I presume you'll share it with our class), or, unless you're trying to hack into the school administrator, you could just do your business on a computer that the school's evil net of restriction hasn't yet ensnared.
Hey, batch not a limited language. In fact it is still used today! (13 years after you wrote this comment) You should go and check out all of the cool batch programs that people have made over the years.
haha, lol'd at the beggining of your comment
Visual basic!! Super easy to make a notepad clone!
You just need a way to create text files and the ability to save them with the extension .bat
Simple, if you have a computer at home, type this up in notepad and save it on a thumbdrive! It's easy, just hide it deep in the thumb drive and if you make a shortcut, chance the icon and name. I have so much code on my thumbdrive it's not even funny!
why do you make the color 0a (greenish), not FFFFFF (white)?? just for the heck of it?
Just a color that he likes.
you could use any color you want, but FFFFFF wont wok, because its not a command color (from 01 to FE, you can't use same chars)
I like a bit of color. The standard white of CMD is rather boring, don't you think? I used bright blue (09) on version 2, but it was a little hard to see when sitting away from the screen. Light green is a nice, easy-to-see color, and it looks cool against the black. You can set it to any color; white on black, pink on grey, red on purple. I just like the green.
I like green because of The Matrix.
Why even make this if you can open CMD anytime anywhere?
Maybe I didn't do it right, but when I added "set CD=Hello", to the repeating part of the file, it just replaced the directory name with "Hello". Not very useful, unless you want to look innocent when the school librarian walks up behind you and asks what your doing. ("Oh, nothing, I'm just playing the Hello Game. I type in anything and try to get the screen to say something other than 'Hello'. There's a secret password that make the screen say 'You Win!', but I haven't found it yet.") Adding "set CD=" didn't do anything. You said it fixed a glitch: what glitch?
It didn't make a difference when I tried it. I don't see the point of trying to change the %CD% variable unless you are navigating directories. Then you can just type "cd *YOUR DIRECTORY HERE*"
More Comments