我正在安装一个大型应用程序,其中一部分是一个名为"DbUpdateManager"的自定义编写工具,可以针对我们的目标数据库批量执行SQL脚本.
现在,WiX 2.x安装工作 - 但它有一个缺陷:在安装过程中,我还安装了几个Windows服务,可以选择立即启动.但是,如果DbUpdateManager尚未运行,那么这些将失败.
所以我想要完成的是:
我目前的WiX源代码如下:
<Directory Id='INSTALLDIR' Name='DbUpdMgr' LongName='DbUpdateManager' >
<!-- DbUpdateManager component with the necessary files -->
<Component Id='DbUpdateManagerComponent' Guid='...' DiskId='1'>
<File Id='DbUpdateManagerFile' LongName='DbUpdateManager.Wizard.exe'
Name='DbUmWz.exe' src='DbUpdateManager.Wizard.exe' KeyPath='no' />
</Component>
<!-- Component to install one of my Windows services -->
<Component Id='InstallServiceComponent' Guid='...' DiskId='1'>
<File Id='InstallServiceFile' LongName='MyService.exe'
Name='MyServic.exe' src='MyService.exe' KeyPath='yes'/>
<ServiceInstall Id='InstallMyService' Name='MyService'
Description='My Service' ErrorControl='normal'
Start='auto' Type='ownProcess' Vital='yes' />
<ServiceControl Id='UninstallMyService' Name='MyService'
Remove='uninstall' Wait='yes' />
</Component>
<!-- Feature for the DbUpdateManager referencing …Run Code Online (Sandbox Code Playgroud)