Scenario
I would like to install an x86 CommandLine application on a folder outside C:\Windows\System32
or C:\Windows\Syswow64
and still be able to access my app under CMD without adding my application's path inside the PATH
environment variable.
Question
Is this possible to do? Maybe touching a needed registry keys?
Note: I know how to add my application into PATH
variable/regvalue or how to access my application from CMD putting the required .exe in the System32
/SysWow64
folder. This question is only to learn alternatives, it's not to solve issues with PATH
or System dirs.
Code
I've tried this suggested approach from a comment of @Sertac Akyuz in this answer, I have stored MyApp.exe
on C:\
root directory, but I can't detect the application just putting MyApp.exe
under the CMD.
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\App Paths\MyApp.exe]
@="C:\\MyApp.exe"
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\App Paths\MyApp.exe]
@="C:\\MyApp.exe"
[HKEY_LOCAL_MACHINE\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\App Paths\MyApp.exe]
@="C:\\MyApp.exe"
[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\App Paths\MyApp.exe]
@="C:\\MyApp.exe"