Introduction: Make a DOS Command

Picture of Make a DOS Command

Many people think that DOS is outdated, but I don't think so. You can do many things with DOS,and even Eric Wilhelm uses it! (See here) Some of the things you can do with DOS include giving yourself access to important files (good for hacking), deleting things, backing up things, showing all the files and folders in a folder, making simple but harmful viruses, and reformatting hard drives (!!). Unfortunately, when you want to run a program you made, you must type in the location if you want other information to be passed on to it. This instructable will teach you how to essentially make a command so you don't have to do this.

Step 1: Making the Program

Start by making a DOS executable. A DOS executable is a program that is run through CMD. These files can have six extensions: .exe, .com, .bat or .cmd .vbs or .vbe. Note that that you can use things passed into the program with %1, %2, %3 and so on.

When you have the program ready, rename it to the command you want, followed by its extension. Note that the command cannot contain spaces.

When ready, continue to step two.

Step 2: Transform It Into a Command

Picture of Transform It Into a Command

This is what turns it into a command. Copy the file into C:\WINDOWS\system32\. That is all you need to do. To test it, open cmd by typing "cmd" into start>Run and hitting enter. Test your command. Just type the name of the file, no extension. For example, if you want to go to instructables, just copy the attached file into C:\WINDOWS\system32, and then type "instructables" in cmd.

Note-The picture is making the icon for the program, which I did in .IcoFX

Step 3: How It Works

Picture of How It Works

Press the windows button and pause/break on your keyboard. It will bring up a dialog called System Properties. Click the advanced tab. At the bottom, click environment variables. In the lower group box, scroll down to Path and PATHEXT. You will notice that the first thing in Path is C:\WINDOWS\system32. That is the directory that you put your command file in. Whenever you type in the command, it looks there for that file. In the PATHEXT variable, you will see the six main extensions you can use for your file, along with some others. If the file is in a directory that it is in the path variable, then you won't have to type a location. If its extension is in the PATHEXT variable, you won't have to type its extension. You will also notice that in C:\WINDOWS\system32, there are files like help.exe, xcopy.exe, and other DOS commands. They are being run the same way your command is run. You can prove this by opening CMD and typing your command. It will work. Then type "path ;" and hit enter. That will clear the path and make CMD look only in the current directory. Then, do CD and then another directory that is not C:\WINDOWS\system32. Now try your command again. It will not work. If you try a random DOS command, it might not work. For example, xcopy, help, attrib, cacls, chkdsk and taskkill will all not work anymore. That is because the path is cleared! This also means that if your program is in "C:\I am puffyfluff", then you could just add ;C:\I am puffyfluff to the end of the path variable, and you wouldn't have to copy it to C:\WINDOWS\system32.

Now you know how to make your own command!


microchip55 (author)2009-11-05

you have to have admin permissions to though! is there a way without being a admin or making you on in cmd?

puffyfluff (author)microchip552009-12-27

Yes, that's true, you need admin powers to access system32.  Of course, you can always just change the admin password using DOS...but that's probably something you shouldn't do.

chriskarr (author)puffyfluff2010-01-12

Another method of accessing System32 is using Linux on an external drive and connecting it to the Windows box. You have full access to all of the system's files and the system administrator can do nothing about it! My friend, Tyler, does this and deletes system32 or renames it to profane names or things which are memes.

microchip55 (author)chriskarr2010-01-16

but HOW would you do that?

chriskarr (author)microchip552010-01-17

You would go about doing this by installing a linux partition on a USB hard disk, inserting the hard disk and, when the "select bootable hard disk' message appears, choose your removable disk. The computer will boot off of your disk and the entire hard disk of the system will be easily manipulated without restriction.

Linux is an interesting OS. When you're using it on a harddrive also containing Windows, it says, "You know what? Go ahead and f*** this OS up; it's not me, so I don't care."
When you try to access files in a Linux partition from a Windows partition or a different Linux partition, the one which you're trying to access says, "What do you think you're doing? These are mine, and I won't let you see them, a$$h***!"
When you try to access the system files in a Linux OS which you own, it says, "Ummm...You need Root-Access to view these. Wait, what do you say? You have Root-Access? Well, I don't give a d***. If you want me dead, you'll have to do it my way."

Doing anything to or from Windows OS', Windows says, "Can I help you with this? Perhaps I can bend over a little further."

/me is visualizing the paperclip in Microsoft Office bending over past its elastic limit.

gryffn (author)2010-01-09

 i got to system 32 with run.exe

