Configuring Microsoft Windows 7 to Open Files or Folder from Run Command Prompt

Run command prompt is a place from where users can initiate most system integrated programs. For example, if users want to open Notepad they just need to type ‘Notepad’ in the Run command prompt and press Enter key. As soon as the command is executed, Notepad.exe program that resides in C:\Windows folder gets initiated and the workspace of Notepad is displayed to the users.

Just like Notepad, there are many other applications can be initiated right from Run command prompt. However there are still some applications which cannot be initialized in the same way and users must follow the entire paths either to the executable files of the applications or their shortcuts in order to start them.

The reason why some applications can be initialized from the Run command prompt and others cannot is that the path to the applications that can be initialized from the Run command prompt is added in the Environment Variables of the Windows. On the other hand, the applications which cannot be initialized do not have their paths added into the Environment Variables. In order to allow these applications to get initialized from the Run command prompt, users must add their paths to the Environment Variables manually.

Understanding Environment Variables

Environment Variables is a place in Microsoft platform with the help of which many commands can be executed right from the Run command box. Examples of some variables are Temp, SystemRoot, SystemDrive, etc. These simple text words cannot be accepted by Windows as variables until they are wrapped up in the special character that helps Windows identify the typed texts as variables. The special character is percentage sign (%) which must be typed at the beginning and end of every variable. An example can be %systemroot%.

In Environment Variables box, two types of variables can be specified namely User Variables, which are user specific variables that are applied only to the users. The second types of variables are System Variables that are applied to the entire system globally. In order to specify system variables, a user must log on with the account that has administrative credentials whereas user variables can be configured by logging on to the user account for which the variables are to be specified.

Adding Path to System Variables

In order to add path to the system variables manually, administrators must follow the steps given below:

  1. Log on to the Windows 7 computer with administrator account.
  2. Navigate and locate the file or application, the path of which is to be added to the system environment variables.
  3. Once located, copy its path from the address bar.
  4. Once done, click Start and from the displayed menu right-click Computer.
  5. From the displayed context menu, click Properties.
  6. On the opened window, click Advanced system settings from the left bar.
  7. On System Properties box, make sure that Advanced tab is selected and click Environment Variables button available at the bottom of the tab.
  8. On the Environment Variables box, double-click Path variable from the list under System Variables section.
  9. On the opened Edit System Variable box, add another entry to the existing text string. To add another entry, type a semi-colon sign (;) at the end of the existing text string and paste the path of the application or the file that was copied in Step 3.

    Editing System Variables

  10. Once done, click OK button to close the box and close all the opened windows and boxes.
  11. Restart the computer to allow the changes to take effect.
Author: Vivek Nayyar

Works as Systems Admin in Siskin Technologies, India. Corporate trainer on Microsoft and Cisco platform. Specialized in Virtualization Technology. LAN Consultant for some local organizations.
»