In Windows, you have the option of running certain applications and certain commands by typing them in the Run dialog box but there is no option for users to add their own command. This tutorial teaches how you can make the Run dialog box to accept your commands and do what you want. This tutorial is for Windows XP. It should work for other windows also but I haven’t tested it.
More explanation of what Run do:
Hit Win + R and Run dialog box opens up (Alternatively you can select Start > Run) . Type in command and press enter. For example :
osk -> On-screen Keyboard
cmd -> Command Prompt
wmplayer -> Windows Media Player
sol -> Solitaire
Now if you type some other command that is unrecognized, it gives an error (The most obvious thing to tell)
How to make Run dialog box accepts your command?
You can call any file places in your C:\WINDOWS\system32 by directly typing the name of the executable file and with extension if it is not a executable file. We have two options with us now. Either we create batch files and place them in system32 folder and call them as name.bat (with extension) or we create executable files and place them in system32 folder and then call them by name (no need of specifying extension if it is a *.exe).
What it can do?
The limiting factor is you and the DOS itself i.e. What we want to do and can it be done through DOS. Not every program supports command line version (it canâ€™t be executed in the command prompt).
How to create batch files?
Open notepad and type in the commands.
From the File menu select Save as and there save it as name.bat and make sure Save as type is selected as All Files.
Example – Remove USB/Thumb/Pen drive
Make a batch file with the content
RunDll32.exe shell32.dll,Control_RunDLL hotplug.dll
save it as rpd.bat or whatever you want (whatever you can’t forget)
Place this batch file under C:\WINDOWS\system32\ and you can call this batch file by typing the name in Run dialog box.
For more examples, more help on batch files and link to online *.bat to *.exe convertor, following post is recommended: Creating Batch Files