Difference between revisions of "Google earth"
m (→WPKG Installer: GE 6.2...) |
(upgrade to 7.1.2) |
||
Line 1: | Line 1: | ||
This is a silent installer and uninstaller for Google Earth. | This is a silent installer and uninstaller for Google Earth. | ||
− | = Version 5.x = | + | = Version 5.x-7.x = |
==Download== | ==Download== | ||
Line 20: | Line 20: | ||
id="googleearth" | id="googleearth" | ||
name="Google Earth" | name="Google Earth" | ||
− | revision=" | + | revision="%VERSION%" |
reboot="false" | reboot="false" | ||
priority="10"> | priority="10"> | ||
+ | <variable name="VERSION" value="7.1.2" /> | ||
<check type="uninstall" condition="exists" path="Google Earth" /> | <check type="uninstall" condition="exists" path="Google Earth" /> | ||
<install cmd='%COMSPEC% /C "md %SystemDrive%\netinst\logs\"' > <!-- install fails if log dir doesn't exist --> | <install cmd='%COMSPEC% /C "md %SystemDrive%\netinst\logs\"' > <!-- install fails if log dir doesn't exist --> | ||
Line 29: | Line 30: | ||
<exit code="1" /> <!-- directory already exists --> | <exit code="1" /> <!-- directory already exists --> | ||
</install> | </install> | ||
− | <install cmd='msiexec / | + | <install cmd='msiexec /qn /l* %SystemDrive%\netinst\logs\googleearth.txt /i "%SOFTWARE%\googleearth\google earth.msi" ALLUSERS=1' /> |
− | <upgrade cmd='msiexec / | + | <upgrade cmd='msiexec /qn /l* %SystemDrive%\netinst\logs\googleearth.txt /i "%SOFTWARE%\googleearth\google earth.msi" ALLUSERS=1' /> |
− | <remove cmd='MsiExec.exe / | + | <remove cmd='MsiExec.exe /qn /x {4D2A6330-2F8B-11E3-9C40-B8AC6F97B88E}' > |
<!-- | <!-- | ||
For other versions check out the line beginning "ProductCode=" from Setup.ini in same directory as google earth.msi. | For other versions check out the line beginning "ProductCode=" from Setup.ini in same directory as google earth.msi. |
Revision as of 14:22, 11 February 2014
This is a silent installer and uninstaller for Google Earth.
Contents
Version 5.x-7.x
Download
Current Download (5.2.21.1588): http://dl.google.com/earth/client/advanced/current/GoogleEarthWin.exe
Older Release 5.2: http://dl.google.com/earth/client/GE5/release_5_2_1/GoogleEarth-Win-Bundle-5.2.1.1329.exe
Older Release 5.1: http://cache.pack.google.com/edgedl/earth/client/GE5/release_5_1_0/GoogleEarth-Win-Bundle-5.1.7938.4346.exe
Older Release 5.1: http://dl.google.com/earth/client/GE5/release_5_1_0/googleearth-Win-5.1.3509.4636.exe
Older Release 5.1: http://dl.google.com/earth/client/GE5/release_5_1_0/GoogleEarth-Win-5.1.3506.3999.exe
Older Release 5.0: http://dl.google.com/earth/client/GE5/release_5_0/GoogleEarth-Win-Plus-5.0.11337.1968.exe
and http://cache.pack.google.com/edgedl/earth/client/GE5/release_5_0_1/GoogleEarth-Win-Plus-5.0.11733.9347.exe
MSI
To get the Google Earth.msi file, extract it from the .exe installer file using an unzip program, or use the .exe installer's '/A' command line option to perform a installation to a network share.
WPKG Installer
<package
id="googleearth"
name="Google Earth"
revision="%VERSION%"
reboot="false"
priority="10">
<variable name="VERSION" value="7.1.2" />
<check type="uninstall" condition="exists" path="Google Earth" />
<install cmd='%COMSPEC% /C "md %SystemDrive%\netinst\logs\"' > <!-- install fails if log dir doesn't exist -->
<exit code="0" />
<exit code="1" /> <!-- directory already exists -->
</install>
<install cmd='msiexec /qn /l* %SystemDrive%\netinst\logs\googleearth.txt /i "%SOFTWARE%\googleearth\google earth.msi" ALLUSERS=1' />
<upgrade cmd='msiexec /qn /l* %SystemDrive%\netinst\logs\googleearth.txt /i "%SOFTWARE%\googleearth\google earth.msi" ALLUSERS=1' />
<remove cmd='MsiExec.exe /qn /x {4D2A6330-2F8B-11E3-9C40-B8AC6F97B88E}' >
<!--
For other versions check out the line beginning "ProductCode=" from Setup.ini in same directory as google earth.msi.
-->
<exit code="0" />
<exit code="1605" reboot="true" />
</remove>
</package>
Version Check
To implement a check type between versions you should be aware that Google frequently changes the path to the executable between versions.
5.1.X
<check type='file' condition='versionequalto' path='c:\program files\google\google earth\client\googleearth.exe' value='5.1.XXXX.XXXX' />
5.0.X
<check type='file' condition='versionequalto' path='c:\program files\google\google earth\googleearth.exe' value='5.0.XXXX.XXXX' />
Corresponding upgrade commands should first uninstall 5.0, then install 5.1:
<upgrade cmd='MsiExec.exe /X{CC016F21-3970-11DE-B878-005056806466} /quiet /norestart' />
<upgrade cmd='msiexec /i "%SOFTWARE%\GoogleEarth-Plus-5.1.3533.17131\google earth.msi" /qn ALLUSERS=2' />
Version 4.2.198.2451
I used the following commands:
<?xml version="1.0" encoding="utf-8" ?>
<packages>
<package id='GoogleEarth' name='Google Earth' revision='421982451' priority='50' reboot='true' >
<!-- Google Earth -->
<check type='uninstall' condition='exists' path='Google Earth' />
<install cmd='"%SOFTWARE%\Google Earth v.4.2.198.2451\Google_Earth_BZXD.exe" /S /v/qn' />
<install cmd='"%SOFTWARE%\Google Earth v.4.2.198.2451\postinstall.cmd"' />
<remove cmd='msiexec.exe /qn /x{407B9B5C-DAC5-4F44-A756-B57CAB4E6A8B}' />
<upgrade cmd='"%SOFTWARE%\Google Earth v.4.2.198.2451\Google_Earth_BZXD.exe" /S /v/qn' />
<upgrade cmd='"%SOFTWARE%\Google Earth v.4.2.198.2451\postinstall.cmd"' />
<depends package-id='shortcut' />
</package>
</packages>
While using the following postinstall.cmd:
@echo off
echo Create shortcut
set PRGPATH="%ALLUSERSPROFILE%"
Shortcut.exe "/f:%ALLUSERSPROFILE%\StartmenÂ\Programme\Google Earth.lnk" /a:c /t:^%%ProgramFiles^%%"\Google\Google Earth\googleearth.exe" /w:^%%ProgramFiles^%%"\Google\Google Earth"
Shortcut.exe "/f:%ALLUSERSPROFILE%\Start Menu\Programs\Google Earth.lnk" /a:c /t:^%%ProgramFiles^%%"\Google\Google Earth\googleearth.exe" /w:^%%ProgramFiles^%%"\Google\Google Earth"
REM exit 0
This will create the shourtcuts within the all users profile since google earth will install them only to the current user. So in case you run WPKG using WPKG-Client it installs it to the SYSTEM user start menu only and the icons will never appear somewhere.
NOTE: For this to work you need the shortcut.exe tool.
NOTE: For version ending with BZXD you can use the command
Google_Earth_BZXD.exe /S /v"/qb ALLUSERS=2"
This will put the shortcut in the all users profile