Within my MSI package, I am writing several system environment variables. Once the installation has finished I can see the new variables in the 'System -> Advanced -> Environments Variables' GUI.

BUT, if I open a command prompt (Start -> Run -> cmd -> [Enter]) and then type in SET to list all the variables, the new ones aren't there!
I resolve this by going into the GUI and clicking on OK (instead of Cancel).

According to the Windows Installer SDK, the environment variables should be available to any new processes...... but they aren't in this case!

Anyone ever come across this issue before?

Details:
Windows 2003 Server (Standard Edition) (No Service Packs [:'(])
Windows Installer 2.00.3790.0 AND Windows Installer 3.01.4000.1823
0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.

Answers

0
Hi Mr B Hunter

I have just made a MSI where I set three system environment variables.
Two new variables and one adding to path.
I can see them in both GUI and CMD-shell.

I'm using InstallShield AdminStudio6 to make the MSI.
Could your problem be your MSI-tool?

br,
andler
Answered 09/21/2005 by: andler
Orange Belt

Please log in to comment
0
Hello andler,

I have created MSI's in the past and another one just now with Environment variables, and all works perfectly. It was just this particular MSI that was updating the MSI's but not making them available to the system.
If you have a google, you'll find many people having the same problem too.

After some advice from EdT I have created a utility that broadcasts the environment variable changes and all works now.

It's just odd though. Its only happening with this one MSI, which is a huge one and I just don't know why its doing this... [&:]

Strange, very strange....
Answered 09/21/2005 by: brenthunter2005
Fifth Degree Brown Belt

Please log in to comment
0
Can I also say that from google-ing myself, I feel that this issue is caused by the fact that I'm installing the MSI through Terminal Services.

[:@] [:@] [:@] [:@] [:@] [:@] [:@] [:@] [:@] [:@] [:@] [:@] [:@] [:@] [:@] [:@] [:@] [:@] [:@] [:@] [:@]


[>:][>:][>:][>:]
Answered 09/21/2005 by: brenthunter2005
Fifth Degree Brown Belt

Please log in to comment
0
Sounds like permission problem as admins on terminal servers usual lock them down realy hard
Answered 09/22/2005 by: AngelD
Red Belt

Please log in to comment
0
No no no, its just a "feature" of installing MSI's under RDP/Terminal Services.
Answered 09/22/2005 by: brenthunter2005
Fifth Degree Brown Belt

Please log in to comment
0
eh think I missed something here [:D]
Do they not install applications manual on these (or using install mode)?

Edit: never mind this, must have had a brain fart when I wrote this
Answered 09/22/2005 by: AngelD
Red Belt

Please log in to comment
0
Hi Brent,


Using registry keys you can set variables for the user....
\HKEY_CURRENT_USER\Environment

...and for the system.
\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment and
\HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Session Manager\Environment


For system variables you have to set both CurrentControlSet and ControlSet001.

Marcel
Answered 09/26/2005 by: ZhuBaJie
Orange Belt

Please log in to comment
0
I would recommend staying away from directly modifying the HKLM\SYSTEM\ControlSetXXX entries. I don't see the reason for having to set both CurrentControlSet and ControlSetXXX since writing to one updates the other automatically; the problem is there is no guarantee that CurrentControlSet is actually mirroring ControlSet001...it could actually be mirroring ControlSet003.

For a great article on how to identify what CurrentControlSet is really mirroring check out Aaron Stebner's blog:

http://blogs.msdn.com/astebner/archive/2004/10/13/242122.aspx

ORIGINAL: ZhuBaJie

Hi Brent,


Using registry keys you can set variables for the user....
\HKEY_CURRENT_USER\Environment

...and for the system.
\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment and
\HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Session Manager\Environment


For system variables you have to set both CurrentControlSet and ControlSet001.

Marcel
Answered 09/26/2005 by: dem3tre
Senior Yellow Belt

Please log in to comment
0
ORIGINAL: dem3tre

I would recommend staying away from directly modifying the HKLM\SYSTEM\ControlSetXXX entries. I don't see the reason for having to set both CurrentControlSet and ControlSetXXX since writing to one updates the other automatically; the problem is there is no guarantee that CurrentControlSet is actually mirroring ControlSet001...it could actually be mirroring ControlSet003.

For a great article on how to identify what CurrentControlSet is really mirroring check out Aaron Stebner's blog:

http://blogs.msdn.com/astebner/archive/2004/10/13/242122.aspx


Thanks for the info. I should have known this.

Marcel
Answered 09/26/2005 by: ZhuBaJie
Orange Belt

Please log in to comment
Answer this question or Comment on this question for clarity