Error occured while refreshing environment variables - Advanced Installer Community
RichRowan
Posts: 6
Joined: Tue Apr 08, 2014 2:42 pm

Error occured while refreshing environment variables

Hi,

I'm getting this message in the log file when installing my software. What is the cause of this error and is there something that I can do so that the user doesn't have to log off - log on.

Code: Select all

An error occured while refreshing environment variables updated during the installation of ''. Some users logged on to the machine may not see these changes until they log off and then log back on.
regards
Rich
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: Error occured while refreshing environment variables

Hi Rick,

Please take a look on the Environment Variables forum thread which debates the same subject.

Let us know if you have any questions.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
RichRowan
Posts: 6
Joined: Tue Apr 08, 2014 2:42 pm

Re: Error occured while refreshing environment variables

Thanks for the link Dan,

I was testing the installation through Remote Desktop so that may have been what was causing it to give that error message.

Rich
RichRowan
Posts: 6
Joined: Tue Apr 08, 2014 2:42 pm

Re: Error occured while refreshing environment variables

Hi Dan,

How does Advanced Installer deal with Environment Variables that are already very long, e.g. greater than 2048 characters, when it tries to append/prepend to them?

I've been researching the issue and its different depending what you use to set the PATH.
e.g. calling set PATH from a command prompt truncates at 1024.
Changing the registry key for PATH, or using the Edit System Variable dialog, can be limited to 2048.
But the actual limit is about 32,768.
http://superuser.com/questions/387619/o ... -with-setx

I'm seeing behaviour where if the PATH is already very long, and my installer prepends values too it, then the PATH is truncated until I log off/on or reboot. Is this because the PATH variable is so long? (This happens when run locally, not just over remote desktop.)

Rich
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Error occured while refreshing environment variables

Hello Rich,

What Advanced Installer does is only to prepend the specified value to the existing "PATH" environment variable value. You can always check the real value of "PATH" variable in the registry (HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment\Path). I'm not so sure why the "PATH" variable is truncated until you reboot the system, but this seems to be an operating system specific behavior. However, in order to avoid this behavior you can configure your setup package to reboot the target machine after installation. Just go to "Install Parameters" page and and set the "Reboot Behavior" to "Force Reboot after install".

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”