tags:

views:

22

answers:

2

I want to install an EXE on a limited Windows account and be able to have it launched from other applications (probably using ShellExecute Windows API calls) without the caller knowing the full path to the folder where the EXE is installed. My only options seem to be modifying the PATH or adding an entry to HKLM (SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths).

Is there any other way to allow my EXE to be launched by filename alone (e.g. 'app.exe') or am I out of luck? The App Paths registry trick would be desirable but seems to be an HKLM-only setting, and I won't have access to this key under a limited user account.

A: 

The OS needs to know where the application is and there are only a limited number of ways of doing this:

  • Fully specify the executable path.
  • Include the folder on the search path.

So your options are limited.

ChrisF
@Piskvor - thanks. That's the second time in as many days I've done that.
ChrisF
+1  A: 

Some of the PortableApps.com applications (specifically Inkscape portable, but there may be others) seem to add items under HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths. You may want to try that.

Of course, that will only be available to the current user, not to all users on the machine, but I'm guessing that's not a problem in your scenario anyway.

Richard J Foster
I'll give HKCU\...\App Paths a try and report back.
Rob
Works a treat! Thanks.
Rob