====== Adobe Flash ActiveX & Plugin All in One Script 11.0.2.202.233 ====== Script by DaWo 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 11.0.2.202.233 \\ The .ins files will be placed in the default directories. The product property has to be added to the file OPSI/control or at the creation of the new package. 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.\\ **Tree:** CLIENT_DATA ├ Install.ins ├ Uninstall.ins ├ SubUninstall.ins ├ Adobe Flash.png ├ install_flash_player_11_active_x_32bit.msi ├ install_flash_player_11_active_x_64bit.msi ├ install_flash_player_11_plugin_32bit.msi ├ install_flash_player_11_plugin_64bit.msi └ settings.sol ==== Install.ins ==== [Initial] ;Standard Text, shown during installation Message = Bitte warten, das Produkt wird installiert ;Set Loglevel setLogLevel = 6 ;Stop on Errors ExitOnError = false ;Syntax Errors will be shown in a seperate window ScriptErrorMessages = on ;Don't use single-step mode TraceMode = off ;Don't show winst-window in foreground while batchmode StayOnTop = false [Actions] ;Variable for the OS DefVar $OS$ set $OS$ = GetOS ;Variable for the OS-subversion DefVar $NTVersion$ set $NTVersion$ = GetNTVersion ;Variable for the Systemarchitecture DefVar $SystemType$ Set $SystemType$ = GetSystemType ;Name of Product (max. 12 cols.) DefVar $ProductName$ Set $ProductName$ = "Adobe Flash" ;Complete Productname incl. versionnumber DefVar $ProductNameFull1$ set $ProductNameFull1$ = "Adobe Flash 11.0.2.202.233 Plugin" ;Filename of productpicture incl. extension DefVar $ProductPicture$ Set $ProductPicture$ = "Adobe Flash.png" ;Should ActiveX or Plugin be installed? DefVar $BrowserType$ DefVar $Executable1$ DefVar $Executable2$ Set $BrowserType$ = GetProductProperty("browsertype","ActiveX") ;Filenames of msi-packages, which have to be installed if ($BrowserType$ = "ActiveX") 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 ;Variable for checking the exitcode DefVar $ExitCode$ ;checking the Winst Version requiredWinstVersion >= "4.11" ; show $ProductPicture$ and $ProductName$ ShowBitmap /3 "%scriptpath%\" + $ProductPicture$ $ProductName$ ;show installationmessage incl. the full programname Message "Installiere "+$ProductNameFull1$ ;check free diskspace if not (HasMinimumSpace ("%SYSTEMDRIVE%", "500 MB")) LogError "Nicht genügend Platz auf %SYSTEMDRIVE%" isFatalError endif ;get OS-Version 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] ;copy conf-file to all userprofiles copy -s "%SCRIPTPATH%\settings.sol" "%UserProfileDir%\Anwendungsdaten\Macromedia\Flash Player\macromedia.com\support\flashplayer\sys\" [Files_Copy_AllUsers_WinNT6x] ;copy conf-file to all userprofiles copy -s "%SCRIPTPATH%\settings.sol" "%UserProfileDir%\AppData\Roaming\Macromedia\Flash Player\macromedia.com\support\flashplayer\sys\" ==== Uninstall.ins ==== [Initial] ;Standard Text, shown during installation Message = Bitte warten, das Produkt wird Deinstalliert ;Set Loglevel setLogLevel = 6 ;Stop when errors ExitOnError = false ;Syntax Fehler are shown in a seperate window ScriptErrorMessages = on ;Do not use Single-Step Mode TraceMode = off ;No winst-window in foreground while batchmode StayOnTop = false [Actions] ;Variable for the OS DefVar $OS$ Set $OS$ = GetOS ;Variable for the OS-subversion DefVar $NTVersion$ Set $NTVersion$ = GetNTVersion ;Name of product (max. 12 columns) DefVar $ProductName$ Set $ProductName$ = "Adobe Flash" ;filename of productpicture with extension DefVar $ProductPicture$ Set $ProductPicture$ = "Adobe Flash.png" ;the variable for the ExitCode DefVar $ExitCode$ ;show $ProductPicture$ and $ProductName$ ShowBitmap /3 "%scriptpath%\" + $ProductPicture$ $ProductName$ sub "%ScriptPath%\SubUninstall.ins" ==== SubUninstall.ins ==== ;Variable for msiexec-call for deinstallation DefVar $UninstallCommand$ ;Variable for the found version. Gotten by the redistry DefVar $DisplayName$ ;uninstall Adobe Flash ActiveX 11.0.2.202 64-Bit, if found in the Registry Set $DisplayName$ = GetRegistrystringvalue64("[HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{9E25236A-E313-4853-9C8C-DB7015E9F9C4}] DisplayName") if not ($DisplayName$ = "") set $UninstallCommand$ = "MsiExec.exe /x {9E25236A-E313-4853-9C8C-DB7015E9F9C4} /qb-! REBOOT=ReallySuppress" endif ;uninstall Adobe Flash Plugin 11.0.2.202 64-Bit, if found in the Registry Set $DisplayName$ = GetRegistrystringvalue64("[HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{1E4B6678-A507-4B6A-B6C7-FEE55FC0C14C}] DisplayName") if not ($DisplayName$ = "") set $UninstallCommand$ = "MsiExec.exe /x {1E4B6678-A507-4B6A-B6C7-FEE55FC0C14C} /qb-! REBOOT=ReallySuppress" endif ;uninstall Adobe Flash Plugin 11.0.2.202, if found in the Registry Set $DisplayName$ = GetRegistrystringvalue64("[HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{B2883418-71EB-4F63-97AB-222C67E99358}] DisplayName") if not ($DisplayName$ = "") set $UninstallCommand$ = "MsiExec.exe /x {B2883418-71EB-4F63-97AB-222C67E99358} /qb-! REBOOT=ReallySuppress" endif ;uninstall Adobe Flash Active X 11.0.2.202 32-Bit, if found in the Registry Set $DisplayName$ = GetRegistrystringvalue64("[HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{6B393C32-A8CE-4663-9D5B-EA75C8D1233C}] DisplayName") if not ($DisplayName$ = "") set $UninstallCommand$ = "MsiExec.exe /x {6B393C32-A8CE-4663-9D5B-EA75C8D1233C} /qb-! REBOOT=ReallySuppress" endif Message "Deinstalliere "+$DisplayName$ Winbatch_Uninstall sub "%ScriptDrive%\install\check_exitcode\check_msi-exitcode.ins" if ( $NTVersion$ = "Win2K" OR $NTVersion$ = "WinXP" OR $NTVersion$ = "Win NT 5.2" ) Files_Delete_AllUsers_WinNT5x /AllNTUserProfiles endif if ( $NTVersion$ = "Windows Vista" ) Files_Delete_AllUsers_WinNT6x /AllNTUserProfiles endif [Winbatch_Uninstall] $UninstallCommand$ [Files_Delete_AllUsers_WinNT5x] ;Konfigurationsordner in allen Userprofilen löschen delete -sf "%UserProfileDir%\Anwendungsdaten\Macromedia\" [Files_Delete_AllUsers_WinNT6x] ;Konfigurationsordner in allen Userprofilen löschen delete -sf "%UserProfileDir%\AppData\Roaming\Macromedia\" ==== OPSI/control ==== [ProductProperty] type: unicode name: browsertype multivalue: False editable: False description: Selects if ActiveX should be installed for IE or the plugin for plugin based browsers like Firefox values: ["ActiveX", "Plugin"] default: ["ActiveX"]