Andrew Truckle
Andrew Truckle

Reputation: 19097

Open HTML page from Inno Setup post install Run section entry

Is it possible to turn these [run] entries into internet hyper-links instead?

Filename: "{win}\hh.exe"; \
Parameters: "{app}\CommunityTalks.chm::/CommunityTalks.htm"; \
WorkingDir: "{app}"; \
Flags: nowait postinstall runmaximized; \
Description: "{cm:ShowOverview}"

Filename: "{win}\hh.exe"; \
Parameters: "{app}\CommunityTalks.chm::/revisions.htm"; \
WorkingDir: "{app}"; \
Flags: nowait postinstall runmaximized; \
Description: "{cm:ViewChangeHistory}"

I have managed to update my [icons] section of the script for the same two items:

Name: "{group}\Public Talks Help"; \
Filename: "https://help-pts.publictalksoftware.co.uk/pts-overview.html"

Name: "{group}\Revision History"; \
Filename: "https://help-pts.publictalksoftware.co.uk/pts-revision-history.html"

But I can't work out what the [run] counterparts should look like.


Update

So I tried:

// AJT v19.0.0 Display the Overview help topic (now uses online link)
Filename: "https://help-pts.publictalksoftware.co.uk/pts-overview.html"; \
    Flags: nowait postinstall runmaximized; \
    Description: "{cm:ShowOverview}"

// AJT v19.0.0 Display the Revision History help topic (now uses online link)
Filename: "https://help-pts.publictalksoftware.co.uk/pts-revision-history.html"; \
    Flags: nowait postinstall runmaximized; \
    Description: "{cm:ViewChangeHistory}"

And I encounter an error during install:

HTML Error

Upvotes: 1

Views: 871

Answers (1)

Martin Prikryl
Martin Prikryl

Reputation: 202222

To open a link, you need to use shellexec flag.

Filename: "https://www.example.com/"; \
    Flags: shellexec postinstall runmaximized; \
    Description: "Show Overview"

With shellexec, nowait is implicit, so I have removed it.

runmaximized will probably have little effect, as the link will typically open in a new tab of an existing browser window.


Note that when opening a link from an elevated (installer) process, there's often a concern that the browser starts elevated too, what can be a security issue. Brief testing shows that the shellexec runs browser non-elevated. But I cannot tell if it is reliable.

See this topic for other solutions:
How to open a web site after uninstallation in non-elevated mode?

Upvotes: 3

Related Questions