Reputation: 133
In my project, I use installshield to insert an environment variable during installation.
PEAK_LIMIT = 1000
However, if I change the value to say - 1500, then during re-installation with higher versions causes the value to be reset to 1000. Is there a way to preserve the current value 1500 instead of resetting?
Thanks
Upvotes: 0
Views: 1060
Reputation: 55601
It sounds like you have a hard coded value in your Environment table. Substitute it out with a property that equals that value. Then use a custom action during the install to assign the current value to the property if it has a value. This way when MSI rewrites the environment variable it'll keep the value it read.
Another approach would be to create a second environment variable (PEAK_LIMIT_OVERRIDE) that has higher priority in your application. This way the installer can set the default value to what it thinks is correct and keep that apart from user controlled data.
Upvotes: 1