This is an old revision of the document!
Used the Scripts for Adobe Flash installation by Der-Matze as the starting point.
Improved it so that just one script is necessary and a product property is used to decide if it should be installed for IE or other browsers.
Tested with opsi 4.0.1
Tested with opsi-winst 4.11.1.6
Tested with Windows 7 Professional 32 and 64 Bit
Installation Script for Adobe Flash ActiveX 11.0.2.202.233 with custom settings file
Uninstallation Script for Adobe Flash ActiveX Versions 10.0.45.2 - 11.0.2.202.233
The installation files can be downloaded from: http://www.adobe.com/special/products/flashplayer/fp_distribution3.html (You may need to apply for a distribution license!)
Note: settings.sol can be found in “%UserProfileDir%\Anwendungsdaten\Macromedia\Flash Player\macromedia.com\support\flashplayer\sys\” and customized via Control Panel\Flash Player. You might have to run the configuration in the Control Panel before the file is created.
[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 ;Variable zur Ermittlung der Systemarchitektur DefVar $SystemType$ Set $SystemType$ = GetSystemType ;Name des Produkts (max. 12 Zeichen) DefVar $ProductName$ Set $ProductName$ = "Adobe Flash" ;Vollständiger Produktname incl. Versionsnummer DefVar $ProductNameFull1$ set $ProductNameFull1$ = "Adobe Flash 11.0.2.202.233 Plugin" ;Dateiname des Produktbildes mit Erweiterung DefVar $ProductPicture$ Set $ProductPicture$ = "Adobe Flash.png" ;Selektiert, ob das Plugin fuer IE oder andere Browser installiert werden soll DefVar $BrowserType$ DefVar $Executable1$ DefVar $Executable2$ Set $BrowserType$ = GetProductProperty("browsertype","IE") ;Dateinamen der zu installierenden MSI-Pakete if ($BrowserType$ = "IE") Set $Executable1$ = "install_flash_player_11_active_x_32bit.msi" Set $Executable2$ = "install_flash_player_11_active_x_64bit.msi" else Set $Executable1$ = "install_flash_player_11_plugin_32bit.msi" Set $Executable2$ = "install_flash_player_11_plugin_64bit.msi" endif ;Die Variable zur Auswertung des ExitCodes DefVar $ExitCode$ ;Prüfen der Winst Version requiredWinstVersion >= "4.11" ;$ProductPicture$ und $ProductName$ anzeigen ShowBitmap /3 "%scriptpath%\" + $ProductPicture$ $ProductName$ ;Anzeigen der Installationsbenachrichtigung incl. des vollen Produktnamens Message "Installiere "+$ProductNameFull1$ ;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" ) if $SystemType$ = "x86 System" Winbatch_Install_32-Bit sub "%ScriptDrive%\install\check_exitcode\check_msi-exitcode.ins" endif if $SystemType$ = "64 Bit System" Winbatch_Install_64-Bit sub "%ScriptDrive%\install\check_exitcode\check_msi-exitcode.ins" endif if ( $NTVersion$ = "Win2K" OR $NTVersion$ = "WinXP" OR $NTVersion$ = "Win NT 5.2" ) Files_Copy_AllUsers_WinNT5x /AllNTUserProfiles endif if ( $NTVersion$ = "Windows Vista" ) Files_Copy_AllUsers_WinNT6x /AllNTUserProfiles endif else LogError "Kein kompatibles Betriebssystem installiert" isFatalError endif [Winbatch_Install_32-Bit] msiexec /i "%SCRIPTPATH%\$Executable1$" /qb-! reboot=reallysuppress [Winbatch_Install_64-Bit] msiexec /i "%SCRIPTPATH%\$Executable2$" /qb-! reboot=reallysuppress [Files_Copy_AllUsers_WinNT5x] ;Konfigurationsdatei in alle Userprofile kopieren copy -s "%SCRIPTPATH%\settings.sol" "%UserProfileDir%\Anwendungsdaten\Macromedia\Flash Player\macromedia.com\support\flashplayer\sys\" [Files_Copy_AllUsers_WinNT6x] ;Konfigurationsdatei in alle Userprofile kopieren copy -s "%SCRIPTPATH%\settings.sol" "%UserProfileDir%\AppData\Roaming\Macromedia\Flash Player\macromedia.com\support\flashplayer\sys\"