Setting Google Chrome as the default browser for Adobe AIR apps

UPDATE: Logan Buesching commented to say that Chrome apparently creates “ChromeHTML” shell\open keys except they’re in HKCR (which is why you get a UAC prompt, it’s the machine part of the registry), so you can actually just set HKCU\Software\Classes\.htm to ChromeHTML and you’re done. Logan also goes into more detail as to what’s going on so check out his post.

It seems odd that they end up creating a global HKCR key which ulitimately points to an app that’s installed in a user’s private profile. I’m sure this will cause issues if you have multiple people using your machine. Anyway, I guess this is all a bit moot: this is beta software kids, and I’m sure Google will fix this in due course by release and you may have to undo some of these registry shenanigans for it to work as expected.

Google Chrome was a big hit in the office today. To the extent that many of my colleagues were setting it as their default browser already, even though it’s a beta product. Cwazy.

Unfortunately even if you do click the “Make Google Chrome my default browser” button on the Options page, not all applications that launch hyperlinks comply. One of those is the Twitter client Twhirl, which is an Adobe AIR application (I’m assuming this is an issue with AIR itself rather than Twhirl doing something silly). I deduced what AIR was doing when trying to locate the default browser by using Sysinternals’ Process Monitor (ProcMon). It was using the current user’s “.htm” file association preference: which on my machine was pointing to FirefoxHTML. So I created a new registry key for GoogleChromeHTML that specified the location of chrome.exe as the file opener and pointed the “.htm” setting there, which did the trick.

To make this easier to replicate, and to save having to write tedious explanatory steps detailing exactly what to do – I’ve created a short JScript Windows Script file.

Save the following with a “*.js” file extension (e.g. ChromeDefaultForAIR.js) and run it:

var wshell = new ActiveXObject('WScript.Shell');
var chromePath = wshell.ExpandEnvironmentStrings('%USERPROFILE%\\Local Settings\\Application Data\\Google\\Chrome\\Application\\chrome.exe');
    '"' + chromePath + '" "%1"');

Normal caveats for editing your registry and downloading and running random scripts from some idiot’s blog apply. To revert, set HKCU\Software\Classes\.htm back to FirefoxHTML.

If it helps leave a note in the comments!

About these ads

11 Responses to Setting Google Chrome as the default browser for Adobe AIR apps

  1. Pingback: Adobe AIR / Firefox issue on Vista at Mike Chambers

  2. Thanks for the information! I was having a similar problem but with it not opening IE and opening Firefox. I just removed the HKCU\Software\Classes\.htm (and .html) registry entries and found that it fixed my issue.

  3. Also, just a note, instead of creating your own class, you can use the one in HKCR\Classes\ChromeHTML

  4. Cuprohastes says:

    Worked like a charm!

  5. Jon says:

    The script works perfectly!

  6. Pingback: Adobe Air Applications Not Opening Links In Default Browser [Fix]

  7. Ed Kless says:

    Great fix, thanks!

  8. michael says:

    is there any way to force opening the navigateToURL(..) of air in ie ? i need it because we are using activex which is working only there.. maybe some hack in air sources or anything ? please help

  9. Oliveira says:

    Thanks for the rich and detailed instructions, but I had no luck.. I got my keys updated and so on, but still AIR will only open links on ffx. The strangest thing is that my htmlfile keys are pointing ie!!! =oS

  10. Joe says:

    Except why would you want to use Google for anything? Google is an evil company. Everything you do, they track and save. Everything.

    Google Chrome looks like a Fisher Price browser. Firefox is much, much, better.

    Look into the business practices of Google and you will be amazed at the lack of privacy they offer. You need to rethink using Google. Don’t take my word for it, research it on your own and you will see.

    Use Bing, use Yahoo, use anything but Google and the world will be a much better place.


Get every new post delivered to your Inbox.

Join 38 other followers

%d bloggers like this: