如何在 FeaturesDlg 之后获取 InstallDirDlg

发布于 2024-08-02 01:31:30 字数 3941 浏览 5 评论 0原文

我一直在尝试让 InstallDirDlg 在 FeaturesDlg 之后显示,但由于某种原因我得到了安装进度对话框。 所以,我创建了这个简单的测试项目,它有 4 个功能(每个功能安装一个文件)...

这是代码,感谢您的帮助...

<Fragment>
<UI Id="UserInterface">
  <Property Id="WIXUI_INSTALLDIR" Value="INSTALLDIR" />

  <TextStyle Id="WixUI_Font_Normal" FaceName="Tahoma" Size="8" />
  <TextStyle Id="WixUI_Font_Bigger" FaceName="Tahoma" Size="9" Bold="yes" />
  <TextStyle Id="WixUI_Font_Title"  FaceName="Tahoma" Size="9" Bold="yes" />

  <DialogRef Id="BrowseDlg" />
  <DialogRef Id="DiskCostDlg" />
  <DialogRef Id="ErrorDlg" />
  <DialogRef Id="FatalError" />
  <DialogRef Id="FilesInUse" />
  <DialogRef Id="MsiRMFilesInUse" />
  <DialogRef Id="PrepareDlg" />
  <DialogRef Id="ProgressDlg" />
  <DialogRef Id="ResumeDlg" />
  <DialogRef Id="UserExit" />

  <DialogRef Id="SetupTypeDlg" />
  <DialogRef Id="FeaturesDlg"/>      

  <Publish Dialog="WelcomeDlg" Control="Next" Event="NewDialog" Value="SetupTypeDlg">1</Publish>

  <Publish Dialog="SetupTypeDlg" Control="Back" Event="NewDialog" Value="WelcomeDlg">1</Publish>
  <!-- Typical install: add all features except web service. -->
  <Publish Dialog="SetupTypeDlg" Control="TypicalButton" Event="AddLocal" Value="ALL" Order="10"></Publish>
  <Publish Dialog="SetupTypeDlg" Control="TypicalButton" Event="Remove" Value="FEATUREB" Order="20"></Publish>
  <Publish Dialog="SetupTypeDlg" Control="TypicalButton" Event="Remove" Value="FEATUREC" Order="30"></Publish>
  <Publish Dialog="SetupTypeDlg" Control="TypicalButton" Event="Remove" Value="FEATURED" Order="40"></Publish>
  <Publish Dialog="SetupTypeDlg" Control="TypicalButton" Event="NewDialog" Value="InstallDirDlg" Order="50">1</Publish>

  <!-- Custom install: display feature tree. -->
  <Publish Dialog="SetupTypeDlg" Control="CustomButton" Event="NewDialog" Value="FeaturesDlg" Order="10">1</Publish>



  <!-- Complete install: all features. Errors out if IIS is absent. -->
  <Publish Dialog="SetupTypeDlg" Control="CompleteButton" Event="AddLocal" Value="ALL" Order="10"></Publish>
  <Publish Dialog="SetupTypeDlg" Control="CompleteButton" Event="NewDialog" Value="InstallDirDlg" Order="30">1</Publish>

  <Publish Dialog="FeaturesDlg" Control="Back" Event="NewDialog" Value="SetupTypeDlg">1</Publish>
  <Publish Dialog="FeaturesDlg" Control="Install" Event="DoAction" Value="MissingFeature" Order="10">
    <![CDATA[(NOT(&FEATUREA=3) AND NOT(&FEATUREB=3) AND NOT(&FEATUREC=3) AND NOT(&FEATURED=3))]]>
  </Publish>
  <Publish Dialog="FeaturesDlg" Control="Install" Event="NewDialog" Value="InstallDirDlg" Order="20">1</Publish>

  <Publish Dialog="InstallDirDlg" Control="Back" Event="NewDialog" Value="SetupTypeDlg"></Publish>
  <Publish Dialog="InstallDirDlg" Control="Next" Event="SetTargetPath" Value="[WIXUI_INSTALLDIR]" Order="10">1</Publish>
  <Publish Dialog="InstallDirDlg" Control="Next" Event="NewDialog" Value="VerifyReadyDlg" Order="20">1</Publish>
  <Publish Dialog="InstallDirDlg" Control="ChangeFolder" Property="_BrowseProperty" Value="[WIXUI_INSTALLDIR]" Order="10">1</Publish>
  <Publish Dialog="InstallDirDlg" Control="ChangeFolder" Event="SpawnDialog" Value="BrowseDlg" Order="20">1</Publish>


  <Publish Dialog="ExitDialog" Control="Finish" Event="EndDialog" Value="Return" Order="999">1</Publish>

  <!-- Back button declaration so no error on build -->
  <Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="InstallDirDlg"></Publish>
</UI>

<UIRef Id="WixUI_Common" />
<UIRef Id="WixUI_ErrorProgressText" />

</Fragment>

I've been trying to get a InstallDirDlg to show after the FeaturesDlg, but for some reason I get the Install progress Dialog. So, I created this simple test project that has 4 features (each installs a file)...

Here's the code, thanks for the help...

