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

前端 未结 5 858
野趣味
野趣味 2021-02-08 07:01

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 th

5条回答
  •  一整个雨季
    2021-02-08 07:36

    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.

提交回复
热议问题