raaams (author)2009-01-15


puffyfluff (author)raaams2009-01-15

Was that meant to be funny? If it was, it's just because I have a very bad sense of humor.

ranumm (author)2008-07-20


puffyfluff (author)ranumm2008-07-21

What's powershell?

ranumm (author)puffyfluff2008-07-22

PowerShell is a new Command shell replacement for Windows. Object driven, and expandable using .NET Quite frankly it rocks. (let the windows bashing begin...)

puffyfluff (author)ranumm2008-07-25

Wow... I'll have to look in to that...

iRule (author)puffyfluff2008-12-20

vb is very good to .. it uses .NET if your using the program thing

puffyfluff (author)iRule2008-12-20

Yeah, I use a lot of VB myself.

iRule (author)puffyfluff2008-12-20

cool .. lol its very good.

puffyfluff (author)iRule2008-12-20

Yeah, especially for prank error messages :-)

ranumm (author)puffyfluff2008-12-20

VB is ok, but if your serious about .NET, consider C#. Functionally, there is little that C# can do that VB cannot, but...C# is slightly more powerful, and much more consistent. Also, very much in demand right now...

iRule (author)ranumm2008-12-20

i have the thing with vb, C,C++,dll, and all the others built into that program thing that makes it easier to write em.

puffyfluff (author)iRule2008-12-20

I do everything in C++ now, whether it's console or GUI.

iRule (author)puffyfluff2008-12-20

im no good at c++ so i dont try lol

puffyfluff (author)iRule2008-12-20


iRule (author)puffyfluff2008-12-20

lol yer .. lol .. gone way off subject

puffyfluff (author)iRule2008-12-20

Who cares.

iRule (author)puffyfluff2008-12-20

while we off subject have you got any ideas for a batch or vbs or thing .. i ran out of ideas

puffyfluff (author)iRule2008-12-20

I have too, I've made so many.

puffyfluff (author)puffyfluff2008-12-20

Followed by shutdowns.

AndyGadget (author)2008-06-06

My first IBM compatible computer was an XT, with, if I recall correctly, a 4MHz clock speed and 256KB of RAM (that's Kilobyte, not Megabyte). CPUs are now pushing 4GHz - That's a thousand times faster (and much more efficient). I've absorbed new knowledge over the years as each new generation of processors and software came along, and really don't envy anyone trying to get into the technical side of computing from scratch now. There is just SO MUCH to learn - including neat little tricks like this. It may have been the ONLY operating system on the early machines, but DOS still has much to offer. *3 yorkshiremen mode ON* You've got it easy today. When I was a lad we didn't have ones and zeroes. We had to make do with 'I's and 'O's. And even the 'I's were a bit iffy. Kids today . . . don't know they're born. *3 yorkshiremen mode OFF*

puffyfluff (author)AndyGadget2008-06-08

I guess we do have it easy. Three yorkshiremen, though...

GorillazMiko (author)2008-06-05

What's a DOS command? Sure, I am stupid for viewing the Instructable and not knowing what it was, that's why I asked.

puffyfluff (author)GorillazMiko2008-06-05

A DOS command is something that you type into CMD and hit enter, and it does something. Like, if you open CMD and type "help and then hit enter, it will give you a list of other common DOS commands. They are just like geeky shortcuts to run files.

Brennn10 (author)puffyfluff2008-06-07

You can make it be matrix colored like in my instructable!

puffyfluff (author)Brennn102008-06-08

Yes. You can use "color a" or "color 2" (brighter), and it will change the color.

PKM (author)2008-06-06

I was all set for this to be more lame script kiddie stuff.. and then it turns out to be something hella useful I didn't know you could do. Shows how much I know :)

puffyfluff (author)PKM2008-06-06


Mr. Rig It (author)2008-06-05

Who the heck is Eric Wilhelm?!?!?!? J/K :-)

puffyfluff (author)Mr. Rig It2008-06-05

The founder and CEO of Instructables.

Rig it was joking, nice one on this, I have dabbled in DOS but could never be bothered with the whole repeating things over an over typing crap out the long way...

That's what I thought... The same problem happened to me. That's why I decided to find out how to make my own.

Well nice one... handy little trick...


Mr. Rig It (author)puffyfluff2008-06-05


About This Instructable




Bio: I live in Estes Park, Colorado. I like anything to do with science and I do a lot of sciency things.
More by puffyfluff:Alarm ClocksGrilled PeachesMake a DOS Command
Add instructable to: