[wix-users] A question about newly created environment variable on Windows 10

Joseph L. Casale jcasale at activenetwerx.com
Mon Oct 2 16:27:30 PDT 2017


-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf
Of Miaohsi Wang via wix-users
Sent: Monday, October 2, 2017 2:05 PM
To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Cc: Miaohsi Wang <Miaohsi.Wang at schneider-electric.com>
Subject: [wix-users] A question about newly created environment variable
on Windows 10
 
> Our WiX installer creates an environment and we found an issue with it on
> Windows 10. On windows 10 after the installation, the environment variable
> is not effective and if I open a new DOS command prompt window and
> execute a set command, I would not see it there in the list. At this time,
> however, if I open the Environment Variable window, I'd see it there in the
> System Environment Variable window. After I close the Environment
> Variable window, the new environment variable is now effective. Any idea?
> The WiX code for the environment variable creation is shown below.
> 
> <Environment Id="Env1" Name="TEST" Value="[TEST]" Part="all"
> Permanent="yes" Action="set" System="yes" />

The shell performs the needed supplementary work to make changes available
while I think it is safe to say this done in the execute phase under local system
and most likely does not perform the additional calls.

See https://support.microsoft.com/en-us/help/104011/how-to-propagate-environment-variables-to-the-system





More information about the wix-users mailing list