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
Iis 当未选择任何web功能时,如何在Wix中禁用网站操作?_Iis_Wix_Windows Installer - Fatal编程技术网

Iis 当未选择任何web功能时,如何在Wix中禁用网站操作?

Iis 当未选择任何web功能时,如何在Wix中禁用网站操作?,iis,wix,windows-installer,Iis,Wix,Windows Installer,如果您希望安全地使用默认网站(安全地说,我的意思是安装程序在卸载时不会删除默认网站),请执行Wix网站操作 我找到了一些关于SkipConfiguis的信息,但这在Wix 3中似乎不起作用。我在Wix 3中使用InstallExecuteSequence中的自定义操作条件支持解决了这个问题。本例假设功能“Web”是唯一需要我们执行IIS操作的功能: <InstallExecuteSequence> <!-- Disable ConfigureIIS if we don'

如果您希望安全地使用默认网站(安全地说,我的意思是安装程序在卸载时不会删除默认网站),请执行Wix网站操作


我找到了一些关于SkipConfiguis的信息,但这在Wix 3中似乎不起作用。

我在Wix 3中使用InstallExecuteSequence中的自定义操作条件支持解决了这个问题。本例假设功能“Web”是唯一需要我们执行IIS操作的功能:

<InstallExecuteSequence>
    <!-- Disable ConfigureIIS if we don't need it: -->
    <Custom Action="ConfigureIIs" After="InstallFiles">(&amp;Web = 3)</Custom>
</InstallExecuteSequence>

(&;Web=3)

我刚刚查看并发现,在WIX生成的MSI中,与InstallExecuteSequence表中的ConfigureIis行相关联的条件
不是SkipConfigure和VersionNT>400

换句话说,您也可以使用如下自定义操作:

<InstallExecuteSequence>
  <!-- Disable the ConfigureIIs action if we don't need it: --> 
  <Custom Action="CA.SkipConfigureIIs" 
          After="InstallFiles">NOT &amp;F.IisFeature = 3</Custom>
</InstallExecuteSequence>


<CustomAction Id="CA.SkipConfigureIIs"
              Property="SKIPCONFIGUREIIS"
              Value="1"
              Return="check" />

不是,;F.IIS特征=3

这使我免于很多悲伤!只是想补充一点,无论安装状态如何,上述内容都会在卸载时跳过IIS配置。即,如果安装了该功能,则在卸载时不会从IIS中删除虚拟目录

<Fragment>
    <iis:WebSite Id="DefaultWebSite" Description="Default Web Site" Directory="INSTALLDIR">
        <iis:WebAddress Id="AllUnassigned" Port="80" />
    </iis:WebSite>
</Fragment>
这似乎对我有用:

<InstallExecuteSequence>
    <!-- Disable ConfigureIIS if we don't need it: -->
    <Custom Action="ConfigureIIs" After="InstallFiles"><![CDATA[&Web=3 OR !Web=3]]></Custom>
</InstallExecuteSequence>


Ahh,Wix的无限奥秘。在“产品:*”一节中未解决对符号“CustomAction:ConfigureIIS”的引用。@9详细信息它区分大小写,所以它的
ConfigureIIS
不是
ConfigureIIS
谢谢,我认为SkipConfigureIS位是用于Wix 2的?它仍然在我的MSI中,我使用的是3.0.5419.0。
<InstallExecuteSequence>
    <!-- Disable ConfigureIIS if we don't need it: -->
    <Custom Action="ConfigureIIs" After="InstallFiles"><![CDATA[&Web=3 OR !Web=3]]></Custom>
</InstallExecuteSequence>