ich habe eine Frage zur Verteilung eines Office 2010 H&B.
Via config.xml gebe ich der Installationsrouting alle erforderlichen Daten für ein unattendet-Install mit (inkl. Key)
Ein manuelle Aufruf der setup-Routine
Code: Alles auswählen
%ScriptPath%\$Inst_Prg$ $Inst_Cmd32$ "%Scriptpath%\%PCName%.xml"
Meine setup.ins sieht wie folgt aus (ist in Anlehnung an die msoffice-Beiträge in Wiki entstanden, danke):
Code: Alles auswählen
[Initial]
setLogLevel=9
; Log Errors in Logfile but don't abort:
ExitOnError=false
; Show syntax errors in the script:
ScriptErrorMessages=on
; Dont trace step by step through the script:
TraceMode=off
; let started programs run in front of the winst window
StayOnTop=false
[Actions]
requiredWinstVersion >= "4.10.8.6"
DefVar $MsiId32$
DefVar $UninstallProgram32$
DefVar $MsiId64$
DefVar $UninstallProgram64$
DefVar $LogDir$
DefVar $ProductId$
DefVar $MinimumSpace$
DefVar $InstallDir32$
DefVar $InstallDir64$
DefVar $ExitCode$
DefVar $LicenseRequired$
DefVar $LicenseKey$
DefVar $LicensePool$
DefVar $INST_SystemType$
DefVar $INST_architecture$
DefVar $Version$
DefVar $Inst_Cmd32$
DefVar $Inst_Cmd64$
DefVar $Inst_Prg$
Set $INST_SystemType$ = GetSystemType
set $INST_architecture$ = GetProductProperty("install_architecture","system specific")
Set $LogDir$ = "%SystemDrive%\tmp"
; ----------------------------------------------------------------
; - Please edit the following values -
; ----------------------------------------------------------------
;$ProductId$ should be the name of the product in opsi
; therefore please: only lower letters, no umlauts,
; no white space use '-' as a seperator
Set $ProductId$ = "Microsoft-Office (32 Bit)"
Set $Version$ = "2010"
Set $MinimumSpace$ = "2000 MB"
; the path were we find the product after the installation
Set $InstallDir32$ = "%ProgramFiles32Dir%\Microsoft Office"
Set $InstallDir64$ = "%ProgramFiles64Dir%\Microsoft Office"
Set $LicenseRequired$ = "false"
Set $Inst_Prg$ = "setup.exe"
Set $Inst_Cmd32$ = '/config'
; ----------------------------------------------------------------
if not(HasMinimumSpace ("%SystemDrive%", $MinimumSpace$))
LogError "Not enough space on %SystemDrive%, " + $MinimumSpace$ + " on drive %SystemDrive% needed for " + $ProductId$
isFatalError
; Stop process and set installation status to failed
else
comment "Prüfe auf Lizenzdatei .... %ScriptPath%\%PCName%"
if FileExists("%ScriptPath%\%PCName%.xml")
Message "Installiere Office für %PCName%"
comment "Installiere Office für %PCName%"
else
Message "Lizenzdatei %ScriptPath%\%PCName%.xml nicht gefunden, Abbruch"
comment "Lizenzdatei %ScriptPath%\%PCName%.xml nicht gefunden, Abbruch"
isFatalError
endif
comment "Installiere Microsoft Office 2010 (32 Bit)..."
if (($INST_SystemType$ = "x86 System") and ($INST_architecture$ = "system specific")) or ($INST_architecture$ = "both") or ($INST_architecture$ = "32 only")
Message "Installiere " + $ProductId$ + ". Das kann etwas laenger dauern, bitte Geduld..."
comment "Start setup program"
Winbatch_install
Sub_check_exitcode
endif
if ($INST_SystemType$ = "64 Bit System") and (($INST_architecture$ = "system specific") or ($INST_architecture$ = "both") or ($INST_architecture$ = "64 only"))
Message "Dieses Produkt ist nur fuer 32 Bit OS! Waehlen Sie die 64 Bit-Version!"
comment "Fatal: for 32 Bit OS only!"
isFatalError
endif
endif
[Winbatch_install]
%ScriptPath%\$Inst_Prg$ $Inst_Cmd32$ "%Scriptpath%\%PCName%.xml"
[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
Code: Alles auswählen
[5] [Feb 27 09:07:45:399] Execution of Winbatch_install
[6] [Feb 27 09:07:45:409] Call "Z:\ms-hab-2010\CLIENT_DATA\setup.exe /config "Z:\ms-hab-2010\CLIENT_DATA\TESTW72.xml""
[6] [Feb 27 09:07:45:415] Waiting until the called process is finished
[6] [Feb 27 09:07:45:425] Start process as invoker: Administrator
[7] [Feb 27 09:07:47:012] Waiting for ending at 27.02.2013 09:07:47 exitcode is: 259
[7] [Feb 27 09:07:48:019] Waiting for ending at 27.02.2013 09:07:48 exitcode is: 0
[8] [Feb 27 09:07:48:025] Process terminated at: 27.02.2013 09:07:48 exitcode is: 0
[6] [Feb 27 09:07:48:031] ExitCode 0 Executed process "Z:\ms-hab-2010\CLIENT_DATA\setup.exe /config "Z:\ms-hab-2010\CLIENT_DATA\TESTW72.xml""
[6] [Feb 27 09:07:48:038]
Die unistall-Routine ruft die setup.exe auf dem entspr. Clientrechner auf
Code: Alles auswählen
"C:\Program Files\Common Files\Microsoft Shared\OFFICE14\Office Setup Controller\setup.exe" /uninstall SINGLEIMAGE /config %ScriptPath%\uninstall.xml
Kann jemand helfen?
Die config.xml Files erzeuge ich mittels eines perl-scripts aus einem Template. Wenn das Script fertig ist( und dokumentiert) kann ich es gerne bei Bedarf hier oder im Wiki einstellen.
Grüße Detlev.