WIX 3.10:如何在卸载时删除环境变量?

时间:2016-04-12 00:00:15

标签: wix environment-variables uninstall wix3

我正在使用WIX安装一些环境变量。他们似乎没有卸载。

如何在功能卸载时删除环境变量?

以下是用于创建环境变量的代码:

<DirectoryRef Id="TARGETDIR">
  <Component Id="create.APACHE.ENV.VARS" Guid="{169CCBDA-23BE-4DC6-8497-BA522DB555C9}" KeyPath="yes">
    <Environment Id="create.ApacheHome"    Name="APACHE_HOME"      Value="[APACHE_INSTALL_DIR]"     Permanent="yes" Part="all" Action="set" System="yes" />
    <Environment Id="create.ApacheConfig"  Name="APACHE_CONFIG"    Value="[INSTALL_DIR]\$(var.APACHE.SVR.CONF.FILE)"     Permanent="yes" Part="all" Action="set" System="yes" />
    <Environment Id="create.ApacheLogs"    Name="APACHE_LOGS"      Value="[APACHE.LOG.DIR]"     Permanent="yes" Part="all" Action="set" System="yes" />
  </Component> 
</DirectoryRef>

1 个答案:

答案 0 :(得分:0)

Set permanent="no". Documentation is detailed here.