How to create custom Run commands in Windows
Posted on September 14, 2009 at 5:35 am
If you’ve ever used the Run command box in Windows, you probably know you can type certain predefined commands to open programs, etc. For example, if you type “notepad” in the Run box, it’ll open Notepad in Windows.
If you type “cmd” in the Run box, it opens the command prompt. If you type “regedit”, it open the registry editor. So on and so forth. Wouldn’t it be cool if you could create your own predefined Run commands?
For example, let’s say I wanted to open a particular program when I typed in my name, Aseem, into the Run box? Right now if you type your name, you’ll probably get an error like the following:
Whoops! Well, with a few simple registry hacks, we can create our own custom run commands to launch whatever program or file we like. Here’s how.
1. Open the registry editor by going to Start, Run and typing in regedit.
2. Now navigate to the following registry key:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths
3. Now right-click on App Paths and choose New and then Key.
4. Now give the key any name that you want, such as your name or whatever else you like. This will be what you type in the Run box later to launch the custom program. Just make sure that it has a .EXE at the end of the name.
5. Now in the right hand side, you’ll see a Default registry key (string value). Right-click on that and choose Modify. Enter the path to the file that you want to launch.
6. Click OK and then right-click in the white space and choose New – String Value.
7. Name the key Path and the value should be set to the path of the containing folder of the file you just set on the last key. So in my case, it would be F:\My Documents\GotSent\.
That’s it! Now you can go to Start, Run and type in the name you set for the new key in App Paths and your program will launch! For me, I will type “aseem” and GotSent will load up.
Note that you are not just limited to EXE files, you can point to any file type you like: PDF, DOC, AVI, MP3, etc, etc. That means you can create your own shortcuts to documents, videos, audio files, or programs! Enjoy!
» Filed Under Computer Tips
Related Posts
- How to turn on auto-complete in the command prompt
- How to change the default location for installing applications in Windows
- Change the location of the My Pictures folder
- Copy File Names from Windows Explorer to a Text List
- How to open multiple programs in Windows at once
There is a easier way to do this. Just creat a shortcut in the windows directory tot the file u want to open.
Very cool.I just found your website and thought that it is really handy and resourceful.
This is pretty good hack. Seems like launchy killer trick for me.
Wow! Thanks a lot! I was able to create a custom run command to load up a custom app that I wrote. But the best part is that I also setup a scheduled task to run and used the custom run command, which was a lot easier.
Hello. I made a bat file with your trick and it came out perfect. Thank you!