简体   繁体   English

Inno-Setup:安装后打开链接:打开链接时的防病毒警报

[英]Inno-Setup: Post Install open link: antivirus alert while opening a link

I am building an installer with inno setup that opens a link to a website after installation Currently this looks like this: 我正在使用inno设置构建一个安装程序,在安装后打开一个指向网站的链接目前看起来像这样:

[Run]
Filename: iexplore.exe; Parameters: http://doma.in/uri/ Verb: open; Flags: shellexec runasoriginaluser

This works fine, except that testing revealed that for example Kaskersky raises a warning that an unauthorized process (the setup) started an authorized process (internet explorer) that wants to access the encrypted passwords. 这样做很好,除了测试显示,例如Kaskersky发出警告,未经授权的进程(设置)启动了一个想要访问加密密码的授权进程(Internet Explorer)。 Which could (of course) be a threat. 哪(当然)可能是一种威胁。 As I just want to open a browser to display the url it would be great to get rid of this message. 因为我只想打开一个浏览器来显示网址,所以摆脱这条消息会很棒。

This are the options I evaluated so far 这是我到目前为止评估的选项

  • Unfortnuately there is no difference between Run Filename: iexplore and the Pascal Script Shell-Exec('open' ...)? 不幸的是,Run Filename:iexplore和Pascal Script Shell-Exec('open'...)之间没有区别?
  • Perhaps it is somehow possible to pass the operating system a message to create a new instance of the webbrowser without creating it as a child process (ie without triggering the warning) of the setup. 也许在某种程度上可以通过操作系统传递消息来创建webbrowser的新实例,而无需将其创建为子进程(即不触发警告)。
  • As I am doing this for statistics it would be sufficient to call the winhttp library from within the setup. 正如我为统计数据所做的那样,从设置中调用winhttp库就足够了。 but this is not feasible, because the user could have a firewall installed (see HTTP POST request in Inno Setup Script ). 但这是不可行的,因为用户可能安装了防火墙(请参阅Inno安装脚本中的HTTP POST请求 )。
  • Does it help to sign the setup? 签署设置有帮助吗? Would this suppress the warning? 这会抑制警告吗?

The following works for me: 以下适用于我:

[Run]
Filename: "http://doma.in/uri/"; Flags: shellexec runasoriginaluser

in the end of your iss file: 在您的iss文件的末尾:

[Code]
procedure CurStepChanged(CurStep: TSetupStep);
var
    ErrCode: integer;
begin
    if (CurStep=ssDone) then
    begin
        ShellExec('open', 'http://your.app.url/', '', '', SW_SHOW, ewNoWait, ErrCode);
    end;
end;

What Mike Sutton pointed out was essentially right, but you need to add postinstall to the flags. Mike Sutton指出的基本上是正确的,但您需要将postinstall添加到标志中。 That sets it to run after the setup has finished. 这使它在设置完成后运行。 In addition, you need Description to tell the setup finished screen what to display for the checkbox. 此外,您需要说明以告知设置完成屏幕显示复选框的内容。

[Run]
Filename: "http://doma.in/uri/"; Flags: shellexec runasoriginaluser postinstall; Description: "Open the url."

You might also consider the unchecked flag if you want the option to be opt in instead of opt out. 如果您希望选项选择加入而不是退出,您也可以考虑未选中标记。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM