sdingwell@calamu.com
Posts: 1
Joined: Thu Sep 15, 2022 6:29 pm

Environment Variables not set on Maintenance

Thu Sep 15, 2022 8:24 pm

Hi, I have an installer that uses a dialog box to take input from the user and set a environment variable on the target machine. This works great on install.

However, during the Maintenance process I would like to be able to let the user change those environment variables, but this does not work. I use a dialog box to collect the user's input and set the value of an installer property, just like during install, but when I am done the value of the environment variable on the target machine does not reflect the new user input.

A little more detail:
1. I have an installer property to hold the value internally. It is a normal public property and it is not set to persistent.
2. My dialog box uses a simple edit control to capture the user input and set the value of my installer property.
3. I use the System Changes -> Environment screen to set the target environment variable. The Value of the Env var is set to the installer property. The variable is set to Create Or Update on install, remove on uninstall and it is a system variable. It has the Replace behavior when existing.

Also of note, the initial value of my installer property is [%my_env_var_name] so that if the target env var exists, the property will be expanded to the current value of the environment variable and the input box will show the user the current value and they can elect to change it or not.

This process works great on install, just not on maintenance.

I have looked at a verbose install log and I can see that my installer properties are picking up the user input values, they are just not setting the target env var with those values.

Am I missing something about how the maintenance process works, or is there another way to force it to update when running in maintenance mode?

Thanks for your help.

Liviu
Posts: 1035
Joined: Tue Jul 13, 2021 11:29 am
Contact:  Website

Re: Environment Variables not set on Maintenance

Mon Sep 19, 2022 3:29 pm

Hello and welcome to our forums,

I investigated it and tried to reproduce the behavior, but I was not able to replicate it.

Can you please send us the .AIP (setup project) file and an installation log of the maintenance process by email to support at advancedinstaller dot com so we can further test and investigate this?

Best regards,
Liviu
________________________________________
Liviu Sandu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”