Introduction: Command Programs
Hi instructable-maniacs. In this instructable I'll show you how to create some command-prompt programs (Windows) and update them. The programs will be created in command prompt and notepad. It's my first instructable, sorry for anything I don't write correctly (I am not English or American, either). Any comments and ratings will be accepted, bad or good. Also, I'd like to tell you that I'm building a program named Commander, which I'll upload later. Now, let's begin writing programs. For any questions email me to email@example.com
Step 1: Shutdown Me!
First, I'll show you a little trick when your start menu is frozen and you want to shutdown your computer. Follow the steps as shown:
1. Start Run (WindowsKey + r)
2. Write cmd
3. When the command prompt opens, write:
shutdown.exe -s -f -t 60 -c "Command by B@B@$tr00mf"
Then, a dialog will oen which says that your pc will shutdown in 60 seconds and a message Command by B@B@$tr00mf.
I will now explain what each thing does:
cmd=Starts the command prompt of windows
shutdown.exe=Begins the program shutdown.
-s = Sets the shutdown program to shutdown. (-r for restart, -l for log off)
-f = Forces all programs to shutdown.
-t xxx = Sets the time until shutdown, where xxx is time in seconds
-c "xxx" = This part is optional. It sets the pc to display a message, where xxx is your message.
To stop a shutdown, write shutdown -a.
The shutdown fuction is available in my program, Commander, too. This won't work in pcs with windows 2000 or earlier (i've just tried this =).
Step 2: Format a Disk!
Okay, let's say that you need to format a disk. These are the instructions. (In this sample, you format disk a:).
2.Write the code:
3.Save it as format.bat (In "file type" you select All Files and in "encoding" you select ANSI only!!!) Save it as anything you want as its extension is .bat
Now I'll explain what any part of the code does:
@echo off=This sets the pc to not show the commands.
format x:=This sets the pc to format the disk of your selection where x is the disk.
Step 3: Where Did I Put This? How to Create Virtual Disks.
Let's say you have a veeeeeeeeeeeeery big path for a file to find and you don't remember the path. You should first have created a virtual disk with this path. How to create one? The code is here.
1. Open Notepad.
2. Write the code:
subst x: "%systemroot%"
3. Save as virtual_disk.bat
I explained @echo off before, so now I'll explain only the second line.
subst x: =This creates a virtual disk in the selected letter, where x is the letter.
"xxxx"=This shows the path to be associated where xxx is the path. (%systemroot% means the Winows path).
Step 4: To Be Continued...
Sorry, but the instructable will be continued later... I have no time left. In the next version of this instructable there will be Commander 1.0 and 1.1 available for download, some more programs such as a calculator, a network messenger, a cmd game and much more! For any questions, just email me to firstname.lastname@example.org
We have a be nice policy.
Please be positive and constructive.