Enviromental Variables not picked up
nwebster
Posts: 3
I am using an Installshield 12 Basic MSI script package to create an environment variable, that is then used a component that's installed as part of the install (a red-gate sql DB creation). In it, we have specified %localdir% as an environment variable for where to create the files. When launched from the installer through, the directory shows up as %localdir% and doesn't read the value in from the environment variable. But when I exit out of the install, and relaunch the included file manually, it DOES pick up the environment variable value, and shows c:\program files\productname\etc...
Do I need to do anything to get the enviroment variable to pick up before attempting to use it?
I've heard that environment variables included in the installation are not available to the running installation process. This apparently has to do with how the OS is refreshed when new information is made available. Anyone know a way around this?
Do I need to do anything to get the enviroment variable to pick up before attempting to use it?
I've heard that environment variables included in the installation are not available to the running installation process. This apparently has to do with how the OS is refreshed when new information is made available. Anyone know a way around this?
Comments
I haven't tried to use environment variables in any MSI custom actions before, but as a rule, you would use the builtin system properties as part of a path, for instance, to put a file in the system directory, you'd use: Microsoft publish a list of installer properties in MSDN:
System environment:
http://msdn2.microsoft.com/en-us/library/aa372057.aspx
Component environment:
http://msdn2.microsoft.com/en-us/library/aa368005.aspx
I hope this helps!