[wix-users] Update Environment Variable

Rajiv Kumar rajivext at outlook.com
Thu Aug 27 11:36:44 PDT 2015


Hi,
I trying to update an existing env. variable. The installer creates the env. variable if it does not exists but fails to update. 

<?xml version="1.0" encoding="UTF-8"?><Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">  <Product Id="*" Name="WixEnvTest" Language="1033" Version="1.0.0.0" Manufacturer="Test" UpgradeCode="25a30167-ad48-49bc-97d2-a56454b36578">    <Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" />
    <MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." />    <MediaTemplate />
    <Feature Id="ProductFeature" Title="WixEnvTest" Level="1">      <ComponentGroupRef Id="ProductComponents" />    </Feature>  </Product>
  <Fragment>    <Directory Id="TARGETDIR" Name="SourceDir">      <Directory Id="ProgramFilesFolder">        <Directory Id="INSTALLFOLDER" Name="WixEnvTest" />      </Directory>    </Directory>  </Fragment>
  <Fragment>    <ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER">      <Component Id="ProductComponent" Guid="{300D10B0-0802-4BFF-8551-00DF6B5ABB92}">        <CreateFolder/>        <Environment Id="Testenv" Name="Test" Permanent="yes" Action="set" Part="all" System="yes" Value="[INSTALLFOLDER]" />      </Component>    </ComponentGroup>  </Fragment></Wix>
Thanks,Rajiv. 		 	   		   		 	   		  


More information about the wix-users mailing list