开发者

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:

[Run]
Filename: iexplore.exe; Parameters: http://doma.in/uri/ Verb: open; Flags: shellex开发者_Go百科ec 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?


The following works for me:

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


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;


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