Table of Contents

Adobe Shockwave 11.6.1.629

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 Script for Adobe Shockwave Player with some Program Settings changed in Registry
Uninstallation Script for Adobe Shockwave Player Versions 11.5.6.606 - 11.6.1.629

This script uses the check_msi-exitcode script: https://forum.opsi.org/wiki/userspace:check_msi-exitcode

The installation files can be downloaded from: http://www.adobe.com/products/shockwaveplayer/shwv_distribution3.html (You may need to apply for a distribution license!)

Install.ins

[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$ = "Shockwave"
 
 
 
 
 
 
 
;Vollständiger Produktname incl. Versionsnummer
 
	DefVar $ProductNameFull1$
 
		set $ProductNameFull1$ = "Adobe Shockwave 11.6.1.629"
 
 
 
 
 
 
 
;Dateiname des Produktbildes mit Erweiterung
 
	DefVar $ProductPicture$
 
		Set $ProductPicture$ = "ShockWave.png"
 
 
 
 
 
 
 
;Dateinamen der zu installierenden MSI-Pakete
 
	DefVar $Executable1$
 
		Set $Executable1$ = "sw_lic_full_installer.msi"
 
 
 
 
 
 
 
;Die Variable zur Auswertung des ExitCodes
 
	DefVar $ExitCode$
 
 
 
 
 
 
 
;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" )
 
 
 
 
 
 
 
		Winbatch_Install
 
			sub "%ScriptDrive%\install\check_exitcode\check_msi-exitcode.ins"
 
		Registry_Global /32Bit
 
 
 
 
 
 
 
	else
 
		LogError "Kein kompatibles Betriebssystem installiert"
 
			isFatalError
 
	endif
 
 
 
 
 
 
 
 
 
 
 
[Winbatch_Install]
 
 
 
	msiexec /i "%SCRIPTPATH%\$Executable1$" /qb-! allusers=2 reboot=reallysuppress
 
 
 
 
 
 
 
[Registry_Global]
 
 
 
	OpenKey [HKLM\SOFTWARE\Adobe\Shockwave 11\AutoUpdate]
 
		Set "" = REG_SZ:"n"
 
 
 
	OpenKey [HKLM\SOFTWARE\Adobe\Shockwave 11\collectstats]
 
		Set "" = REG_SZ:"n"
 
 
 
	OpenKey [HKLM\SOFTWARE\Adobe\Shockwave 11\uicontrol\AlwaysRegister]
 
		Set "" = REG_SZ:"n"
 
 
 
	OpenKey [HKLM\SOFTWARE\Adobe\Shockwave 11\uicontrol\CollectStatistics]
 
		Set "" = REG_SZ:"n"
 
 
 
	OpenKey [HKLM\SOFTWARE\Adobe\Shockwave 11\uicontrol\DefaultAllowMMMail]
 
		Set "" = REG_SZ:"n"
 
 
 
	OpenKey [HKLM\SOFTWARE\Adobe\Shockwave 11\uicontrol\DoMandatoryUpdates]
 
		Set "" = REG_SZ:"n"
 
 
 
	OpenKey [HKLM\SOFTWARE\Adobe\Shockwave 11\uicontrol\OfferOptionalUpdates]
 
		Set "" = REG_SZ:"n"
 
 
 
	OpenKey [HKLM\SOFTWARE\Adobe\Shockwave 11\uicontrol\PingEnabled]
 
		Set "" = REG_SZ:"n"
 
 
 
	OpenKey [HKLM\SOFTWARE\Adobe\Shockwave 11\uicontrol\ShowRegisterDialog]
 
		Set "" = REG_SZ:"n"
 
 
 
	OpenKey [HKLM\SOFTWARE\Adobe\Shockwave 11\uicontrol\defaultautoupdate]
 
		Set "" = REG_SZ:"n"
 
 
 
	OpenKey [HKLM\SOFTWARE\Adobe\Shockwave 11\uicontrol\defaultcollectstats]
 
		Set "" = REG_SZ:"n"
 
 
 
	OpenKey [HKLM\SOFTWARE\Macromedia\Shockwave 10\AutoUpdate]
 
		Set "" = REG_SZ:"n"
 
 
 
	OpenKey [HKLM\SOFTWARE\Macromedia\Shockwave 10\CollectStatistics]
 
		Set "" = REG_SZ:"n"
 
 
 
	OpenKey [HKLM\SOFTWARE\Macromedia\Shockwave 10\collectstats]
 
		Set "" = REG_SZ:"n"
 
 
 
	OpenKey [HKLM\SOFTWARE\Macromedia\Shockwave 10\uicontrol\AlwaysRegister]
 
		Set "" = REG_SZ:"n"
 
 
 
	OpenKey [HKLM\SOFTWARE\Macromedia\Shockwave 10\uicontrol\CollectStatistics]
 
		Set "" = REG_SZ:"n"
 
 
 
	OpenKey [HKLM\SOFTWARE\Macromedia\Shockwave 10\uicontrol\DefaultAllowMMMail]
 
		Set "" = REG_SZ:"n"
 
 
 
	OpenKey [HKLM\SOFTWARE\Macromedia\Shockwave 10\uicontrol\DoMandatoryUpdates]
 
		Set "" = REG_SZ:"n"
 
 
 
	OpenKey [HKLM\SOFTWARE\Macromedia\Shockwave 10\uicontrol\OfferOptionalUpdates]
 
		Set "" = REG_SZ:"n"
 
 
 
	OpenKey [HKLM\SOFTWARE\Macromedia\Shockwave 10\uicontrol\PingEnabled]
 
		Set "" = REG_SZ:"n"
 
 
 
	OpenKey [HKLM\SOFTWARE\Macromedia\Shockwave 10\uicontrol\defaultautoupdate]
 
		Set "" = REG_SZ:"n"
 
 
 
	OpenKey [HKLM\SOFTWARE\Macromedia\Shockwave 10\uicontrol\defaultcollectstats]
 
		Set "" = REG_SZ:"n"

Uninstall.ins

[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$ = "Shockwave"
 
 
 
 
 
 
 
;Dateiname des Produktbildes mit Erweiterung
 
	DefVar $ProductPicture$
 
		Set $ProductPicture$ = "ShockWave.png"
 
 
 
 
 
 
 
;Die Variable zur Auswertung des ExitCodes
 
	DefVar $ExitCode$
 
 
 
 
 
 
 
;$ProductPicture$ und $ProductName$ anzeigen
 
	ShowBitmap /3 "%scriptpath%\" + $ProductPicture$ $ProductName$
 
 
 
 
 
 
 
 
 
 
 
sub "%ScriptPath%\SubUninstall.ins"

SubUninstall.ins

;Variable für den msiexec Aufruf zur Deinstallation
	DefVar $UninstallCommand$
 
 
 
;Variable für die jeweilige Version. Wird aus der Registry ausgelesen
	DefVar $DisplayName$
 
 
 
 
 
;Adobe Shockwave 11.5.6.606 deinstallieren, wenn es in der Registry gefunden wurde
	Set $DisplayName$ = GetRegistrystringvalue32("[HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{9A9F7268-3899-4443-B071-B332493925AA}] DisplayName")
		if not ($DisplayName$ = "")
 
			Message "Deinstalliere "+$DisplayName$
				set $UninstallCommand$ = "MsiExec.exe /x {9A9F7268-3899-4443-B071-B332493925AA} /qb-!"
					Winbatch_Uninstall
						sub "%ScriptDrive%\install\check_exitcode\check_msi-exitcode.ins"
 
		endif
 
 
 
;Adobe Shockwave 11.5.7.609 deinstallieren, wenn es in der Registry gefunden wurde
	Set $DisplayName$ = GetRegistrystringvalue32("[HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{9ECF7817-DB11-4FBA-9DF1-296A578D513A}] DisplayName")
		if not ($DisplayName$ = "")
 
			Message "Deinstalliere "+$DisplayName$
				set $UninstallCommand$ = "MsiExec.exe /x {9ECF7817-DB11-4FBA-9DF1-296A578D513A} /qb-!"
					Winbatch_Uninstall
						sub "%ScriptDrive%\install\check_exitcode\check_msi-exitcode.ins"
 
		endif
 
 
 
;Adobe Shockwave 11.5.8.612 deinstallieren, wenn es in der Registry gefunden wurde
	Set $DisplayName$ = GetRegistrystringvalue32("[HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{3B834B54-EC4B-48E2-BFC6-03FF5DA06F62}] DisplayName")
		if not ($DisplayName$ = "")
 
			Message "Deinstalliere "+$DisplayName$
				set $UninstallCommand$ = "MsiExec.exe /x {3B834B54-EC4B-48E2-BFC6-03FF5DA06F62} /qb-!"
					Winbatch_Uninstall
						sub "%ScriptDrive%\install\check_exitcode\check_msi-exitcode.ins"
 
		endif
 
 
 
;Adobe Shockwave 11.5.9.615 deinstallieren, wenn es in der Registry gefunden wurde
	Set $DisplayName$ = GetRegistrystringvalue32("[HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{ECCA150B-31A5-412E-B8D0-4CB5DDA900D3}] DisplayName")
		if not ($DisplayName$ = "")
 
			Message "Deinstalliere "+$DisplayName$
				set $UninstallCommand$ = "MsiExec.exe /x {ECCA150B-31A5-412E-B8D0-4CB5DDA900D3} /qb-!"
					Winbatch_Uninstall
						sub "%ScriptDrive%\install\check_exitcode\check_msi-exitcode.ins"
 
		endif
 
 
 
;Adobe Shockwave 11.5.10.620 deinstallieren, wenn es in der Registry gefunden wurde
	Set $DisplayName$ = GetRegistrystringvalue32("[HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{73868DD9-CC9A-4F7F-B708-99F096DEAB6D}] DisplayName")
		if not ($DisplayName$ = "")
 
			Message "Deinstalliere "+$DisplayName$
				set $UninstallCommand$ = "MsiExec.exe /x {73868DD9-CC9A-4F7F-B708-99F096DEAB6D} /qb-!"
					Winbatch_Uninstall
						sub "%ScriptDrive%\install\check_exitcode\check_msi-exitcode.ins"
 
		endif
 
 
 
;Adobe Shockwave 11.6.0.626 deinstallieren, wenn es in der Registry gefunden wurde
	Set $DisplayName$ = GetRegistrystringvalue32("[HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{D84A070E-2A31-464A-9830-39FAB5761D62}] DisplayName")
		if not ($DisplayName$ = "")
 
			Message "Deinstalliere "+$DisplayName$
				set $UninstallCommand$ = "MsiExec.exe /x {D84A070E-2A31-464A-9830-39FAB5761D62} /qb-!"
					Winbatch_Uninstall
						sub "%ScriptDrive%\install\check_exitcode\check_msi-exitcode.ins"
 
		endif
 
 
 
;Adobe Shockwave 11.6.1.629 deinstallieren, wenn es in der Registry gefunden wurde
	Set $DisplayName$ = GetRegistrystringvalue32("[HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{FF2A5498-4EFE-430F-A138-7EB365DBEBAD}] DisplayName")
		if not ($DisplayName$ = "")
 
			Message "Deinstalliere "+$DisplayName$
				set $UninstallCommand$ = "MsiExec.exe /x {FF2A5498-4EFE-430F-A138-7EB365DBEBAD} /qb-!"
					Winbatch_Uninstall
						sub "%ScriptDrive%\install\check_exitcode\check_msi-exitcode.ins"
 
		endif
 
 
 
 
 
[Winbatch_Uninstall]
 
	$UninstallCommand$