Home | Blog | Software | Reviews and Features | Forum | Help | Donate | About us
topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • December 10, 2016, 08:37:10 AM
  • Proudly celebrating 10 years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: IDEA: an app to stop installers from launching web browsers and opening pages  (Read 10689 times)

Brian De Braganza

  • Supporting Member
  • Joined in 2011
  • **
  • default avatar
  • Posts: 13
    • View Profile
    • Donate to Member
My last wishlist post for today  ;D

You know the situation: you have shut down most running processes, including your web browser(s), to help prevent conflicts and problems while installing a new application and to free up resources. Without asking for permission, the installer launches a web browser and opens a web page - perhaps the help web page or homepage - or the uninstaller launches a web browser to open a page with a survey asking "why?", etc.

If, like me, you often have 40 or more saved tabs in Firefox (using TabsMixPlus), you know how annoying this can be, waiting for Firefox to launch and open all those tabs and then open a page you weren't interested in visiting in the first place. Grrr. No software installer/uninstaller should ever launch a web browser without presenting an option first to deny that behaviour, if preferred - but they do. Often the wretched installer app will not progress further until it receives a positive response from the browser with a connection to the launched URL.

Does anyone know of or can come up with a small application that would prevent software installers/uninstallers from automatically launching a browser? Obviously, it would have to be restricted narrowly to installers/uninstallers because there are lots of applications from which one actually wants to launch a URL.

I don't know if such an intervention is even possible, but I hope it is.

Brian De B

MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7,290
    • View Profile
    • Miles Ahead Software
    • Donate to Member
I wasn't able to find any smooth way to detect if a url is being opened by an installer. A kludge to do it may be to write a small batch file where you would put the name of the installer as param. The batch would launch BrowserChooser program, which would prompt you if it's not the default browser.  Click OK to set it as default.  Then the batch would run the installer.  When BrowserChooser pops up because the installer launched a url, just kill it.

Then run any browser set to detect default on startup.  Firefox can be set to do this.  Chromium does it by default.  Click to set that as default and BrowserChooser won't pop up anymore.

Something smoother like hooking all calls to ShellExecute run the risk of messing up your system program launches.  Maybe skwire can conceive of something more macro rather than the BrowserChooser hack. On the plus side you should be able to use the same batch file for install or uninstall.  Doesn't really matter. You are just changing default browser before and after running some program.

« Last Edit: March 04, 2011, 06:39:04 PM by MilesAhead »

app103

  • That scary taskbar girl
  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 5,666
    • View Profile
    • App's Apps
    • Read more about this member.
    • Donate to Member
You could try mouser's BrowserTraySwitch. Pay careful attention to what he had to say at the bottom of the page.

Ath

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 2,790
    • View Profile
    • Donate to Member
There's only one real way to eventually get rid of that behavior: Complaints at the suppliers e-mail address, forum, guestbook, support-line, etc.

Being around the Inno Setup newgroups for years, this has been discussed often and long, and the general consensus over there is: If a web-page is to be shown, it should be optional (using a checkbox), and If it's opened, it should use the system default browser.
So there is hope that more and more Inno Setup installers give the user the option to open a web-page, instead of just doing that without asking (Skype and Oracle Java installers come to mind >:()

MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7,290
    • View Profile
    • Miles Ahead Software
    • Donate to Member
For me the annoying part is when you upgrade and the installer insists you first uninstall the old version. Then it pops up a web page asking you why you are uninstalling.  Duh!!

Eóin

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 1,401
    • View Profile
    • Donate to Member
A program which temporarily took over default handling of webpages for the duration of the install would probably do the trick, and wouldn't be too hard to code.

You'll even find code samples on this MSDN - page  :)

I don't have the time just now, unfortunately.

app103

  • That scary taskbar girl
  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 5,666
    • View Profile
    • App's Apps
    • Read more about this member.
    • Donate to Member
A program which temporarily took over default handling of webpages for the duration of the install would probably do the trick, and wouldn't be too hard to code.

You'll even find code samples on this MSDN - page  :)

I don't have the time just now, unfortunately.

No coding necessary if you use mouser's BrowserTraySwitch app and configure your firewall to block one of the browsers installed on your PC. Then it is just a matter of using mouser's app to switch the default to the blocked browser when you install something and then switch back when you are done.

MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7,290
    • View Profile
    • Miles Ahead Software
    • Donate to Member
In fact if you don't mind messing around with the registry you could just set any app as the default browser, such as dummy.exe which would just go away without opening a window(maybe beep or something so you know it ran.)

Only thing is esp. with 64 bit there's a lot of registry setting "echo" where the 32 bit stuff sets 64 bit settings for SysWow64 32 bit emulation and it gets messy.  You could probably just use a registry monitor, then set something as the default browser, to see what registry keys are changed.

I just don't like to mess with the registry unless it's very simple. Like one or two keys.  Too much liability for no gain.

But I would think once you know which keys to manipulate it would be a matter of writing a small utility that takes the installer off the command line, change the registry to make dummy.exe the default browser, run the install, then change the default back to whatever it was in the first place.

edit: on the other hand, some of these installers want to use an IEism so they explicitly call IE with the url.

Maybe the pop-up killer approach would be better. Kill all browsers until the install is complete.

« Last Edit: March 05, 2011, 06:53:28 PM by MilesAhead »

Brian De Braganza

  • Supporting Member
  • Joined in 2011
  • **
  • default avatar
  • Posts: 13
    • View Profile
    • Donate to Member
Many thanks for replying everyone  :)

