Many advanced users use the keyboard to run applications or Windows tools, either through the Start menu or the Run dialog box by pressing Win+R. Both can open websites, run command line tools or open specific folder paths. While the Start Menu search box and the Run box are similar, the Run box is slightly more advanced with its previously used command history and browse box to find and launch specific programs. Run can also launch Control Panel applets with Control commands.
Something to make the Run box more efficient is shortening commands to make them quicker to type. Instead of typing a long command or path, type just a few letters that link to the command, otherwise known as an alias. Windows has a very basic alias function built in but it’s stored in the registry and not immediately obvious. The Run dialog checks this registry key so if you can add an alias to the it, the shortcut will work when you use Run. The registry key is:
There is also another similar key in HKEY_CURRENT_USER that affects just the logged in user but it’s rarely used. There will already be some aliases there and it’s possible to manually add your own but having a tool do it for you automatically would be easier and less problematic. Here we show you 3 ways to create a keyboard shortcut alias in the Run dialog box to make typing commands quicker.
Win+R Alias Manager is a small and portable tool of under 200KB that allows you to create alias shortcuts to your favorite programs. It uses the mentioned App Paths registry key to create new shortcuts to specific executables, along with a customized alias.
The “Work with system wide aliases” check box switches between current user and system wide aliases although the user list will probably be empty. The easiest way to create a new alias is by dropping an application shortcut onto the program window, this will popup the add new item box. All you have to do then is choose a new alias name and optionally check the system wide box.
If you prefer not to drop a shortcut onto the window, click the Add button, enter an alias, browse for the executable, optionally check the system wide box and click OK. Existing aliases can be edited or deleted although it’s advisable to leave entries that were already present as they will have been created by the specific software on install. The Windows 8 specific version in the Zip file requires .NET Framework version 4 so you don’t have to download and install 3.5.
As far as complexity goes, AddToRun is about as simple as it gets. It works by adding or deleting entries from the Add Paths registry key like Alias Manager. This tool is portable, open source and was programmed using the AutoIt scripting language, the source code is included in the archive.
In terms of usage, all you have to do is browse for and select the executable to launch with the alias, enter the alias name in the box and press Add. To remove an existing alias enter its name in the box and press Remove. It’s all pretty straightforward. The original program has spelling errors and poor text formatting so we’ve fixed a couple of things and recompiled it. The recompiled version will also now ask for administrator privileges on startup, before it silently failed if not run as admin.
Note: The method these 2 tools employ of adding aliases to the registry App Paths key does have limitations. They only accept a single executable with no arguments, so you cannot use command line tools or add extra arguments to any applications. If you want to do more than add simple application aliases use the desktop shortcut method below.
3. Create Your Own Alias Shortcuts
While the above methods rely on registry keys, there’s another way to add an alias to the Run dialog box. That is to create standard desktop shortcuts and then copy them to a location where they can be found by the Run box. This has a nice advantage of requiring no external tools and no registry editing.
In addition to the App Paths registry key, Run also looks at the folders in the PATH environment variables used by Windows. By default the Windows, System32, Powershell and Wbem folders are used system wide. For that reason the easiest solution is to place the shortcuts into the Windows folder. More advanced users can add a new folder to the PATH variable if they choose, and place the shortcuts there.
For this quick guide we’ll create a simple Run dialog alias shortcut to get your external IP address via the Command Prompt.
1. Right click on the desktop > New > Shortcut, enter the following command into the location box.
cmd /k nslookup myip.opendns.com resolver1.opendns.com &pause&exit
To break the command down, cmd /k opens a Command Prompt but does not close the window like running commands from the Run box normally does. The nslookup command uses the DNS service OpenDNS to resolve your external IP address. Pause and exit at the end are optional and give you the ability to close the Command Prompt window with any key.
2. Click Next and give the shortcut a name, this name will be the alias you type to run the command. For this example we will use MyIP. Click Finish.
3. This step is optional and only needed if the program you are launching has to run as administrator. Right click on the shortcut > Advanced, and check the Run as administrator box. Click OK twice.
4. Copy the shortcut to C:\Windows and click Continue if you are asked to provide administrator privileges.
5. Now test your alias, open the Run dialog and type myip. Command Prompt will open with the nslookup result. The non-authoritative address is your external IP address. Press any key to close the window.
It’s possible to create aliases for Windows tools and components, other command line tools (with cmd /k), open specific folders by using “Explorer [folder path]” or create an alias for any installed software. For example, with Google Chrome just right click on its Start menu or desktop shortcut and Send to > Desktop (create shortcut). Rename it to the alias and copy to C:\Windows.
This method actually has an added bonus because it will also work directly from the Start Menu. To run the example just click Start or press the Win key and type MyIP.
It also has another useful advantage which is you can force run an alias with administrator privileges if the box in step 3 wasn’t checked. Simply press Ctrl+Shift+Enter when launching the shortcut.