====== Adobe Air 3.0.0.4080 ======
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 \\
The installation file can be downloaded from: http://get.adobe.com/de/air/ \\
**Attention:** This script calls a subfunction for the exitcodes from %ScriptDrive%\install\check_exitcode\check_msi-exitcode.ins
Installation Script for Adobe Air \\
Uninstallation Script for Adobe Air Versions 2.5.1.17730 - 3.0.0.4080 \\
This script uses the check_msi-exitcode script: https://forum.opsi.org/wiki/userspace:check_msi-exitcode \\
To extract the msi file from AdobeAIRInstaller.exe execute the file and wait for the first dialog to appear. Do not continue the installation. \\
Open the temp folder of your user profile and copy the complete content of the temporary installation folder (named something like AIR75.tmp) to "%SCRIPTPATH%\Files" \\
Another way to extract the msi file would be to simply extract it from the downloaded installer via a tool like 7-Zip.
**Tree**
CLIENT_DATA
├ Install.ins
├ Uninstall.ins
├ SubUninstall.ins
├ adobe_air.png
└ Files
└ setup.msi
==== Install.ins ====
[Initial]
;Standard Text, shown during installation
Message = Bitte warten, das Produkt wird installiert
;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 Air"
;complete name of product incl. versionno.
DefVar $ProductNameFull1$
set $ProductNameFull1$ = "Adobe Air 3.0.0.4080"
;filename of productpicture with extension
DefVar $ProductPicture$
Set $ProductPicture$ = "adobe_air.png"
;filename of MSI-package which has to be installed
DefVar $Executable1$
Set $Executable1$ = "setup.msi"
;the variable for the ExitCode
DefVar $ExitCode$
;Check the winst-version
requiredWinstVersion >= "4.11"
;show $ProductPicture$ and $ProductName$
ShowBitmap /3 "%scriptpath%\" + $ProductPicture$ $ProductName$
;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" )
;Deinstall of old versions
sub "%ScriptPath%\SubUninstall.ins"
Message "Installiere "+$ProductNameFull1$
Winbatch_Install
sub "%ScriptDrive%\install\check_exitcode\check_msi-exitcode.ins"
else
LogError "Kein kompatibles Betriebssystem installiert"
isFatalError
endif
[Winbatch_Install]
msiexec /i "%SCRIPTPATH%\Files\$Executable1$" /qb-!
==== 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]
;Name of product (max. 12 columns)
DefVar $ProductName$
Set $ProductName$ = "Adobe Air"
;filename of productpicture with extension
DefVar $ProductPicture$
Set $ProductPicture$ = "adobe_air.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 of deinstallation
DefVar $UninstallCommand$
;Variable for the diffrent versions gotten from the registry
DefVar $DisplayName$
;deinstall Adobe Air 2.5.1.17730, if found in Registry
Set $DisplayName$ = GetRegistrystringvalue32("[HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{46C045BF-2B3F-4BC4-8E4C-00E0CF8BD9DB}] DisplayName")
if not ($DisplayName$ = "")
Message "Deinstalliere "+$DisplayName$
set $UninstallCommand$ = "MsiExec.exe /x {46C045BF-2B3F-4BC4-8E4C-00E0CF8BD9DB} /qb-! REBOOT=ReallySuppress"
Winbatch_Uninstall
sub "%ScriptDrive%\install\check_exitcode\check_msi-exitcode.ins"
endif
;deinstall Adobe Air 2.6.0.19120, if found in Registry
Set $DisplayName$ = GetRegistrystringvalue32("[HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{AFF7E080-1974-45BF-9310-10DE1A1F5ED0}] DisplayName")
if not ($DisplayName$ = "")
Message "Deinstalliere "+$DisplayName$
set $UninstallCommand$ = "MsiExec.exe /x {AFF7E080-1974-45BF-9310-10DE1A1F5ED0} /qb-! REBOOT=ReallySuppress"
Winbatch_Uninstall
sub "%ScriptDrive%\install\check_exitcode\check_msi-exitcode.ins"
endif
;deinstall Adobe Air 2.6.0.19140, if found in Registry
Set $DisplayName$ = GetRegistrystringvalue32("[HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{AFF7E080-1974-45BF-9310-10DE1A1F5ED0}] DisplayName")
if not ($DisplayName$ = "")
Message "Deinstalliere "+$DisplayName$
set $UninstallCommand$ = "MsiExec.exe /x {AFF7E080-1974-45BF-9310-10DE1A1F5ED0} /qb-! REBOOT=ReallySuppress"
Winbatch_Uninstall
sub "%ScriptDrive%\install\check_exitcode\check_msi-exitcode.ins"
endif
;deinstalll Adobe Air 2.7.x.xxxxx, if found in Registry
Set $DisplayName$ = GetRegistrystringvalue32("[HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{FDB3B167-F4FA-461D-976F-286304A57B2A}] DisplayName")
if not ($DisplayName$ = "")
Message "Deinstalliere "+$DisplayName$
set $UninstallCommand$ = "MsiExec.exe /x {FDB3B167-F4FA-461D-976F-286304A57B2A} /qb-! REBOOT=ReallySuppress"
Winbatch_Uninstall
sub "%ScriptDrive%\install\check_exitcode\check_msi-exitcode.ins"
endif
;deinstall Adobe Air 3.0.0.4080, if found in Registry
Set $DisplayName$ = GetRegistrystringvalue32("[HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{ACEB2BAF-96DF-48FD-ADD5-43842D4C443D}] DisplayName")
if not ($DisplayName$ = "")
Message "Deinstalliere "+$DisplayName$
set $UninstallCommand$ = "MsiExec.exe /x {ACEB2BAF-96DF-48FD-ADD5-43842D4C443D} /qb-! REBOOT=ReallySuppress"
Winbatch_Uninstall
sub "%ScriptDrive%\install\check_exitcode\check_msi-exitcode.ins"
endif
[Winbatch_Uninstall]
$UninstallCommand$