Intro: Is CMD Blocked at Your School or Work? Here's How to Get Around That. Note: May Get You Expelled, Sacked or Both Depending on the Benevolence of the IT Specialist.
Note: I do not accept any responsibility from the use (or misuse) of CMD on any system at all. Just putting' that out there.
This time, we'll be using:
- Basic computer knowledge
- Coffee (Optional)
I hope this is informative. Enjoy.
Step 1: Step 1: Can You?
So when you try to open the humble Command Prompt, are you faced with something like the above? Does it abandon you to a Windows devoid of a CLI? If so, stay awhile and listen.
I'm running on the assumption that you can run batch files, even if the thing exits almost immediately. As a test, open notepad and type, on one line, the word "start" (Minus the quotation marks, of course).
Save it as a batch file (*.bat) and try to run it. If two windows pop up, then you're good to go.
Step 2: Step 2: Computing, Batch!
Continuing on, open up notepad (or any text editor). Optionally take a sip of coffee from an "IT is Love, IT is Life" mug, don your nerd-glasses and pull your pants up to your stomach. Here we go.
Step 3: Step 3: Gotta Do It Write
Now we are going to write the program. Type in (or copy, and save your fingers):
SET /P com=
- The "@echo off" line removes the C:\Users\Username\> bit at the start of the command, making it much easier and nicer to read.
- ":start" is a label. Labels are like checkpoints in batch files - you can run a command and go back to them.
- "SET /P com= " is what declares the variable "com". you can change "com" to whatever you want, but in the interests of simplicity keep it how it is. "SET", with the operator "/P" asks the user for input, which is set as the variable.
- "%com%" is how the file refers to the variable "com". Whenever you wish to call a variable in batch files, you must enclose it in percentage symbols.
- "pause" waits for the user to press a key before continuing. I'm using it here to make the outputs easier to read.
- Finally, "goto :start" sends the system back to the ":start" label to run from there again, looping the whole program until canceled.
Step 4: Step 4: Save That Batch
Simply save this file as a batch (*.bat) and run it. Now you have an emulator to run Command Prompt when it's blocked, anywhere, anytime. All you have to do now is run it.
If you've made it this far, I salute you for sticking with it. This was my first "instructable" and I hope it was useful.