Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How does Google Chrome manage to execute installation automatically after download?

When you download google chrome one can check automatic install of exe. How to achieve that for win32 exe and .net exe ?

I wonder how they can do this since I thought this would be a violation security.

I went here http://omaha.googlecode.com/svn/wiki/OmahaOverview.html and read

New Install

User downloads a meta-installer from a Google website, going through standard browser file download steps. Once the user figures out how to launch the meta-installer, the meta-installer installs and runs the Omaha client. On Windows platforms, such as Windows Vista, with UAC, an elevation prompt is displayed when installing applications per-machine. The client then begins downloading and installing the app referenced by the micro reference.

But on a brand new machine I didn't install any meta-installer, still Chrome did install automatically. How is this possible ?

Seems it's a mystery: nobody has no real clue.

About ClickOnce as far as I can see User is shown a popup which asks confirmation, this is not the case of Google Chrome.

like image 288
user310291 Avatar asked Jun 06 '11 18:06

user310291


1 Answers

Google Chrome has a service that runs in the background to check for and apply upgrades. It is open source and you can use it for your applications as well.

As far as the original installation, there appears to be three methods that the download pages supports: "oneclick", "clickonce", and a plain old download. With the last one, you have to manually save and run the installer.

The first one appears to depend on if you have Google Desktop, Gears, or Toolbar installed. This link describes the installation of a Google Video Chat application, which uses a similar installation process.

When you click the button:

Then what the script exectued behind is:

window.google.update.oneclick.install (install via click)

and

location.href = http://dl.google.com/googletalk/googletalkplugin/GoogleVoiceAndVideoSetup.exe (install manually )

Note the first bit of script window.google , A new object for google, which is created as the result of any one of the above mentioned google services. My Chrome Browser (Since he is a new member) does not know about the window.google (he knows the default methods like window.location, window.document)

You can view the source of the Chrome installation page here, or using your browser. But you can see it uses a similar process.

It can fall back to the ClickOnce installation, which will most likely prompt the user before installing. But this depends on your security settings.

This actually appears to be duplicate of a Super User Question.

like image 152
CodeNaked Avatar answered Sep 26 '22 02:09

CodeNaked