Software Installation schlägt Fehl per Remoteinstallation
Verfasst: 18 Jan 2018, 12:12
Hallo liebes Forum,
ich bin momentan dabei ein Paket für Serdia zu schreiben. Wenn ich das Paket per opsi-script starte läuft es einwandfrei durch und Funktioniert, jedoch wenn ich das Paket per opsi config editor starte schlägt es fehl und nur ein Teil wird es installiert.
Ich hoffe mir kann jemand helfen
Hier noch mein Code:
ich bin momentan dabei ein Paket für Serdia zu schreiben. Wenn ich das Paket per opsi-script starte läuft es einwandfrei durch und Funktioniert, jedoch wenn ich das Paket per opsi config editor starte schlägt es fehl und nur ein Teil wird es installiert.
Ich hoffe mir kann jemand helfen
Hier noch mein Code:
Code: Alles auswählen
;****************************************
; SETUPTYPE nsis
;****************************************
; PRODUCTID setup
; SETUPFILE setup.exe
;****************************************
; LICENSE false
; PRODUCTDESC setup
; PRODUCTNAME setup
; PRODUCTSIZE 1500 MB
; PRODUCTVER 10.6.6.0.0
;****************************************
; SETUPSCRIPT setup.opsiscript
; UNINSSCRIPT uninstall.opsiscript
;****************************************
; MSIID
; USE-MST
; INSTALLDIR C:\DEUTZ
;****************************************
; TIMESTAMP 16.01.2018 13:41:26
;****************************************
[Actions]
requiredWinstVersion >= "4.11.4.3"
ScriptErrorMessages = false
DefVar $SetupType$
DefVar $ProductId$
DefVar $Setupfile$
DefVar $InstallDir$
DefVar $MinimumSpace$
DefVar $ExitCode$
DefVar $ErrorMsg$
DefVar $LicenseRequired$
DefVar $LicenseKey$
DefVar $LicensePool$
DefVar $MsiId$
DefVar $NsisInstallBatch$
DefVar $LogDir$
Set $LogDir$ = "%opsiLogDir%"
include_append "%ScriptPath%\check_nsis_exitcode.opsiscript"
; ----------------------------------------------------------------
Set $SetupType$ = "nsis"
; ----------------------------------------------------------------
; $ProductId$ is the name of the product in opsi, only lower letters, no umlauts, no white spaces, use '-' as a seperator
Set $ProductId$ = "setup"
Set $Setupfile$ = "setup.exe"
; the path where we find the product after the installation
Set $InstallDir$ = "C:\DEUTZ"
Set $LicenseRequired$ = "false"
Set $LicensePool$ = "p_" + $ProductId$
Set $MsiId$ = ""
Set $MinimumSpace$ = "1500 MB"
; ----------------------------------------------------------------
; ----------------------------------------------------------------
if not(HasMinimumSpace ("%SystemDrive%", $MinimumSpace$))
LogError "Not enough space on %SystemDrive%, " + $MinimumSpace$ + " on drive %SystemDrive% needed for " + $ProductId$
isFatalError "No Space"
; Stop process and set installation status to failed
else
comment "Show product picture"
ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $ProductId$
if FileExists("%ScriptPath%\delsub.opsiscript")
comment "Start uninstall sub section"
Sub "%ScriptPath%\delsub.opsiscript"
endif
Message "Installing " + $ProductId$ + " ..."
if $LicenseRequired$ = "true"
comment "Licensing required, reserve license and get license key"
Sub_get_licensekey
endif
if ($SetupType$ = "nsis")
Set $NsisInstallBatch$ = "%ScriptPath%\setup.exe /S"
if not ($InstallDir$ = '')
Set $NsisInstallBatch$ = $NsisInstallBatch$ + ' /D="' + $InstallDir$ + '"'
endif
endif
comment "Start setup program"
ChangeDirectory "%SCRIPTPATH%"
;----------------------------------------------
Winbatch_install_nsis
;----------------------------------------------
Sub_check_exitcode
endif
; ----------------------------------------------------------------
; install section
; ----------------------------------------------------------------
[Winbatch_install_nsis]
$NsisInstallBatch$
; ----------------------------------------------------------------
[Sub_get_licensekey]
if opsiLicenseManagementEnabled
comment "License management is enabled and will be used"
comment "Trying to get a license key"
Set $LicenseKey$ = demandLicenseKey ($LicensePool$)
DefVar $ServiceErrorClass$
set $ServiceErrorClass$ = getLastServiceErrorClass
comment "Error class: " + $ServiceErrorClass$
if $ServiceErrorClass$ = "None"
comment "Everything fine, we got the license key '" + $LicenseKey$ + "'"
else
if $ServiceErrorClass$ = "LicenseConfigurationError"
LogError "Fatal: license configuration must be corrected"
LogError getLastServiceErrorMessage
isFatalError
else
if $ServiceErrorClass$ = "LicenseMissingError"
LogError "Fatal: required license is not supplied"
isFatalError
endif
endif
endif
else
LogError "Fatal: license required, but license management not enabled"
isFatalError
endif
; ----------------------------------------------------------------
; ----------------------------------------------------------------