I am trying to publish my application using InstallForge, but as it is a command line app, I want to add its install directory to PATH. I already tried using setx
, but it didn't work. I already googled it, but with no helpful results.
Asked
Active
Viewed 449 times
0

BlackBird
- 23
- 5
1 Answers
0
Even though InstallForge has the Registry options, I couldn't figure out how to add a new input on top of the old Path value. Windows has %path%, which writes out the entire Path variable, but I couldn't make it work in InstallForge. I found a workaround; add the Path input using a "Shell execute" in the Commands tab on InstallForge, with this command:
reg add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" /t REG_SZ /v Path /d "%path%<InstallPath>;" /f
The only downside of this is that modifying the registry this way you have to run the Setup file as administrator every time (or just check "Run this program as an administrator" in the Compatibility tab of the file properties).

Toka47
- 31
- 3