Ich wurde darauf angesetzt, opsi zu testen und mal richtig in der Firma einzurichten. Nun habe ich mich da reingefutzelt und stieß am Anfang schon auf Probleme, denn der client-agent wollte sich nicht deployen lassen. Egal...mit der cmd vom Client aus gestartet, installiert und swaudit sowie hwaudit per opsi installiert ... alles fein!
Nun wollte ich mich einem "größeren" Testprojekt annhähern und zwar Google Chrome. Dafür habe ich im wiki die entsprechenden Skripte gefunden und für meine Belange angepasst (siehe unten). Das check_exitcode-msi.ins hab ich 1:1 übernommen. Mein Problem besteht darin, dass wenn ich auf dem Client die winst32.exe anwerfe und dann die Skripte über das Netzwerk teste, läuft alles einwandfrei ohne Warnings und Errors durch. Sobald ich aber vom Server aus das Signal zum Installieren gebe, dann kriege ich einen Error. Ich habe so einiges hin und her getestet, komme aber mit meinen grünen Ohren nicht weiter und hoffe hier auf Hilfe.
Vielen Dank dafür im Voraus!
Grüße
Der Hiob
setup.ins
Code: Alles auswählen
[Initial]
;Standard Text, der waehrend der Installation angezeigt wird
Message = Please wait while installing the product
;LogLevel einstellen
setLogLevel = 6
ExitOnError=false
;Syntax Fehler werden in einem separaten Fenster angezeigt
ScriptErrorMessages=on
TraceMode=off
;Im Batchmode das Winst-Fenster nicht im Vordergrund anzeigen
StayOnTop=false
[Actions]
;Variable fuer die Ermittlung des Betriebssystems
DefVar $OS$
set $OS$ = GetOS
;Variable fue die Ermittlung der Betriebssystem Unterversion
DefVar $NTVersion$
set $NTVersion$ = GetNTVersion
;Name des Produkts (max. 12 Zeichen)
DefVar $ProductName$
set $ProductName$ = "Chrome"
;Dateiname des Produktbildes mit Erweiterung
DefVar $ProductPicture$
set $ProductPicture$ = "Chrome.png"
;Die Variable zur Auswertung des ExitCodes
DefVar $ExitCode$
;Vollstaendiger Produktname inkl. Versionsnummer
DefVar $ProductNameFull1$
set $ProductNameFull1$ = "Google Chrome 17.0.963.56"
;Dateinamen der zu installierenden MSI-Pakete
DefVar $Executable1$
set $Executable1$ = "GoogleChromeStandaloneEnterprise.msi"
;Pfad zur msi-Datei
DefVar $InstallDir$
set $InstallDir$ = "\\domainname\sds\Chrome\"
;Anzeigen der Installationsbenachrichtigung inkl. des vollen Produktnamens
Message "Installiere "+$ProductNameFull1$
;Pruefen der Winst Version
requiredWinstVersion >= "4.11"
;$ProductPicture$ und $ProductName$ anzeigen
ShowBitmap /3 "%scriptpath%\" + $ProductPicture$ $ProductName$
;Freien Speicherplatz ermitteln
if not (HasMinimumSpace ("%SYSTEMDRIVE%", "500 MB"))
LogError "Not enough space on %SYSTEMDRIVE%"
isFatalError
endif
;OS-Version ermitteln
if ( $NTVersion$ = "Win2k" OR $NTVersion$ = "WinXP" OR $NTVersion$ = "Win NT 5.2" OR $NTVersion$ = "Windows Vista" )
Message "Uninstall old product versions"
sub "%ScriptPath%\SubUninstall.ins"
Message "Installiere "+$ProductNameFull1$
Winbatch_Install
sub "\\270opsi\opsi_workbench\install\check_exitcode\check_msi-exitcode.ins"
LinkFolder_Custom
Registry_Global /32Bit
else
LogError "No supported operating system is installed"
isFatalError
endif
[Winbatch_Install]
;msiexec.exe /i "%SCRIPTPATH%\$Executable1$" /qb-!
msiexec.exe /i "$InstallDir$$Executable1$" /qb-!
[LinkFolder_Custom]
;Startmenue anpassen
set_basefolder common_programs
set_subfolder ""
delete_subfolder "Google Chrome"
set_subfolder ""
set_link
name: Google Chrome
target: "%ProgramFiles32Dir%\Google\Chrome\Application\chrome.exe"
parameters:
working_dir: "%ProgramFiles32Dir%\Google\Chrome\Application"
icon_file:
icon_index:
end_link
[Registry_Global]
OpenKey [HKLM\Software\Policies\Google\Chrome]
;ProxyServerMode auf Manuell einstellen
Set "ProxyServerMode" = REG_DWORD:0x00000002
;Adresse fuer Proxy Konfigurationsdatei eintragen
;Set "ProxyPacUrl" = REG_SZ:"http://proxy.your.domain/proxy.pac"
;Keine Statistiken an Google senden
Set "MetricsReportingEnabled" = REG_DWORD:0x00000000
;Keine Daten-Synchronisation mit Google Diensten
Set "SyncDisabled" = REG_DWORD:0x00000001
OpenKey [HKLM\SOFTWARE\Policies\Google\Update]
;Auto Update deaktivieren
Set "AutoUpdateCheckPeriodMinutes" = REG_DWORD:0x0000a8c0
Set "DisableAutoUpdateChecksCheckboxValue" = REG_DWORD:0x00000001
Code: Alles auswählen
[Initial]
;Standard Text, der waehrend der Deinstallation angezeigt wird
Message = Please wait while removing the product
;LogLevel einstellen
SetLogLevel = 6
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]
;Name des Produkts (max. 12 Zeichen)
DefVar $ProductName$
Set $ProductName$ = "Chrome"
;Dateiname des Produktbildes mit Erweiterung
DefVar $ProductPicture$
Set $ProductPicture$ = "Chrome.png"
;Die Variable zur Auswertung des ExitCodes
DefVar $ExitCode$
;$ProductPicutre$ und $ProductName$ anzeigen
ShowBitmap /3 "%scriptpath%\" + $ProductPicture$ $ProductName$
sub "%ScriptPath%\SubUninstall.ins"
Code: Alles auswählen
;Variable fuer den msiexec Aufruf zur Deinstallation
DefVar $UninstallCommand$
;Variable fuer die jeweilige Version. Wird aus der Registry ausgelesen
DefVar $DisplayName$
;Google Chrome (alle Versionen) deinstallieren, wenn es in der Registry gefunden wurde
Set $DisplayName$ = GetRegistrystringvalue32("[HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{2A924CD2-23D6-3952-BA80-82487A185707}] DisplayName")
if not ($DisplayName$ = "")
Message "Deinstalliere "+$DisplayName$
set $UninstallCommand$ = "MsiExec.exe /x {2A924CD2-23D6-3952-BA80-82487A185707} /qb-!"
Winbatch_Uninstall
sub "\\270opsi\opsi_workbench\install\check_exitcode\check_msi-exitcode.ins"
endif
Linkfolder_Custom
[Winbatch_Uninstall]
$UninstallCommand$
[Linkfolder_Custom]
;Startmenue Verknuepfung loeschen
Set_basefolder common_programs
Set_subfolder ""
delete_element "Google Chrome"
Code: Alles auswählen
[5] [Nov 22 13:54:18:640] --
[5] [Nov 22 13:54:18:640] --
[1] [Nov 22 13:54:18:640] opsi-winst 4.11.3.3 started at >>11/22/2012 13:54:17
[1] [Nov 22 13:54:18:656] startmessage opsi-winst created at CentralForm.FormCreate: 11/22/2012 13:54:17
[1] [Nov 22 13:54:18:656] startmessage StartProgramModes and create log: 11/22/2012 13:54:17
[1] [Nov 22 13:54:18:656] startmessage start opsi service connection: 11/22/2012 13:54:17
[1] [Nov 22 13:54:18:656] JSON Bench for backend_info "params":[],"id":1} Start: 13:54:17:750 Time: 00:00:00:812
[1] [Nov 22 13:54:18:656] startmessage create log: 11/22/2012 13:54:18
[6] [Nov 22 13:54:18:671] JSON service request https://10.211.10.57:4447/rpc getDepotId
[6] [Nov 22 13:54:18:765] JSON Bench for getDepotId "params":["nb0410.thalheim.guardian.corp"],"id":1} Start: 13:54:18:671 Time: 00:00:00:094
[6] [Nov 22 13:54:18:781] JSON service request https://10.211.10.57:4447/rpc backend_setOptions
[6] [Nov 22 13:54:18:859] JSON Bench for backend_setOptions "params":[{"processProductOnClientSequence":true}] Start: 13:54:18:781 Time: 00:00:00:078
[6] [Nov 22 13:54:18:875] JSON service request https://10.211.10.57:4447/rpc productOnClient_getObjects
[6] [Nov 22 13:54:19:125] JSON Bench for productOnClient_getObjects "params":["",{"clientId":"nb0410.thalheim.guardian Start: 13:54:18:875 Time: 00:00:00:250
[6] [Nov 22 13:54:19:140] JSON service request https://10.211.10.57:4447/rpc backend_setOptions
[6] [Nov 22 13:54:19:234] JSON Bench for backend_setOptions "params":[{"processProductOnClientSequence":false} Start: 13:54:19:140 Time: 00:00:00:094
[5] [Nov 22 13:54:19:250] Computername:nb0410.subdomain.domain.corp
[5] [Nov 22 13:54:19:250] Computername according to Environment Variable :NB0410
[5] [Nov 22 13:54:19:250] opsi service URL https://10.211.10.57:4447
[5] [Nov 22 13:54:19:250] Depot path: p:\
[5] [Nov 22 13:54:19:250]
[5] [Nov 22 13:54:19:265] bootmode BKSTD
[5] [Nov 22 13:54:19:265] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[5] [Nov 22 13:54:19:265] Resolved sequence of products (11/22/2012 13:54:19):
[5] [Nov 22 13:54:19:265] Product 1 google-chrome : setup
[5] [Nov 22 13:54:19:265] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[6] [Nov 22 13:54:19:812] JSON service request https://10.211.10.57:4447/rpc getProductProperties_hash
[6] [Nov 22 13:54:19:906] JSON Bench for getProductProperties_hash "params":["google-chrome","nb0410.subdomain.domai Start: 13:54:19:812 Time: 00:00:00:094
[6] [Nov 22 13:54:19:921] JSON service request https://10.211.10.57:4447/rpc getProduct_hash
[6] [Nov 22 13:54:20:015] JSON Bench for getProduct_hash "params":["google-chrome","270opsi.subdomain.domai Start: 13:54:19:921 Time: 00:00:00:094
[6] [Nov 22 13:54:20:015] JSON service request https://10.211.10.57:4447/rpc productOnClient_getObjects
[6] [Nov 22 13:54:20:093] JSON Bench for productOnClient_getObjects "params":["",{"clientId":"nb0410.subdomain.domai Start: 13:54:20:015 Time: 00:00:00:078
[5] [Nov 22 13:54:20:093] scriptname: "setup.ins", special path: "p:\google-chrome\"
[6] [Nov 22 13:54:20:093] JSON service request https://10.211.10.57:4447/rpc productOnClient_updateObject
[6] [Nov 22 13:54:20:203] JSON Bench for productOnClient_updateObject "params":[{"clientId":"nb0410.subdomain.domain.co Start: 13:54:20:093 Time: 00:00:00:110
[1] [Nov 22 13:54:20:266]
[1] [Nov 22 13:54:20:266] ============ Version 4.11.3.3 WIN32 script "p:\google-chrome\setup.ins"
[1] [Nov 22 13:54:20:266] start: 2012-11-22 13:54:20
[1] [Nov 22 13:54:20:313] installing product: google-chrome_17.0.963.56-1
[1] [Nov 22 13:54:20:313] on client named "nb0410.subdomain.domain.corp"
[1] [Nov 22 13:54:20:313] loggedin user ""
[1] [Nov 22 13:54:20:313] winst running as "pcpatch"
[1] [Nov 22 13:54:20:313] winst running with admin privileges
[1] [Nov 22 13:54:20:313] winst running in standard script mode
[1] [Nov 22 13:54:20:313] [executing: "C:\Program Files\opsi.org\opsi-client-agent\opsi-winst\winst32.exe"]
[1] [Nov 22 13:54:20:313] system infos:
[1] [Nov 22 13:54:20:344] 01-02-03-04-05-06 - PC hardware address
[1] [Nov 22 13:54:20:344] nb0410.subdomain.domain.corp - IP name
[1] [Nov 22 13:54:20:344] 10.211.112.63 - IP address
[1] [Nov 22 13:54:20:344] ENU - System default locale
[1] [Nov 22 13:54:20:344] MS Windowds 5.1 32 Bit
[1] [Nov 22 13:54:20:344] opsi service version : 4
[1] [Nov 22 13:54:20:344]
[6] [Nov 22 13:54:20:344] Registry key [HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion] opened
[6] [Nov 22 13:54:20:344] Key closed
[1] [Nov 22 13:54:20:641] LogLevel was 6
[1] [Nov 22 13:54:20:641] LogLevel set to 6
[5] [Nov 22 13:54:20:641] ExitOnError was True is set to false
[5] [Nov 22 13:54:20:657] ReportMessages was True is set to false
[5] [Nov 22 13:54:20:657]
[5] [Nov 22 13:54:20:657] Set $OS$ = GetOS
[6] [Nov 22 13:54:20:673] The value of the variable "$OS$" is now: "Windows_NT"
[5] [Nov 22 13:54:20:673]
[5] [Nov 22 13:54:20:673] Set $NTVersion$ = GetNTVersion
[6] [Nov 22 13:54:20:673] The value of the variable "$NTVersion$" is now: "WinXP"
[5] [Nov 22 13:54:20:673]
[5] [Nov 22 13:54:20:673] Set $ProductName$ = "Chrome"
[6] [Nov 22 13:54:20:673] The value of the variable "$ProductName$" is now: "Chrome"
[5] [Nov 22 13:54:20:673]
[5] [Nov 22 13:54:20:673] Set $ProductPicture$ = "Chrome.png"
[6] [Nov 22 13:54:20:673] The value of the variable "$ProductPicture$" is now: "Chrome.png"
[5] [Nov 22 13:54:20:673]
[5] [Nov 22 13:54:20:673] Set $ProductNameFull1$ = "Google Chrome 17.0.963.56"
[6] [Nov 22 13:54:20:673] The value of the variable "$ProductNameFull1$" is now: "Google Chrome 17.0.963.56"
[5] [Nov 22 13:54:20:673]
[5] [Nov 22 13:54:20:673] Set $Executable1$ = "GoogleChromeStandaloneEnterprise.msi"
[6] [Nov 22 13:54:20:673] The value of the variable "$Executable1$" is now: "GoogleChromeStandaloneEnterprise.msi"
[5] [Nov 22 13:54:20:673]
[5] [Nov 22 13:54:20:673] Set $InstallDir$ = "\\domainname\sds\Chrome\"
[6] [Nov 22 13:54:20:673] The value of the variable "$InstallDir$" is now: "\\domainname\sds\Chrome\"
[5] [Nov 22 13:54:20:673] message Installiere Google Chrome 17.0.963.56
[6] [Nov 22 13:54:20:688] opsi-winst has version 4.11.3.3, required is : >= 4.11
[5] [Nov 22 13:54:20:798]
[5] [Nov 22 13:54:20:798] If
[6] [Nov 22 13:54:20:798] Free on Disk C:: 88,118,833,152 bytes This is more than the required amount of 500,000,000 bytes
[5] [Nov 22 13:54:20:798] HasMinimumSpace ("C:", "500 MB") <<< result true
[5] [Nov 22 13:54:20:798] not (HasMinimumSpace ("C:", "500 MB")) <<< result false
[5] [Nov 22 13:54:20:798] Then
[5] [Nov 22 13:54:20:798] EndIf
[5] [Nov 22 13:54:20:798]
[5] [Nov 22 13:54:20:798] If
[5] [Nov 22 13:54:20:798] $NTVersion$ = "Windows Vista" <<< result false
[5] [Nov 22 13:54:20:798] $NTVersion$ = "Win NT 5.2" OR $NTVersion$ = "Windows Vista" <<< result false
[5] [Nov 22 13:54:20:798] $NTVersion$ = "WinXP" OR $NTVersion$ = "Win NT 5.2" OR $NTVersion$ = "Windows Vista" <<< result true
[5] [Nov 22 13:54:20:798] $NTVersion$ = "Win2k" OR $NTVersion$ = "WinXP" OR $NTVersion$ = "Win NT 5.2" OR $NTVersion$ = "Windows Vista" <<< result true
[5] [Nov 22 13:54:20:798] ( $NTVersion$ = "Win2k" OR $NTVersion$ = "WinXP" OR $NTVersion$ = "Win NT 5.2" OR $NTVersion$ = "Windows Vista" ) <<< result true
[5] [Nov 22 13:54:20:798] Then
[5] [Nov 22 13:54:20:798] message Uninstall old product versions
[6] [Nov 22 13:54:20:829]
[6] [Nov 22 13:54:20:829] ~~~~~~~ Start Sub ~~~~~~~ sub "P:\google-chrome\SubUninstall.ins"
[5] [Nov 22 13:54:20:829]
[5] [Nov 22 13:54:20:829] Set $DisplayName$ = GetRegistrystringvalue32("[HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{2A924CD2-23D6-3952-BA80-82487A185707}] DisplayName")
[6] [Nov 22 13:54:20:829] Info: Registry key [HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{2A924CD2-23D6-3952-BA80-82487A185707}] could not be opened by RegOpenKeyEx, Errorno 2 "The system cannot find the file specified.<"
[6] [Nov 22 13:54:20:829] The value of the variable "$DisplayName$" is now: ""
[5] [Nov 22 13:54:20:829]
[5] [Nov 22 13:54:20:829] If
[5] [Nov 22 13:54:20:829] $DisplayName$ = "" <<< result true
[5] [Nov 22 13:54:20:829] not ($DisplayName$ = "") <<< result false
[5] [Nov 22 13:54:20:829] Then
[5] [Nov 22 13:54:20:829] EndIf
[5] [Nov 22 13:54:20:845]
[5] [Nov 22 13:54:20:845] Execution of Linkfolder_Custom
[6] [Nov 22 13:54:20:845] Base folder is the COMMON PROGRAMS folder
[6] [Nov 22 13:54:20:845] Opened "" in the COMMON PROGRAMS folder
[6] [Nov 22 13:54:20:845] Info: Link "Google Chrome" does not exist
[6] [Nov 22 13:54:20:845] Section ending since next line is starting with "["
[6] [Nov 22 13:54:20:845]
[6] [Nov 22 13:54:20:845] ~~~~~~~ End Sub ~~~~~~~ sub "P:\google-chrome\SubUninstall.ins"
[6] [Nov 22 13:54:20:845]
[5] [Nov 22 13:54:20:845] message Installiere Google Chrome 17.0.963.56
[5] [Nov 22 13:54:20:845]
[5] [Nov 22 13:54:20:845] Execution of Winbatch_Install
[6] [Nov 22 13:54:20:845] Call "msiexec.exe /i "\\domainname\sds\Chrome\GoogleChromeStandaloneEnterprise.msi" /qb-!"
[6] [Nov 22 13:54:20:845] Waiting until the called process is finished
[6] [Nov 22 13:54:20:845] Start process as invoker: pcpatch
[6] [Nov 22 13:54:21:878] ExitCode 1620 Executed process "msiexec.exe /i "\\domainname\sds\Chrome\GoogleChromeStandaloneEnterprise.msi" /qb-!"
[6] [Nov 22 13:54:21:925]
[6] [Nov 22 13:54:21:925] ~~~~~~~ Start Sub ~~~~~~~ sub "\\270opsi\opsi_workbench\install\check_exitcode\check_msi-exitcode.ins"
[5] [Nov 22 13:54:21:972]
[5] [Nov 22 13:54:21:972] Set $ExitCode$ = getLastExitCode
[6] [Nov 22 13:54:21:972] The value of the variable "$ExitCode$" is now: "1620"
[1] [Nov 22 13:54:21:972] LogLevel was 6
[1] [Nov 22 13:54:21:972] LogLevel set to 4
[1] [Nov 22 13:54:21:972] LogLevel was 4
[1] [Nov 22 13:54:21:972] LogLevel set to 5
[3] [Nov 22 13:54:21:972] Error: ExitCode = 1620 ERROR_INSTALL_PACKAGE_INVALID This installation package could not be opened. Contact the application vendor to verify that this is a valid Windows Installer package.
[5] [Nov 22 13:54:21:972] Error level set to fatal
[5] [Nov 22 13:54:21:972] Process aborted
[5] [Nov 22 13:54:21:972] Process aborted
[1] [Nov 22 13:54:21:972] ___________________
[1] [Nov 22 13:54:21:972] script finished
[1] [Nov 22 13:54:21:972] 1 error
[1] [Nov 22 13:54:21:972] 0 warnings
[1] [Nov 22 13:54:21:972]
[1] [Nov 22 13:54:21:972] installed product: google-chrome Version: 17.0.963.56-1
[1] [Nov 22 13:54:21:972]
[1] [Nov 22 13:54:22:144] product "google-chrome set to update
[1] [Nov 22 13:54:22:144] Update script name:
[5] [Nov 22 13:54:22:144] no script file name given
[1] [Nov 22 13:54:22:144] we have no update script
[5] [Nov 22 13:54:23:005] -------- submitted part of log file ends here, see the rest of log file on client ----------