I've done this recently and two things can bite you:

1) Windows Installer  WriteEnvironmentStrings doesn't send the broadcast 
message if there is a pending reboot already.
2) If you want to use it in a windows service ( such as IIS worker pool )  
you'll have to take the reboot for it to take effect.

----------------------------------------
 From: "Suryadeep Biswal" <surya6...@hotmail.com>
Sent: Thursday, October 31, 2013 4:23 PM
To: "General discussion about the WiX toolset." 
<wix-users@lists.sourceforge.net>
Subject: Re: [WiX-users] Environment Variable Changes by MSI are not reflected

After installing the MSI, we require the users run a PowerShell cmdlet for 
configuring the machine. This cmdlet depends on binaries that are present in 
the directory that we add to "PATH" in the MSI. Since the value of "PATH" does 
not change (even in a new process), the users have issues running the 
PowerShell cmdlet. I would expect it to take effect immediately after MSI 
installation so that any new process have the updated value for "PATH" variable.
Regards,Surya

> Date: Thu, 31 Oct 2013 13:11:59 -0700
> From: phildgwil...@gmail.com
> To: wix-users@lists.sourceforge.net
> Subject: Re: [WiX-users] Environment Variable Changes by MSI are not  
> reflected
> 
> The short answer is yes. The longer answer depends on exactly where you
> expect it take effect. What's the exact problem? It doesn't get picked by a
> program? By a command prompt? It doesn't get used when you run something?
> 
> http://superuser.com/questions/351279/adding-a-directory-to-user-path-doesnt-work
> 
> 
> Phil Wilson
> 
> 
> On Thu, Oct 31, 2013 at 11:53 AM, Suryadeep Biswal 
> <surya6...@hotmail.com>wrote:
> 
> > Hi,
> >
> >
> >
> > Our MSI uses the inbuilt Environment
> > WIX element to add a directory to PATH
> > variable. We are seeing an issue on Windows Blue/8.1 where this does not
> > get
> > reflected until the user logs off and logs on. Is this a known issue? Are
> > there
> > any alternatives to set the environment variable other than writing a
> > Custom
> > Action? Please advise.
> >
> >
> >
> > This is from our WXS file -
> >
> > <Environment Id ="Path"
> > Name="PATH" Action="set" Part="last" System="yes"
> > Value="<Custom Directory>" Permanent="no"/>
> >
> >
> >
> > Regards,
> >
> > Surya
> >
> >
> >
> > ------------------------------------------------------------------------------
> > Android is increasing in popularity, but the open development platform that
> > developers love is also attractive to malware creators. Download this white
> > paper to learn more about secure code signing practices that can help keep
> > Android apps secure.
> > http://pubads.g.doubleclick.net/gampad/clk?id=65839951&iu=/4140/ostg.clktrk
> > _______________________________________________
> > WiX-users mailing list
> > WiX-users@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/wix-users
> >
> ------------------------------------------------------------------------------
> Android is increasing in popularity, but the open development platform that
> developers love is also attractive to malware creators. Download this white
> paper to learn more about secure code signing practices that can help keep
> Android apps secure.
> http://pubads.g.doubleclick.net/gampad/clk?id=65839951&iu=/4140/ostg.clktrk
> _______________________________________________
> WiX-users mailing list
> WiX-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wix-users

------------------------------------------------------------------------------
Android is increasing in popularity, but the open development platform that
developers love is also attractive to malware creators. Download this white
paper to learn more about secure code signing practices that can help keep
Android apps secure.
http://pubads.g.doubleclick.net/gampad/clk?id=65839951&iu=/4140/ostg.clktrk
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


------------------------------------------------------------------------------
Android is increasing in popularity, but the open development platform that
developers love is also attractive to malware creators. Download this white
paper to learn more about secure code signing practices that can help keep
Android apps secure.
http://pubads.g.doubleclick.net/gampad/clk?id=65839951&iu=/4140/ostg.clktrk
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to