Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/wix/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Wix升级:预选功能_Wix_Wix3 - Fatal编程技术网

Wix升级:预选功能

Wix升级:预选功能,wix,wix3,Wix,Wix3,我们正在使用Wix创建安装程序。我们使用的是用户界面,用户可以在其中选择需要安装的功能。默认情况下,某些功能处于启用状态,而其他功能处于禁用状态 但是,当我们运行升级时,这些默认值将保留。我们希望安装程序记住安装了哪些功能,并在功能树中启用它们以进行升级。应禁用所有其他功能 我们有这样的代码,看起来很有效,但实际上,它没有: <Feature Id="MainFeature" Level="1" ConfigurableDirectory="INSTALLDIR" Display="exp

我们正在使用Wix创建安装程序。我们使用的是用户界面,用户可以在其中选择需要安装的功能。默认情况下,某些功能处于启用状态,而其他功能处于禁用状态

但是,当我们运行升级时,这些默认值将保留。我们希望安装程序记住安装了哪些功能,并在功能树中启用它们以进行升级。应禁用所有其他功能

我们有这样的代码,看起来很有效,但实际上,它没有:

<Feature Id="MainFeature" Level="1" ConfigurableDirectory="INSTALLDIR" Display="expand">
    <Feature Id="Feature1" Level="1" InstallDefault="local" AllowAdvertise="no">
        <ComponentGroupRef Id="Feature1ComponentGroup" />
        <Condition Level="3">(PROJECTUPGRADE AND NOT !Feature1=2)</Condition>
    </Feature>            
    <Feature Id="Feature2" Level="3" InstallDefault="local" AllowAdvertise="no">
        <ComponentGroupRef Id="Feature2ComponentGroup" />
        <Condition Level="1">(PROJECTUPGRADE AND !Feature2=2)</Condition>
    </Feature>
</Feature>

(项目升级和否!功能1=2)
(项目升级和!功能2=2)

啊,看来我找错地方了。UpdgradeVersion标记上有一个名为“”的属性,用于指定以下内容:

<Upgrade Id="$(var.UpgradeCode)">
    <UpgradeVersion Minimum="$(var.ProductVersion)" IncludeMinimum="yes" OnlyDetect="yes" Property="PROJECTDOWNGRADE" />
    <UpgradeVersion Maximum="$(var.ProductVersion)" IncludeMaximum="no" Property="PROJECTUPGRADE" MigrateFeatures="yes" />
</Upgrade>