I can see that I have touched a nerve. Perhaps the first person to create such a "killer" app will be hailed a hero!

@MilesAhead and app103, I will try BrowserTraySwitch. Since I never use IE, I could switch to that before an install and switch back to Firefox after. At least IE would open quickly. I would need to set it so that javascript and activeX are disabled and all the other bells and whistles that Microsoft insists on are turned off. I so rarely use IE that every time I do launch it, it throws a dozen or so things to step through before it will open a danged page - LOL.

@Ath, I did complain on one occasion to the developers - of Tabbles (some nice Italian gentlemen) when Tabbles insisted on opening a browser page every time on installation AND update. They informed me that mine was the first complaint about that and all the other users loved the fact that the Help page opened at the website! So.... >:(

@Eóin - I'm not a programmer so I'm afraid I'd probably end up with a bomb that destroyed my machine.

@app103, now that's an idea. I could install any quick and simple browser I would never use (there are lots of them) and block it in ESET's firewall. Combined with BrowserTraySwitch, that would work, except ... remember, some installers actually hang if they don't get a signal back that the browser page has opened (that SHOULD be outlawed).

@MilesAhead "Maybe the pop-up killer approach would be better. Kill all browsers until the install is complete." It would need to send a signal to the installer that the URL was opened. Some installers actually hang if they don't get that response.

Brian De B

Ath

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 2,790
    • View Profile
    • Donate to Member
You can hardly block internet access, as a lot of installers often fetch parts to install from the internet, check for updates during install, or register your copy with the supplier based on account information entered during install.

app103

  • That scary taskbar girl
  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 5,666
    • View Profile
    • App's Apps
    • Read more about this member.
    • Donate to Member
@app103, now that's an idea. I could install any quick and simple browser I would never use (there are lots of them) and block it in ESET's firewall. Combined with BrowserTraySwitch, that would work, except ... remember, some installers actually hang if they don't get a signal back that the browser page has opened (that SHOULD be outlawed).

Keep in mind that some apps open IE and not your default browser. You'd have to block IE from having internet access in your firewall and switch it to be your default browser while installing.

You can hardly block internet access, as a lot of installers often fetch parts to install from the internet, check for updates during install, or register your copy with the supplier based on account information entered during install.

This is why you block access to the internet in a browser rather than the installer itself. The installer will still be able to fetch what it needs...it just won't be able to cause a browser to fetch a page from a remote server.

kyrathaba

  • N.A.N.Y. Organizer
  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 3,120
    • View Profile
    • Donate to Member
Quote
For me the annoying part is when you upgrade and the installer insists you first uninstall the old version. Then it pops up a web page asking you why you are uninstalling.  Duh!!

And really, there's no reason (or at least there's seldom any reason) that a developer should insist that the user uninstall a previous version of a application first, before installing a newer version.  Not when scriptable installers can automatically uninstall any detected old version before installing the new one.

In my last several projects I've used Inno Setup to create the installer, and the apps themselves have an Update button.  When an update is detected, and the user chooses to download and run it, the updated installer automatically uninstalls the older version silently, without requiring so much as a click by the user.

I guess my whole point being that competent (and thoughtful) programmers won't create extra work for the end-user when they can automate a task programmatically.

Admittedly, there may be times when it's not desirable to uninstall an older version of an app (say, when you want to install multiple side-by-side versions of a program).

Ath

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 2,790
    • View Profile
    • Donate to Member
the user chooses to download and run it, the updated installer automatically uninstalls the older version silently,

That is normally not needed. Nearly nothing needs an uninstall before an update. You know where you are coming from, application-wise, and where you are going to, so just updating the files that are new should be enough.
That the standard Visual Studio setup project does that, doesn't mean it useful for anything, it's just pure laziness of the MS guys, and meant as an opportunity to sell you a 'real' installer builder like Wise or Installshield. But as you already found out, Inno Setup can do what you need most of the time, easier and with a smaller footprint :) (And yes, I'm an Inno Setup fan, though I also work with Installshield stuff)

MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7,290
    • View Profile
    • Miles Ahead Software
    • Donate to Member
I like Inno myself.  Esp. if you program in Pascal, if there isn't an Inno function to do something it's nearly as easy to do it in Pascal script. I may go back to it once the "portable" fad passes. :)

selyb

  • Participant
  • Joined in 2011
  • *
  • default avatar
  • Posts: 2
    • View Profile
    • Donate to Member
How about this...
Add an entry to the context menu for *.exe and *.msi called Install
this entry would call a script that
1) check the path to default browser
2) add an entry to "ImageFileExecutionOptions" for a dummy.exe for the debugger
3) if the default browser isn't IE then add another entry for iexplore.exe
4) run the installer as per usual
5) remove the "ImageFileExecutionOptions" entries created above


I suppose the script should check for existing entries in ImageFileExecutionOptions and if any exist then back them up and restore them at the end