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

发布于 2024-10-25 04:39:11 字数 722 浏览 7 评论 0原文

我正在使用 inno setup 构建一个安装程序,安装后会打开一个网站链接 目前,这看起来像这样:

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

这工作得很好,除了测试显示,例如卡斯克斯基会发出警告,指出未经授权的进程(安装程序)启动了想要访问加密密码的授权进程(Internet Explorer)。这(当然)可能是一种威胁。 由于我只想打开浏览器来显示网址,因此最好摆脱此消息。

这是我到目前为止评估的选项

  • 不幸的是,Run Filename: iexplore 和 Pascal Script Shell-Exec('open' ...) 之间没有区别?
  • 也许可以通过某种方式向操作系统传递一条消息来创建网络浏览器的新实例,而不将其创建为安装的子进程(即不触发警告)。
  • 当我这样做是为了进行统计时,从设置中调用 winhttp 库就足够了。但这是不可行的,因为用户可能安装了防火墙(请参阅 HTTP POST Inno 设置脚本中的请求)。
  • 签署设置有帮助吗?这会抑制警告吗?

I am building an installer with inno setup that opens a link to a website after installation
Currently this looks like this:

[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. 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' ...)?
  • 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 (i.e. without triggering the warning) of the setup.
  • As I am doing this for statistics it would be sufficient to call the winhttp library from within the setup. but this is not feasible, because the user could have a firewall installed (see HTTP POST request in Inno Setup Script).
  • Does it help to sign the setup? Would this suppress the warning?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

没企图 2024-11-01 04:39:11

在 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;

in the end of your iss file:

[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;
朕就是辣么酷 2024-11-01 04:39:11

以下对我有用:

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

The following works for me:

[Run]
Filename: "http://doma.in/uri/"; Flags: shellexec runasoriginaluser
桜花祭 2024-11-01 04:39:11

Mike Sutton 指出的基本上是正确的,但您需要将 postinstall 添加到标志中。这将其设置为在安装完成后运行。此外,您需要“描述”来告诉设置完成屏幕要为复选框显示什么内容。

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

如果您希望选择加入而不是选择退出,您也可以考虑使用未选中的标志。

What Mike Sutton pointed out was essentially right, but you need to add postinstall to the flags. 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文