I have used the following wix fragment to update "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 was working initially but now it doesn't update the environment variable. The Verbose log shows the execution of this action and return value 1. Checked after restarting machine. In the log for action FeaturePublish For Feature3 there is garbage value but Installation is successful. Request your help in this...... Thanks a lot....