<Fragment>
<UI Id="UserInterface">
  <Property Id="WIXUI_INSTALLDIR" Value="INSTALLDIR" />

  <TextStyle Id="WixUI_Font_Normal" FaceName="Tahoma" Size="8" />
  <TextStyle Id="WixUI_Font_Bigger" FaceName="Tahoma" Size="9" Bold="yes" />
  <TextStyle Id="WixUI_Font_Title"  FaceName="Tahoma" Size="9" Bold="yes" />

  <DialogRef Id="BrowseDlg" />
  <DialogRef Id="DiskCostDlg" />
  <DialogRef Id="ErrorDlg" />
  <DialogRef Id="FatalError" />
  <DialogRef Id="FilesInUse" />
  <DialogRef Id="MsiRMFilesInUse" />
  <DialogRef Id="PrepareDlg" />
  <DialogRef Id="ProgressDlg" />
  <DialogRef Id="ResumeDlg" />
  <DialogRef Id="UserExit" />

  <DialogRef Id="SetupTypeDlg" />
  <DialogRef Id="FeaturesDlg"/>      

  <Publish Dialog="WelcomeDlg" Control="Next" Event="NewDialog" Value="SetupTypeDlg">1</Publish>

  <Publish Dialog="SetupTypeDlg" Control="Back" Event="NewDialog" Value="WelcomeDlg">1</Publish>
  <!-- Typical install: add all features except web service. -->
  <Publish Dialog="SetupTypeDlg" Control="TypicalButton" Event="AddLocal" Value="ALL" Order="10"></Publish>
  <Publish Dialog="SetupTypeDlg" Control="TypicalButton" Event="Remove" Value="FEATUREB" Order="20"></Publish>
  <Publish Dialog="SetupTypeDlg" Control="TypicalButton" Event="Remove" Value="FEATUREC" Order="30"></Publish>
  <Publish Dialog="SetupTypeDlg" Control="TypicalButton" Event="Remove" Value="FEATURED" Order="40"></Publish>
  <Publish Dialog="SetupTypeDlg" Control="TypicalButton" Event="NewDialog" Value="InstallDirDlg" Order="50">1</Publish>

  <!-- Custom install: display feature tree. -->
  <Publish Dialog="SetupTypeDlg" Control="CustomButton" Event="NewDialog" Value="FeaturesDlg" Order="10">1</Publish>



  <!-- Complete install: all features. Errors out if IIS is absent. -->
  <Publish Dialog="SetupTypeDlg" Control="CompleteButton" Event="AddLocal" Value="ALL" Order="10"></Publish>
  <Publish Dialog="SetupTypeDlg" Control="CompleteButton" Event="NewDialog" Value="InstallDirDlg" Order="30">1</Publish>

  <Publish Dialog="FeaturesDlg" Control="Back" Event="NewDialog" Value="SetupTypeDlg">1</Publish>
  <Publish Dialog="FeaturesDlg" Control="Install" Event="DoAction" Value="MissingFeature" Order="10">
    <![CDATA[(NOT(&FEATUREA=3) AND NOT(&FEATUREB=3) AND NOT(&FEATUREC=3) AND NOT(&FEATURED=3))]]>
  </Publish>
  <Publish Dialog="FeaturesDlg" Control="Install" Event="NewDialog" Value="InstallDirDlg" Order="20">1</Publish>

  <Publish Dialog="InstallDirDlg" Control="Back" Event="NewDialog" Value="SetupTypeDlg"></Publish>
  <Publish Dialog="InstallDirDlg" Control="Next" Event="SetTargetPath" Value="[WIXUI_INSTALLDIR]" Order="10">1</Publish>
  <Publish Dialog="InstallDirDlg" Control="Next" Event="NewDialog" Value="VerifyReadyDlg" Order="20">1</Publish>
  <Publish Dialog="InstallDirDlg" Control="ChangeFolder" Property="_BrowseProperty" Value="[WIXUI_INSTALLDIR]" Order="10">1</Publish>
  <Publish Dialog="InstallDirDlg" Control="ChangeFolder" Event="SpawnDialog" Value="BrowseDlg" Order="20">1</Publish>


  <Publish Dialog="ExitDialog" Control="Finish" Event="EndDialog" Value="Return" Order="999">1</Publish>

  <!-- Back button declaration so no error on build -->
  <Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="InstallDirDlg"></Publish>
</UI>

<UIRef Id="WixUI_Common" />
<UIRef Id="WixUI_ErrorProgressText" />

</Fragment>

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

潇烟暮雨 2024-08-09 01:31:30

经过一些测试后,我发现如果没有这一行:

<Property Id="ALLUSERS" Value="1"/>

That set the installer for a per-machine install 上面给出的序列每次都会失败,无论您在 FeaturesDlg 之后放置什么对话框。 如果其他人找到其他解决方案,我希望看到它。

After doing some tests, I found out that without this line:

<Property Id="ALLUSERS" Value="1"/>

That sets the installer for a per-machine install the sequence given above will fail everytime no matter what dialog you put after the FeaturesDlg. If anyone else finds an other solution I would like to see it.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文