阅读Wix帮助,我看到“延迟执行自定义操作必须在InstallInitialize之后,并且在操作序列中的InstallFinalize之前。”
但是我必须在需要使用用户凭据运行的远程盒上执行数据库升级,因此我创建了一个立即操作并将其设置为在installFinalize之后运行。随后,我需要运行另一个自定义操作来启动从数据库读取值的Windows服务,这需要提升(系统)权限,因此需要是延迟的自定义操作。正如Wix帮助向我解释我做不到的。
任何帮助,提示或Wix技巧,请
<CustomAction Id="LaunchServerUpgrade" FileKey="Config.exe" ExeCommand="/upgradeServer"
Return="ignore" Execute="deferred" Impersonate="no"/>
<CustomAction Id="LaunchServerDatabaseUpgrade" FileKey="Config.exe" ExeCommand=" /databaseupgrade"
Return="ignore" Execute="immediate"/>
<CustomAction Id="LaunchServerStartServices" FileKey="Config.exe" ExeCommand=" /startservices"
Return="ignore" Execute="deferred" Impersonate="no"/>
<InstallExecuteSequence>
<Custom Action="LaunchServerUpgrade" Before='InstallFinalize'>
<![CDATA[(SERVERCONFIGUPGRADE) AND NOT REMOVE)]]>
</Custom>
<Custom Action="LaunchServerDatabaseUpgrade" After='InstallFinalize'>
<![CDATA[(SERVERCONFIGUPGRADE) AND NOT REMOVE)]]>
</Custom>
<Custom Action="LaunchServerStartServices" After='InstallFiles'>
<![CDATA[(SERVERCONFIGUPGRADE) AND NOT REMOVE)]]>
</Custom>
</InstallExecuteSequence>