This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- How best to add to the system path?
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Dec 09, 2009
05:43 PM
How best to add to the system path?
Hi All
I have a feature that if selected installs outside the application directory and requires it's path added to the system PATH. I was testing for the registry keys and values and using RegDBSetKeyValueEx() to write the new value into the Path. But I've found out from experiments that if the user cancels the install at a stage after the registry was changed, the the PATH system variable is actually deleted. I haven't found anything in the online help to say this is regular behavior so I want to call this a defect. But perhaps you guys can correct me on this.
Should I be using another function? Is this a defect? Is there something in my project setup that is incorrect or that I should have set? (This is a Installscript MSI project.)
I have a feature that if selected installs outside the application directory and requires it's path added to the system PATH. I was testing for the registry keys and values and using RegDBSetKeyValueEx() to write the new value into the Path. But I've found out from experiments that if the user cancels the install at a stage after the registry was changed, the the PATH system variable is actually deleted. I haven't found anything in the online help to say this is regular behavior so I want to call this a defect. But perhaps you guys can correct me on this.
Should I be using another function? Is this a defect? Is there something in my project setup that is incorrect or that I should have set? (This is a Installscript MSI project.)
(1) Reply
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Dec 09, 2009
06:53 PM
Perhaps use the Environment Variable Changes view instead to append your data?
If you're using script, you'll want to turn off InstallScript logging with Disable(LOGGING) [and later turn it back on with Enable(LOGGING)], but using the MSI table is probably a safer approach.
If you're using script, you'll want to turn off InstallScript logging with Disable(LOGGING) [and later turn it back on with Enable(LOGGING)], but using the MSI table is probably a safer approach.