cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Alex_W
Level 6

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.)
Labels (1)
0 Kudos
(1) Reply
RobertDickau
Flexera Alumni

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.
0 Kudos