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
Comments
18 responses to “How to create custom commands for Run dialog box in windows”
Nice article dude, what about such things in linux and ubuntu os.
@Abhishek
Thanks buddy.
Sorry I don’t use Linux for now. So no idea about that. May be in the coming weeks I can lay my hands on Ubuntu.
The other way is add application path to:
Control Panel – Properties – Advanced – Environment Variables – System Variables – Path.
[…] How to create custom commands for Run dialog box in windows […]
Nice tip, thanks for sharing 🙂
@Gadget
You are most welcome my friend. 🙂
explain more bout pen drive running custom command
where to write Remove USB/ Thumb/Pen……?
I just searched something like that. Thanks!
In linux /usr/bin is the main one, there are others but I wouldn’t go there.
@Ankit
I got you very clear in offline world. Didn’t I?
@James
I am not a linux user so don’t have any idea about that and I don’t understand what you meant to say.
HI
when I click on cmd – the run dialog box does not come up – it ask me with what program I want to open it pls help.
hey i have a batch file i am trying to create and im trying to hook up the batch file into the http://www.runescape.com data base so i can use coomands from the batch file and hack into the game the code is:
@echo off
color a
title Jimmy’s Elite Hacking System.
break=off
echo loading Jimmy’s Elite hacking system
ping localhost n-2>nul
cls
echo loading Jimmy’s Elite hacking system.
ping localhost n-2>nul
cls
echo loading Jimmy’s Elite hacking system..
ping localhost n-2>nul
cls
echo loading Jimmy’s Elite hacking system…
ping localhost n-2>nul
cls
echo loading Jimmy’s Elite hacking system….
ping localhost n-2>nul
cls
echo loading Jimmy’s Elite hacking system
ping localhost n-2>nul
cls
echo loading Jimmy’s Elite hacking system.
ping localhost n-2>nul
cls
echo loading Jimmy’s Elite hacking system..
ping localhost n-2>nul
cls
echo loading Jimmy’s Elite hacking system…
ping localhost n-2>nul
cls
echo loading Jimmy’s Elite hacking system….
ping localhost n-2>nul
cls
echo loading Jimmy’s Elite hacking system
ping localhost n-2>nul
cls
echo loading Jimmy’s Elite hacking system.
ping localhost n-2>nul
cls
echo loading Jimmy’s Elite hacking system..
ping localhost n-2>nul
cls
echo loading Jimmy’s Elite hacking system…
ping localhost n-2>nul
cls
echo loading Jimmy’s Elite hacking system….
ping localhost n-2>nul
cls
echo loading Jimmy’s Elite hacking system
ping localhost n-2>nul
cls
echo loading Jimmy’s Elite hacking system.
ping localhost n-2>nul
cls
echo loading Jimmy’s Elite hacking system..
ping localhost n-2>nul
cls
echo loading Jimmy’s Elite hacking system…
ping localhost n-2>nul
cls
echo loading Jimmy’s Elite hacking system….
ping localhost n-2>nul
cls
echo loading Jimmy’s Elite hacking system
ping localhost n-2>nul
cls
echo loading Jimmy’s Elite hacking system.
ping localhost n-2>nul
cls
echo loading Jimmy’s Elite hacking system..
ping localhost n-2>nul
cls
echo loading Jimmy’s Elite hacking system…
ping localhost n-2>nul
cls
echo loading Jimmy’s Elite hacking system….
ping localhost n-2>nul
cls
echo loading Jimmy’s Elite hacking system
ping localhost n-2>nul
cls
echo loading Jimmy’s Elite hacking system.
ping localhost n-2>nul
cls
echo loading Jimmy’s Elite hacking system..
ping localhost n-2>nul
cls
echo loading Jimmy’s Elite hacking system…
ping localhost n-2>nul
cls
echo loading Jimmy’s Elite hacking system….
ping localhost n-2>nul
cls
echo loading Jimmy’s Elite hacking system
ping localhost n-2>nul
cls
echo loading Jimmy’s Elite hacking system.
ping localhost n-2>nul
cls
echo loading Jimmy’s Elite hacking system..
ping localhost n-2>nul
cls
echo loading Jimmy’s Elite hacking system…
ping localhost n-2>nul
cls
echo loading Jimmy’s Elite hacking system….
ping localhost n-2>nul
cls
echo loading Jimmy’s Elite hacking system
ping localhost n-2>nul
cls
echo loading Jimmy’s Elite hacking system.
ping localhost n-2>nul
cls
echo loading Jimmy’s Elite hacking system..
ping localhost n-2>nul
cls
echo loading Jimmy’s Elite hacking system…
ping localhost n-2>nul
cls
echo loading Jimmy’s Elite hacking system….
ping localhost n-2>nul
cls
echo loading Jimmy’s Elite hacking system
ping localhost n-2>nul
cls
echo loading Jimmy’s Elite hacking system.
ping localhost n-2>nul
cls
echo loading Jimmy’s Elite hacking system..
ping localhost n-2>nul
cls
echo loading Jimmy’s Elite hacking system…
ping localhost n-2>nul
cls
echo loading Jimmy’s Elite hacking system….
ping localhost n-2>nul
cls
echo loading Jimmy’s Elite hacking system
ping localhost n-2>nul
cls
echo loading Jimmy’s Elite hacking system.
ping localhost n-2>nul
cls
echo loading Jimmy’s Elite hacking system..
ping localhost n-2>nul
cls
echo loading Jimmy’s Elite hacking system…
ping localhost n-2>nul
cls
echo loading Jimmy’s Elite hacking system….
ping localhost n-2>nul
cls
set/p inputs=Are you sure you want to use my Hack system regardless of the causes? Press the ENTER key to continue…
set/p inputs=Yes or No?
cls
echo loading please wait
ping localhost n-4>nul
cls
echo loading please wait.
ping localhost n-4>nul
cls
echo loading please wait..
ping localhost n-4>nul
cls
echo loading please wait…
ping localhost n-4>nul
cls
echo loading please wait….
ping localhost n-4>nul
cls
echo loading please wait
ping localhost n-4>nul
cls
echo loading please wait.
ping localhost n-4>nul
cls
echo loading please wait..
ping localhost n-4>nul
cls
echo loading please wait…
ping localhost n-4>nul
cls
echo loading please wait….
ping localhost n-4>nul
cls
echo loading please wait
ping localhost n-4>nul
cls
echo loading please wait..
ping localhost n-4>nul
cls
echo loading please wait…
ping localhost n-4>nul
cls
echo loading please wait….
ping localhost n-4>nul
cls
set/p inputs=Whos account would you like to hack?
cls
set/p inputs=Please re-type the Account name you wish to hack
cls
echo loading
ping localhost n-4>nul
cls
echo loading.
ping localhost n-4>nul
cls
echo loading..
ping localhost n-4>nul
cls
echo loading…
ping localhost n-4>nul
cls
echo loading….
ping localhost n-4>nul
cls
echo loading
ping localhost n-4>nul
cls
echo loading.
ping localhost n-4>nul
cls
echo loading..
ping localhost n-4>nul
cls
echo loading…
ping localhost n-4>nul
cls
echo loading….
ping localhost n-4>nul
cls
echo loading
ping localhost n-4>nul
cls
echo loading.
ping localhost n-4>nul
cls
echo loading..
ping localhost n-4>nul
cls
echo loading…
ping localhost n-4>nul
cls
echo loading….
ping localhost n-4>nul
cls
set/p inputs=Are you sure you want to hack this Runescape account? Press the enter key to continue…
cls
set/p inputs=Yes or No?
cls
echo loading
ping localhost n-4>nul
cls
echo loading.
ping localhost n-4>nul
cls
echo loading..
ping localhost n-4>nul
cls
echo loading…
ping localhost n-4>nul
cls
echo loading….
ping localhost n-4>nul
cls
set/p inputs=Hack confirmd please wait a couple seconds to see if that user is logged in.
cls
echo now scanning please wait
ping localhost n-4>nul
cls
echo now scanning please wait.
ping localhost n-4>nul
cls
echo now scanning please wait..
ping localhost n-4>nul
cls
echo now scanning please wait…
ping localhost n-4>nul
cls
echo now scanning please wait….
ping localhost n-4>nul
cls
echo now scanning please wait
ping localhost n-4>nul
cls
echo now scanning please wait
ping localhost n-4>nul
cls
echo now scanning please wait
ping localhost n-4>nul
cls
echo now scanning please wait.
ping localhost n-4>nul
cls
echo now scanning please wait..
ping localhost n-4>nul
cls
echo now scanning please wait…
ping localhost n-4>nul
cls
echo now scanning please wait….
ping localhost n-4>nul
cls
echo now scanning please wait
ping localhost n-4>nul
cls
echo now scanning please wait
ping localhost n-4>nul
cls
echo now scanning please wait
ping localhost n-4>nul
cls
echo now scanning please wait
ping localhost n-4>nul
cls
echo now scanning please wait.
ping localhost n-4>nul
cls
echo now scanning please wait..
ping localhost n-4>nul
cls
echo now scanning please wait…
ping localhost n-4>nul
cls
echo now scanning please wait….
ping localhost n-4>nul
cls
echo now scanning please wait
ping localhost n-4>nul
cls
echo now scanning please wait
ping localhost n-4>nul
cls
echo now scanning please wait
ping localhost n-4>nul
cls
echo now scanning please wait
ping localhost n-4>nul
cls
echo now scanning please wait.
ping localhost n-4>nul
cls
echo now scanning please wait..
ping localhost n-4>nul
cls
echo now scanning please wait…
ping localhost n-4>nul
cls
echo now scanning please wait….
ping localhost n-4>nul
cls
echo now scanning please wait
ping localhost n-4>nul
cls
set/p inputs=Please type in a new password for the user you just hacked. Please note that the password must be 4-16 characters long.
cls
set/p inputs=Please re-type your password.
SET *=account name:%runescape.com%
cls
set/p inputs=Before you confirm Are you sure you want to hack this account and save all changes? Press the enter key to continue…
set/p inputs=Yes or No?
set/p inputs=Hack confrimd the new password you requested has now been changed!
cls
set/p inputs=Thank-you for using “Jimmy’s Elite Hacking System”
cls
echo saving
ping localhost n-2>nul
cls
echo saving.
ping localhost n-2>nul
cls
echo saving..
ping localhost n-2>nul
cls
echo saving…
ping localhost n-2>nul
cls
echo saving….
ping localhost n-2>nul
cls
echo saving
ping localhost n-2>nul
cls
echo saving
ping localhost n-2>nul
cls
echo saving
ping localhost n-2>nul
cls
echo saving
ping localhost n-2>nul
cls
echo saving
ping localhost n-2>nul
cls
echo saving
ping localhost n-2>nul
cls
echo saving
ping localhost n-2>nul
cls
echo saving
ping localhost n-2>nul
cls
echo saving
ping localhost n-2>nul
cls
echo saving
ping localhost n-2>nul
cls
set/p inputs=Changes saved!
cls
EXIT
just copy and paste this and copy it on to your guys note-pad
@Dalene
Hi!
You can start “Run” and then type in CMD or alternatively you can go to Start > Programs > Accessories > Command Prompt.
@Jack
I didn’t get your point.
Hello Everyone,
I want to achieve RUN DIALOG BOX functinality in excel sheet.
i.e. the way we locate our file in RUN DIALOG box , in excel sheet in a particular cell if i write D:\ then a list box should appear showing all files and directories in D drive.
Please give your valuable suggestion on how to implement such in excel sheet and thanks in advance.
Sounds good.
Let me know how to setup a shutdown / turnoff bat file.
tnx buddy,
thats cute,
but explain how to run an application without using notepad and creating batch files.
cute? ahem..
To run an application without using notepad and creating batch files, then just enter the direct path of the application executable in Run (Win + R).
[…] You can also make a custom command which you can type in Run (Win + R) to execute the batch file. Read Creating Custom Run Commands. […]