【发布时间】:2016-04-12 00:00:15
【问题描述】:
我正在使用 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>
【问题讨论】:
-
属性
@Permanent='yes'的意思是“...that the environment variable should not be removed on uninstall.” -
谢谢,这是问题的一部分。另一部分是用户帐户的域策略。没有发出运行时警告..
标签: wix environment-variables uninstallation wix3