User Tools

Site Tools


userspace:google_chrome

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

userspace:google_chrome [2011/10/11 10:23]
Der-Matze created
userspace:google_chrome [2021/08/23 08:37]
Line 1: Line 1:
-====== Google Chrome 14.0.835.202 ====== 
-Script by Der-Matze \\ 
-Comments and improvements welcome \\ 
  
-Tested with opsi 4.0.1 \\ 
-Tested with opsi-winst 4.10.x - 4.11.1.6 \\ 
-Tested with Windows XP Professional and Windows 7 Enterprise x64 \\ 
- 
-Installation / Uninstallation Script for Google Chrome with some customizations in registry and the master_preferences file. \\ 
- 
-This script uses the check_msi-exitcode script: https://forum.opsi.org/wiki/userspace:check_msi-exitcode \\ 
- 
-The installation file can be downloaded from: http://www.google.com/chrome/eula.html?msi=true (works only from a windows machine...) \\ 
- 
-Edit %ProgramFiles32Dir%\Google\Chrome\Application\master_preferences to your liking and copy it to %SCRIPTPATH%. 
- 
-==== Install.ins ==== 
- 
-<code winst> 
- 
-[Initial] 
- 
- 
- 
-;Standard Text, der während der Installation angezeigt wird 
- 
- Message = Bitte warten, das Produkt wird installiert 
- 
- 
- 
- 
- 
- 
- 
-;Loglevel einstellen 
- 
- setLogLevel = 6 
- 
- 
- 
- 
- 
- 
- 
-;Bei Fehlern abbrechen 
- 
- ExitOnError=false 
- 
- 
- 
- 
- 
- 
- 
-;Syntax Fehler werden in einem separaten Fenster angezeigt 
- 
- ScriptErrorMessages=on 
- 
- 
- 
- 
- 
- 
- 
-;Single-Step Mode nicht verwenden 
- 
- TraceMode=off 
- 
- 
- 
- 
- 
- 
- 
-;Im Batchmode das Winst-Fenster nicht im Vordergrund anzeigen 
- 
- StayOnTop=false 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
-[Actions] 
- 
- 
- 
-;Variable für die Ermittlung des Betriebssystems 
- 
- DefVar $OS$ 
- 
- set $OS$ = GetOS 
- 
- 
- 
- 
- 
- 
- 
-;Variable für die Ermittlung der Betriebssystem Unterversion 
- 
- DefVar $NTVersion$ 
- 
- set $NTVersion$ = GetNTVersion 
- 
- 
- 
- 
- 
- 
- 
-;Name des Produkts (max. 12 Zeichen) 
- 
- DefVar $ProductName$ 
- 
- Set $ProductName$ = "Chrome" 
- 
- 
- 
- 
- 
- 
- 
-;Dateiname des Produktbildes mit Erweiterung 
- 
- DefVar $ProductPicture$ 
- 
- Set $ProductPicture$ = "Chrome.png" 
- 
- 
- 
- 
- 
- 
- 
-;Die Variable zur Auswertung des ExitCodes 
- 
- DefVar $ExitCode$ 
- 
- 
- 
- 
- 
- 
- 
-;Vollständiger Produktname incl. Versionsnummer 
- 
- DefVar $ProductNameFull1$ 
- 
- set $ProductNameFull1$ = "Google Chrome 14.0.835.202" 
- 
- 
- 
- 
- 
- 
- 
-;Dateinamen der zu installierenden MSI-Pakete 
- 
- DefVar $Executable1$ 
- 
- Set $Executable1$ = "GoogleChromeStandaloneEnterprise.msi" 
- 
- 
- 
- 
- 
- 
- 
-;Anzeigen der Installationsbenachrichtigung incl. des vollen Produktnamens 
- 
- Message "Installiere "+$ProductNameFull1$ 
- 
- 
- 
- 
- 
- 
- 
-;Prüfen der Winst Version 
- 
- requiredWinstVersion >= "4.11" 
- 
- 
- 
- 
- 
- 
- 
-;$ProductPicture$ und $ProductName$ anzeigen 
- 
- ShowBitmap /3 "%scriptpath%\" + $ProductPicture$ $ProductName$ 
- 
- 
- 
- 
- 
- 
- 
-;Freien Speicherplatz ermitteln 
- 
- if not (HasMinimumSpace ("%SYSTEMDRIVE%", "500 MB")) 
- 
- LogError "Nicht genügend Platz auf %SYSTEMDRIVE%" 
- 
- isFatalError 
- 
- endif 
- 
- 
- 
- 
- 
- 
- 
-;OS-Version ermitteln 
- 
- if ( $NTVersion$ = "Win2K" OR $NTVersion$ = "WinXP" OR $NTVersion$ = "Win NT 5.2" OR $NTVersion$ = "Windows Vista" ) 
- 
- 
- 
- 
- 
- 
- 
- Message "Deinstallation alter Produktversionen" 
- 
- sub "%ScriptPath%\SubUninstall.ins" 
- 
- 
- 
- 
- 
- 
- 
- Message "Installiere "+$ProductNameFull1$ 
- 
- Winbatch_Install 
- 
- sub "%ScriptDrive%\install\check_exitcode\check_msi-exitcode.ins" 
- 
- 
- 
- LinkFolder_Custom 
- 
- Files_Copy 
- 
- Registry_Global /32Bit 
- 
- 
- 
- 
- 
- 
- 
- else 
- 
- LogError "Kein kompatibles Betriebssystem installiert" 
- 
- isFatalError 
- 
- endif 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
-[Winbatch_Install] 
- 
- 
- 
- msiexec.exe /i "%SCRIPTPATH%\$Executable1$" /qb-! 
- 
- 
- 
- 
- 
- 
- 
-[LinkFolder_Custom] 
- 
- 
- 
-;Startmenü anpassen 
- 
- set_basefolder common_programs 
- 
- set_subfolder "" 
- 
- delete_subfolder "Google Chrome" 
- 
- set_subfolder "" 
- 
- set_link 
- 
- name: Google Chrome 
- 
- target: "%ProgramFiles32Dir%\Google\Chrome\Application\chrome.exe" 
- 
- parameters: 
- 
- working_dir: "%ProgramFiles32Dir%\Google\Chrome\Application" 
- 
- icon_file: 
- 
- icon_index: 
- 
- end_link 
- 
- 
- 
- 
- 
- 
- 
-[Registry_Global] 
- 
- 
- 
- OpenKey [HKLM\Software\Policies\Google\Chrome] 
- 
- 
- 
- ;ProxyServerMode auf Manuell einstellen 
- 
- Set "ProxyServerMode" = REG_DWORD:0x00000002 
- 
- 
- 
- ;Adresse für Proxy Konfigurationsdatei eintragen 
- 
- Set "ProxyPacUrl" = REG_SZ:"http://proxy.your.domain/proxy.pac" 
- 
- 
- 
- ;Keine Statistiken an Google senden 
- 
- Set "MetricsReportingEnabled" = REG_DWORD:0x00000000 
- 
- 
- 
- ;Keine Daten-Synchronisation mit Google Diensten 
- 
- Set "SyncDisabled" = REG_DWORD:0x00000001 
- 
- 
- 
- 
- 
- 
- 
- OpenKey [HKLM\SOFTWARE\Policies\Google\Update] 
- 
- ;Auto Update deaktivieren 
- 
- Set "AutoUpdateCheckPeriodMinutes" = REG_DWORD:0x0000a8c0 
- 
- Set "DisableAutoUpdateChecksCheckboxValue" = REG_DWORD:0x00000001 
- 
- 
- 
- 
- 
- 
- 
-[Files_Copy] 
- 
- 
- 
- copy "%SCRIPTPATH%\master_preferences" "%ProgramFiles32Dir%\Google\Chrome\Application" 
- 
-</code> 
- 
-==== Uninstall.ins ==== 
- 
-<code winst> 
- 
-[Initial] 
- 
- 
- 
-;Standard Text, der während der Deinstallation angezeigt wird 
- 
- Message = Bitte warten, das Produkt wird deinstalliert 
- 
- 
- 
- 
- 
- 
- 
-;Loglevel einstellen 
- 
- setLogLevel = 6 
- 
- 
- 
- 
- 
- 
- 
-;Bei Fehlern abbrechen 
- 
- ExitOnError = false 
- 
- 
- 
- 
- 
- 
- 
-;Syntax Fehler werden in einem separaten Fenster angezeigt 
- 
- ScriptErrorMessages = on 
- 
- 
- 
- 
- 
- 
- 
-;Single-Step Mode nicht verwenden 
- 
- TraceMode = off 
- 
- 
- 
- 
- 
- 
- 
-;Im Batchmode das Winst-Fenster nicht im Vordergrund anzeigen 
- 
- StayOnTop = false 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
-[Actions] 
- 
- 
- 
-;Name des Produkts (max. 12 Zeichen) 
- 
- DefVar $ProductName$ 
- 
- Set $ProductName$ = "Chrome" 
- 
- 
- 
- 
- 
- 
- 
-;Dateiname des Produktbildes mit Erweiterung 
- 
- DefVar $ProductPicture$ 
- 
- Set $ProductPicture$ = "Chrome.png" 
- 
- 
- 
- 
- 
- 
- 
-;Die Variable zur Auswertung des ExitCodes 
- 
- DefVar $ExitCode$ 
- 
- 
- 
- 
- 
- 
- 
-;$ProductPicture$ und $ProductName$ anzeigen 
- 
- ShowBitmap /3 "%scriptpath%\" + $ProductPicture$ $ProductName$ 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
-sub "%ScriptPath%\SubUninstall.ins" 
- 
-</code> 
- 
-==== SubUninstall.ins ==== 
- 
-<code winst> 
- 
-;Variable für den msiexec Aufruf zur Deinstallation 
- DefVar $UninstallCommand$ 
- 
- 
- 
-;Variable für die jeweilige Version. Wird aus der Registry ausgelesen 
- DefVar $DisplayName$ 
- 
- 
- 
- 
- 
-;Google Chrome (alle Versionen) deinstallieren, wenn es in der Registry gefunden wurde 
- Set $DisplayName$ = GetRegistrystringvalue32("[HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{54DF35BD-4A36-35DA-B029-A0C083C88614}] DisplayName") 
- if not ($DisplayName$ = "") 
- 
- Message "Deinstalliere "+$DisplayName$ 
- set $UninstallCommand$ = "MsiExec.exe /x {54DF35BD-4A36-35DA-B029-A0C083C88614} /qb-!" 
- Winbatch_Uninstall 
- sub "%ScriptDrive%\install\check_exitcode\check_msi-exitcode.ins" 
- 
- endif 
- 
- 
- 
-Linkfolder_Custom 
- 
- 
- 
- 
- 
-[Winbatch_Uninstall] 
- 
- $UninstallCommand$ 
- 
- 
- 
-[Linkfolder_Custom] 
- 
-;Startmenü Verknüpfung löschen 
- Set_basefolder common_programs 
- Set_subfolder "" 
- delete_element "Google Chrome" 
- 
-</code> 
userspace/google_chrome.txt · Last modified: 2021/08/23 08:37 (external edit)