By — Sapgui 2013/04/17 09:13
Folgend meine Skripte für die Silent-Installation von Adobe Acrobat 9 Standard & Professional sowie dem Abschalten der Updatefunktion. Falls jemand eine “Auswahlmöglichkeit” in einem OPSI-Paket zusammen bekommen hat - feel free to add and combine my scripts :) Und falls sich jemand dazu berufen fühlt: Ins Englische darf der Artikel natürlich auch übersetzt werden!
Tested with opsi 4.0.3.1
Tested with WinstVersion >= 4.11.2.9
Tested with Win XP SP3 32bit & Win7 Pro SP1 64bit
Um die Dateien zu erhalten - die unten aufgelistet sind - führt man die “Installer.exe” aus, die sich auf der CD oder im Download befindet. Der Installationsvorgang beginnt damit, dass man nach einem Speicherort für die Extraktion des eigentlichen Installers gefragt wird. Nach der Extraktion bricht man das Setup ab und hat im angegebenen Pfad die Dateien. Allerdings kann man sich die Datei “WindowsInstaller-KB893803-v2-x86.exe” sparen - da bei XP, Vista & Win7 bereits eine neuere Version installiert ist bzw. per Windows-Update installiert wird.
Meine OPSI_Workbench:
install.ins uninstall.ins FeatureLockDown.reg 1031.mst 1033.mst 1036.mst Abcpy.ini AcroStan.msi Data1.cab Setup.exe setup.ini
Der Lizenzkey wird über die Datei “Abcpy.ini” übergeben. In dieser Datei sucht man den OEM-Abschnitt:
[OEM Install] ISX_SERIALNUMBER=xxxx-xxxx-xxxx-xxxx-xxxx USERNAME=Name COMPANYNAME=Company ....
[Initial]
; Standard Text, der während der Installation angezeigt wird
Message=Bitte warten, Adobe Acrobat 9 Standard wird installiert...
; Abort on Errors:
ExitOnError=true
; Don't show syntax errors in the script:
ScriptErrorMessages=off
; Don't let started programs run in front of the winst window
StayOnTop=true
; Loglevel configuration
setLogLevel=6
[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
DefVar $Executable$
Set $Executable$ = "Setup.exe"
;Die Variable zur Auswertung des ExitCodes
DefVar $ExitCode$
;Prüfen der Winst Version
requiredWinstVersion >= "4.11"
;Freien Speicherplatz ermitteln
if not (HasMinimumSpace ("%SYSTEMDRIVE%", "1000 MB"))
LogError "Nicht genügend Platz auf %SYSTEMDRIVE%"
isFatalError
endif
Winbatch_Install
Winbatch_disable_update
sub_check_exitcode
[Winbatch_Install]
%SCRIPTPATH%\$Executable$ /sAll /rs /msi EULA_ACCEPT=YES
[Winbatch_disable_update]
Regedit /s %SCRIPTPATH%\FeatureLockDown.reg
[sub_check_exitcode]
comment "test for installation success via exit code"
set $ExitCode$ = getLastExitCode
; informations to exit codes see
; http://msdn.microsoft.com/en-us/library/aa372835(VS.85).aspx
; http://msdn.microsoft.com/en-us/library/aa368542.aspx
if ($ExitCode$ = "0")
comment "looks good: setup program gives exitcode zero"
else
comment "Setup program gives a exitcode unequal zero: "+$ExitCode$
if ($ExitCode$ = "1605")
comment "ERROR_UNKNOWN_PRODUCT 1605 This action is only valid for products that are currently installed."
comment "Uninstall of a not installed product failed - no problem"
else
if ($ExitCode$ = "1641")
comment "looks good: setup program gives exitcode 1641"
comment "ERROR_SUCCESS_REBOOT_INITIATED 1641 The installer has initiated a restart. This message is indicative of a success."
else
if ($ExitCode$ = "3010")
comment "looks good: setup program gives exitcode 3010"
comment "ERROR_SUCCESS_REBOOT_REQUIRED 3010 A restart is required to complete the install. This message is indicative of a success."
else
logError "Fatal: Setup program gives an unknown exitcode unequal zero: "+$ExitCode$
isFatalError
endif
endif
endif
endif
[Initial]
; Standard Text, der während der Installation angezeigt wird
Message=deinstalliere Adobe Acrobat 9 Standard
; Abort on Errors:
ExitOnError=true
; Don't show syntax errors in the script:
ScriptErrorMessages=off
; Don't let started programs run in front of the winst window
StayOnTop=true
; Loglevel configuration
setLogLevel=6
[Actions]
;Variable for the found version. Gotten by the redistry
DefVar $DisplayName$
;Aktionen aufrufen
Winbatch_produkt_silent_uninstall
[Winbatch_produkt_silent_uninstall]
;uninstall Adobe Acrobat 9 Std., if found in the Registry
Set $DisplayName$ = GetRegistrystringvalue("[HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{AC76BA86-1033-F400-BA7E-000000000004}] DisplayName")
if not ($DisplayName$ = "")
MsiExec.exe /x {AC76BA86-1033-F400-BA7E-000000000004} /qb-! REBOOT=ReallySuppress
endif
Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Adobe\Adobe Acrobat\9.0\FeatureLockDown] "bUpdater"=dword:00000000 "bRegisterProduct"=dword:00000000
Tested with opsi 4.0.3.1
Tested with WinstVersion >= 4.11.2.9
Tested with Win XP SP3 32bit & Win7 Pro SP1 64bit
Um die Dateien zu erhalten - die unten aufgelistet sind - führt man die “Installer.exe” aus, die sich auf der CD oder im Download befindet. Der Installationsvorgang beginnt damit, dass man nach einem Speicherort für die Extraktion des eigentlichen Installers gefragt wird. Nach der Extraktion bricht man das Setup ab und hat im angegebenen Pfad die Dateien. Allerdings kann man sich die Datei “WindowsInstaller-KB893803-v2-x86.exe” sparen - da bei XP, Vista & Win7 bereits eine neuere Version installiert ist bzw. per Windows-Update installiert wird.
Meine OPSI_Workbench:
install.ins uninstall.ins FeatureLockDown.reg 1031.mst 1033.mst 1036.mst Abcpy.ini AcroPro.msi Data1.cab Setup.exe setup.ini
Der Lizenzkey wird über die Datei “Abcpy.ini” übergeben. In dieser Datei sucht man den OEM-Abschnitt:
[OEM Install]
ISX_SERIALNUMBER=xxxx-xxxx-xxxx-xxxx-xxxx
USERNAME=Name
COMPANYNAME=Company
....
</code
==== install.ins ====
<code winst>
[Initial]
; Standard Text, der während der Installation angezeigt wird
Message=Bitte warten, Adobe Acrobat 9 Professional wird installiert...
; Abort on Errors:
ExitOnError=true
; Don't show syntax errors in the script:
ScriptErrorMessages=off
; Don't let started programs run in front of the winst window
StayOnTop=true
; Loglevel configuration
setLogLevel=6
[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
DefVar $Executable$
Set $Executable$ = "Setup.exe"
;Die Variable zur Auswertung des ExitCodes
DefVar $ExitCode$
;Prüfen der Winst Version
requiredWinstVersion >= "4.11"
;Freien Speicherplatz ermitteln
if not (HasMinimumSpace ("%SYSTEMDRIVE%", "1000 MB"))
LogError "Nicht genügend Platz auf %SYSTEMDRIVE%"
isFatalError
endif
Winbatch_Install
Winbatch_disable_update
sub_check_exitcode
[Winbatch_Install]
%SCRIPTPATH%\$Executable$ /sAll /rs /msi EULA_ACCEPT=YES
[Winbatch_disable_update]
Regedit /s %SCRIPTPATH%\FeatureLockDown.reg
[sub_check_exitcode]
comment "test for installation success via exit code"
set $ExitCode$ = getLastExitCode
; informations to exit codes see
; http://msdn.microsoft.com/en-us/library/aa372835(VS.85).aspx
; http://msdn.microsoft.com/en-us/library/aa368542.aspx
if ($ExitCode$ = "0")
comment "looks good: setup program gives exitcode zero"
else
comment "Setup program gives a exitcode unequal zero: "+$ExitCode$
if ($ExitCode$ = "1605")
comment "ERROR_UNKNOWN_PRODUCT 1605 This action is only valid for products that are currently installed."
comment "Uninstall of a not installed product failed - no problem"
else
if ($ExitCode$ = "1641")
comment "looks good: setup program gives exitcode 1641"
comment "ERROR_SUCCESS_REBOOT_INITIATED 1641 The installer has initiated a restart. This message is indicative of a success."
else
if ($ExitCode$ = "3010")
comment "looks good: setup program gives exitcode 3010"
comment "ERROR_SUCCESS_REBOOT_REQUIRED 3010 A restart is required to complete the install. This message is indicative of a success."
else
logError "Fatal: Setup program gives an unknown exitcode unequal zero: "+$ExitCode$
isFatalError
endif
endif
endif
endif
[Initial]
; Standard Text, der während der Installation angezeigt wird
Message=deinstalliere Adobe Acrobat 9 Professional
; Abort on Errors:
ExitOnError=true
; Don't show syntax errors in the script:
ScriptErrorMessages=off
; Don't let started programs run in front of the winst window
StayOnTop=true
; Loglevel configuration
setLogLevel=6
[Actions]
;Variable for the found version. Gotten by the redistry
DefVar $DisplayName$
;Aktionen aufrufen
Winbatch_produkt_silent_uninstall
[Winbatch_produkt_silent_uninstall]
;uninstall Adobe Acrobat 9 Pro, if found in the Registry
Set $DisplayName$ = GetRegistrystringvalue("[HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{AC76BA86-1033-F400-7760-000000000004}] DisplayName")
if not ($DisplayName$ = "")
MsiExec.exe /x {AC76BA86-1033-F400-7760-000000000004} /qb-! REBOOT=ReallySuppress
endif
Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Adobe\Adobe Acrobat\9.0\FeatureLockDown] "bUpdater"=dword:00000000 "bRegisterProduct"=dword:00000000