7

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?
Community
  • 1
  • 1
  • Have you tried to include a Internet Shortcut in your setup and tried running it? – Searock Mar 21 '11 at 08:24
  • Copying a .url to {app} and running iexplore with {app}\site.url or launching the .url with another method? –  Mar 21 '11 at 08:36
  • You should not be forcing the installation to open a web URL. Performing such an action in an installation is poor packaging. If you must include a URL, add it to the 'Start Menu' for that program. –  Aug 31 '11 at 13:23
  • @innotune You might want to consider add a LinkLabel in the finish page and let user click it to open in browser. I can show you the code if you're interested. – AZ. Nov 16 '11 at 00:59

3 Answers3

8

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;
bviktor
  • 215
  • 4
  • 2
8

The following works for me:

[Run]
Filename: "http://doma.in/uri/"; Flags: shellexec runasoriginaluser
Mike Sutton
  • 4,191
  • 4
  • 29
  • 42
  • `Filename: iexplore.exe; Parameters: "http://doma.in/uri/" Flags: shellexec runasoriginaluser` - this works –  Sep 20 '14 at 10:17
5

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.

Dennis
  • 555
  • 8
  • 17