在运行WiX设置时,我一直在查找操作列表及其顺序.不知何故官方网站似乎没有提供任何信息.
基本问题是我想正确安排自定义操作.通常我需要使用regsvr32.exe注册DLL,这只能在文件复制到硬盘后才能完成.但是自定义动作
<Custom Action="RegisterShellExt" After="InstallFiles">
Run Code Online (Sandbox Code Playgroud)
失败,错误消息"找不到文件".
我所做的就是使用WiX Edit分析我的MSI日志,我发现Action InstallFiles不止一次存在.实际上,文件只在第二次出现时写入.所以我将自定义操作更改为以下内容:
<Custom Action="RegisterShellExt" Before="InstallFinalize">
Run Code Online (Sandbox Code Playgroud)
这是我从MSI的日志中提取的序列:
Action start 15:16:49: INSTALL.
Action start 15:16:49: PrepareDlg.
Action start 15:16:49: AppSearch.
Action start 15:16:49: LaunchConditions.
Action start 15:16:49: ValidateProductID.
Action start 15:16:49: DIRCA_NEWRETARGETABLEPROPERTY1.5D429292039C46FCA3253E37B4DA262A.
Action start 15:16:50: CostInitialize.
Action start 15:16:50: FileCost.
Action start 15:16:50: CostFinalize.
Action start 15:16:50: WelcomeDlg.
Action 15:16:51: LicenseAgreementDlg. Dialog created
Action 15:16:53: CustomizeDlg. Dialog created
Action 15:16:55: VerifyReadyDlg. Dialog created
Action start 15:16:56: ProgressDlg.
Action start 15:16:56: ExecuteAction.
Action start 15:16:58: …Run Code Online (Sandbox Code Playgroud)