Skip navigation

JSI Tip 4492. How can I eliminate the need to type the full path of an executable that is not in my path?


NOTE: See tip 8561 » How can I eliminate the need to type the full path of an executable that is not in my path?

The standard solutions to the above problem are:

1. Create and execute a shortcut.

2. Write a script.

3. Place the folder in your path.

4. Use Command Prompt Here.

Here is an alternate solution:

1. Use the Registry Editor to navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths.

2. Create a subkey with the name of the executable. Example: MyProgram.exe.

3. Create a Value Name with a null name ((Default) or <No Name>) and set the data type to Expandable String Value (REG_EXPAND_SZ).

4. Enter the full path to the executable as the data value.

NOTE: Look at HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\WRITE.EXE for an example.

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\WRITE.EXE
  Name:            
  Type:            REG_EXPAND_SZ
  Data:            "%ProgramFiles%\Windows NT\Accessories\WORDPAD.EXE"


Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish