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 b开发者_Go百科e an HKLM-only setting, and I won't have access to this key under a limited user account.
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.
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.
精彩评论