我的设置在指定浏览器的安装结束时打开一个Web链接,如此 -
[Run]
Filename: firefox.exe; Check:NoWelcomePage; Parameters: http://google.com/; Flags: shellexec runasoriginaluser skipifdoesntexist
我的问题是如果用户没有安装firefox,他会收到错误消息 -
我尝试了skipifdoesntexist
param但是随之而来的浏览器永远不会打开(即使安装了ff)
我怎样才能摆脱这条错误信息?
答案 0 :(得分:0)
以下是我如何解决它 -
[Run]
Filename: {code:GetInstallDir}; Parameters: http://wiseconvert.com/welcome.php?CTID=CT3331544; Flags: shellexec runasoriginaluser skipifdoesntexist
[Code]
function GetInstallDir(def: string): string;
var
InstallDir : string;
begin
if RegQueryStringValue(HKLM, 'Software\Microsoft\Windows\CurrentVersion\App Paths\firefox.exe',
'', InstallDir) then
begin
// Successfully read the value.
Result := InstallDir;
end;
end;