0

Custom run commands

As I mentioned in another post on keyboard shortcuts the windows run command can be summoned with Ctrl + R and can be really useful for opening applications easily (for a few examples). For the shortcuts listed that’s great but it does have limitations, for instance windows won’t open just any application in the way that it will open most office or system applications and opening a file that way means typing in the whole path and extension which is a bit clunky but we can make it better…

 

Adding to an Environment Variable

The simple way to do this is to add a folder to somewhere innocuous like your windows folder and call it say, _RunCommands, giving a full path of C:\Windows\_RunCommands.

– Press Win + pause/Break to bring up the system window
– Open the advanced system settings
– Go to the advanced tab and click on Environment Variables
– Edit the Path property and add your path, in versions of windows lower than 10 you should add:     ” ; C:\Windows\_RunCommands; “
– Save and you’re done

Now anything you put into your _RunCommands folder will be accessible from the run dialog so by dragging in a shortcut you can finally open Spotify from the run dialog

Editing the Path Environment Variable in Windows 10

Files:

If you have files that you’d like to open regularly then you can simply add a shortcut in the same way that you would do a program, be aware that putting actual files in this folder will mean that you will have to type in the full extension to open them. I keep my command list as a simple text file in a sub folder of _RunCommands and shortcut to it so that any time I add a new shortcut I add it to the file and I can remind myself what’s there by easily calling it by shortcut.

 

Getting really customised

I also have a few simple tasks which I like firing from the run command which can be taken care of by making shortcuts to .bat batch files, for example opening a few related folders and files for a task or copying specified files from one place to another to back up a folder but you can take this a step even further by putting in a shortcut to an application that accepts startup arguments. In another post I’ll go through how to set up a simple project in Visual Basic to do things which aren’t achievable with batch files but are still callable from the Run dialog like using office interop.

JBaker

Joi is an IT Development Analyst working in London and a consummate technophile. Whilst he isn't coding he can be found reacquainting himself with his guitars, spinning poi, looking for climbing walls or chasing the latest shiny thing to cross his field of vision.

Leave a Reply

Your email address will not be published. Required fields are marked *