installer - Unable to update "PATH" environment variable using WIX -


I have used the following Wix piece to update the "PATH" environment variable. & lt; DirectoryRef id = "MyDir" & gt; & Lt; Component id = "set environment" guide = "xxxxx" & gt; & Lt; CreateFolder / & gt; & Lt; Environment ID = "SET_ENV" verb = "set" name = "PATH" part = "last" permanent = "no" system = "yes" value = "[installation]" /> & Lt; / Component & gt; & Lt; / DirectoryRef & gt; & Lt; Feature ID = "Feature3" heading = "3 Feature" level = "1" Absent = "Allow" = "No" & gt; & Lt; ComponentRef Id = "setEnviroment" /> & Lt; / Feature & gt; & Lt; InstallExecuteSequence & gt; & Lt; WriteEnvironmentStrings / & gt; & Lt; InstallExecuteSequence / & gt;

It was working initially but now it does not update the environment variable verbose log shows the execution of this action and return value 1. checked after restarting the machine . Feature Feature Feature 3 has garbage value but installation is successful Request your help in this ...... Thanks a lot ....

I think that you are using INSTALLLOICATION where you want to use INSTALLDIR. Here is an example of a work that is installed with the new directory of the PATH environment Updates up.

  & lt; Environment id = "pat" name = "pat" value = "[INSTALLDIR]" permanent = "yes" part = "last" verb = "set" system = "yes" />   

Intended to use INSTALLLOCATION, and have defined it elsewhere, please post your rest code and we will go down from the rabbit hole.

Comments