I used the following wix snippet to update the "PATH" environment variable.
<DirectoryRef Id="MyDir"> <Component Id ="setEnviroment" Guid=" xxxxx"> <CreateFolder /> <Environment Id="SET_ENV" Action="set" Name="PATH" Part="last" Permanent="no" System="yes" Value="[INSTALLLOCATION]" /> </Component> </DirectoryRef> <Feature Id="Feature3" Title="3Feature" Level="1" Absent="disallow" AllowAdvertise="no"> <ComponentRef Id="setEnviroment"/> </Feature> <InstallExecuteSequence> <WriteEnvironmentStrings/> <InstallExecuteSequence/>
This worked initially, but now it does not update the environment variable. Verbose log shows the completion of this action and returns a value of 1. Checked after the machine restarts. FeaturePublish's action log for Feature3 has a value for garbage, but the installation was successful. Ask for your help on this ... Thanks a lot ....
source share