【发布时间】:2014-12-17 16:42:55
【问题描述】:
<Property Id="BROWSER">
<RegistrySearch Id='DefaultBrowser' Type='raw' Root='HKCR' Key='http\shell\open\command' />
</Property>
<CustomAction Id='LaunchBrowser' Property='BROWSER' ExeCommand='www.something.com' Return='asyncNoWait' />
<InstallExecuteSequence>
...
<Custom Action='LaunchBrowser' After='InstallFinalize'>NOT Installed</Custom>
</InstallExecuteSequence>
从安装跟踪中可以看出,属性 BROWSER 计算正确:
属性(S): BROWSER = "C:\Program Files (x86)\Internet Explorer\iexplore.exe" -nohome
但是安装后浏览器打不开。
MSI (s) (88:90) [18:38:30:331]:执行操作:LaunchBrowser MSI (s) (88:90) [18:38:30:331]: 注意: 1: 2205 2: 3: ActionText 动作开始 18:38:30:启动浏览器。行动于 18:38:30 结束:安装。返回值 1. 行动于 18:38:30 结束:LaunchBrowser。返回值 1631.
...
MSI (c) (64:6C) [18:38:30:409]:产品:WebPrintingService -- 安装成功完成。
可能出了什么问题?
Windows 7。 UAC - 默认。
更新:
作为一种解决方法,可以使用以下代码(但我不确定这是一个好的解决方法):
<Property Id="BROWSER">
<RegistrySearch Id='DefaultBrowser' Type='raw' Root='HKCR' Key='http\shell\open\command' />
</Property>
<CustomAction Id="LaunchBrowser" Directory="INSTALLDIR" Impersonate="no" Execute="deferred" ExeCommand='[BROWSER] "test.html"' Return="check"/>
<InstallExecuteSequence>
<Custom Action='LaunchBrowser' Before='InstallFinalize'>NOT Installed</Custom>
</InstallExecuteSequence>
【问题讨论】:
标签: wix windows-installer wix3.8