Produkt Installation klappt nur manchmal
Verfasst: 12 Nov 2025, 16:56
Hallo zusammen,
ich habe aktuell ein Problem bei der Softwareverteilung mit opsi. Ich nutze den opsi setup detector, um automatisch ein Paket aus meiner Installationsdatei zu erstellen. Die Setup-Datei ist eine .exe, die mit InstallAware erstellt wurde. Ich habe das Paket danach erfolgreich auf dem Server installiert und die Verteilung auf die Clients funktioniert nur manchmal (auf manchen Clients schon und manchen nicht, aber dann klappt es später auf dem selben Client doch), obwohl die Clients alle die selbe Konfiguration haben. Wenn die Installation nicht klappt, zeigt das Opsi-Configed successful. Hier ist der Output vom .install_log.txt
Wenn die Installation klappt, wird MainEngineThread is returning 1603 zu 0
Meine Ordnerstruktur vom Paket
├── CLIENT_DATA
│ ├── declarations.opsiinc
│ ├── delinc.opsiinc
│ ├── files1
│ │ └── President_Setup_1_2_3.exe
│ ├── President_Setup_1_2_3.png
│ ├── osd-lib.opsiscript
│ ├── sections.opsiinc
│ ├── setup.opsiscript
│ └── uninstall.opsiscript
└── OPSI
├── changelog.md
├── control
├── control.toml
├── opsi-project.osd
├── postinst
└── preinst
CLIENT_DATA/delinc.opsiinc
CLIENT_DATA/sections.opsiinc
CLIENT_DATA/setup.opsiscript
CLIENT_DATA/uninstall.opsiscript
Ich freue mich auf Hinweise oder Lösungsansätze!
Viele Grüße
ich habe aktuell ein Problem bei der Softwareverteilung mit opsi. Ich nutze den opsi setup detector, um automatisch ein Paket aus meiner Installationsdatei zu erstellen. Die Setup-Datei ist eine .exe, die mit InstallAware erstellt wurde. Ich habe das Paket danach erfolgreich auf dem Server installiert und die Verteilung auf die Clients funktioniert nur manchmal (auf manchen Clients schon und manchen nicht, aber dann klappt es später auf dem selben Client doch), obwohl die Clients alle die selbe Konfiguration haben. Wenn die Installation nicht klappt, zeigt das Opsi-Configed successful. Hier ist der Output vom .install_log.txt
Code: Alles auswählen
MSI (s) (8C:BC) [16:10:05:075]: Note: 1: 1707
MSI (s) (8C:BC) [16:10:05:075]: Note: 1: 2205 2: 3: Error
MSI (s) (8C:BC) [16:10:05:076]: Note: 1: 2228 2: 3: Error 4: SELECT `Message` FROM `Error` WHERE `Error` = 1707
MSI (s) (8C:BC) [16:10:05:076]: Note: 1: 2205 2: 3: Error
MSI (s) (8C:BC) [16:10:05:077]: Note: 1: 2228 2: 3: Error 4: SELECT `Message` FROM `Error` WHERE `Error` = 1709
MSI (s) (8C:BC) [16:10:05:078]: Product: President -- Installation completed successfully.
MSI (s) (8C:BC) [16:10:05:079]: Das Produkt wurde durch Windows Installer installiert. Produktname: President. Produktversion: 1_2_3. Produktsprache: 1033. Hersteller: Villa. Erfolg- bzw. Fehlerstatus der Installation: 0.
MSI (s) (8C:BC) [16:10:05:080]: Closing MSIHANDLE (6) of type 790542 for thread 700
MSI (s) (8C:BC) [16:10:05:082]: Deferring clean up of packages/files, if any exist
MSI (s) (8C:BC) [16:10:05:082]: MainEngineThread is returning 1603
Meine Ordnerstruktur vom Paket
├── CLIENT_DATA
│ ├── declarations.opsiinc
│ ├── delinc.opsiinc
│ ├── files1
│ │ └── President_Setup_1_2_3.exe
│ ├── President_Setup_1_2_3.png
│ ├── osd-lib.opsiscript
│ ├── sections.opsiinc
│ ├── setup.opsiscript
│ └── uninstall.opsiscript
└── OPSI
├── changelog.md
├── control
├── control.toml
├── opsi-project.osd
├── postinst
└── preinst
CLIENT_DATA/delinc.opsiinc
Code: Alles auswählen
; ----------------------------------------------------------------
; This is a opsi-script file.
; See https://opsi.org https://uib.de
; This code was originally created by opsi-setup-detector 4.3.7.2
; ----------------------------------------------------------------
encoding=utf8
; ---------------------------------------------------------------
comment "check if there is something to uninstall"
; ----------------------------------------------------------------
Message "Check for existing installation of " + $ProductId$ + " ..."
comment "Start the Uninstall check:"
set $oldProgFound$ = "false"
if fileexists("C:\ProgramData\{<UNKNOWN GUID>}\villa_setup_.exe")
set $oldProgFound$ = "true"
endif
if $oldProgFound$ = "true"
; ---------------------------------------------------------------
comment "run the uninstall program"
; ----------------------------------------------------------------
Message "Uninstalling " + $ProductId$ + " ..."
comment "Start uninstall program"
;----------------------------------------------
Winbatch_uninstall_1 /sysnative /WaitForProcessEnding "villa_setup_.exe" /TimeOutSeconds 20
;----------------------------------------------
; ---------------------------------------------------------------
comment "check the result"
; ----------------------------------------------------------------
; check the outcome of the call, produce either a "failed" state of the script or log the result
set $ExitCode$ = getlastexitcode
if "true" = isMsiExitcodeFatal_short($exitcode$, "true", $ErrorString$ )
LogError $ErrorString$
isfatalerror $ErrorString$
else
Comment $ErrorString$
endif
; ---------------------------------------------------------------
comment "cleanup installation directory"
; ----------------------------------------------------------------
if not(($InstallDir$ = '') or ($InstallDir$ = 'unknown'))
Files_uninstall
endif
endif
;-----------------------------------------------------
Code: Alles auswählen
; ----------------------------------------------------------------
; This is a opsi-script file.
; See https://opsi.org https://uib.de
; This code was originally created by opsi-setup-detector 4.3.7.2
; ----------------------------------------------------------------
encoding=utf8
; -------------------------------------
; include file for opsi-setup-detector products
; Define all sections here
;---------------------------
;--- generated setup sections
[Winbatch_install_1]
"$installerSourceDir$\Villa_Setup_1_2_3.exe" /s /l="%opsiLogDir%\$ProductId$.install_log.txt"
[Winbatch_install_2]
;--- generated uninstall sections
[Winbatch_uninstall_1]
"C:\ProgramData\{<UNKNOWN GUID>}\villa_setup_.exe" /s MODIFY=FALSE REMOVE=TRUE UNINSTALL=YES
[Winbatch_uninstall_2]
[Files_uninstall]
del -sf "$InstallDir$\"
;--- addtional sections
; ----------------------------------------------------------------
; ----------------------------------------------------------------
Code: Alles auswählen
; ----------------------------------------------------------------
; This is a opsi-script file.
; See https://opsi.org https://uib.de
; This code was originally created by opsi-setup-detector 4.3.7.2
; ----------------------------------------------------------------
encoding=utf8
;here we start
[Actions]
;check if the running opsiscript version is not too old
requiredOpsiscriptVersion >= "4.12.5.0"
;fetch helper libraries
importlib "uib_exitcode.opsiscript"
importlib "osd-lib.opsiscript"
; All variables are defined here:
include_insert "declarations.opsiinc"
; All sections are defined here:
include_append "sections.opsiinc"
; ----------------------------------------------------------------
comment "put fixed infos into the script (maybe produced by the setup detector maybe manually)"
; ----------------------------------------------------------------
; the values can be manually edited or automatically suggested by the opsi setup detector
;
; ----------------------------------------------------------------
; $ProductId$ is the name of the product in opsi, only lower letters, no umlauts, no white spaces, use '-' as a separator
Set $ProductId$ = "villa_setup_1_2_3"
; the path where we find the product after the installation
Set $InstallDir$ = "%ProgramFiles32Dir%\Villa\Presidenten"
set $targetprogram$ = ""
Set $MinimumSpace$ = "200 MB"
; ----------------------------------------------------------------
; the operating system, in which the interpreter is running
; supported values are "Windows_NT", "Linux", "MacOS"
set $OS$ = GetOS
Message "Installing " + $ProductId$ + " ..."
; ----------------------------------------------------------------
comment "check if the script is adequate to the environment"
; ----------------------------------------------------------------
if not(($OS$ = "Windows_NT"))
logError "Installation aborted: wrong OS version: only Windows"
isFatalError "wrong OS"
; Stop process and set installation status to failed
endif
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
endif
; ---------------------------------------------------------------
comment "inform the user at the PC about product installation"
; ----------------------------------------------------------------
; for a better visual appearance, show some graphic (at most of size 160x160 [px] )
comment "Show product picture"
ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $ProductId$
set $installerSourceDir$ = "%scriptpath%\files1"
if FileExists("%ScriptPath%\delinc.opsiinc")
comment "Start uninstall part"
include_insert "%ScriptPath%\delinc.opsiinc"
endif
Message "Installing " + $ProductId$ + " ..."
; ---------------------------------------------------------------
comment "run the setup program"
; ----------------------------------------------------------------
; the call to the installer is more stable if we set the path
ChangeDirectory $installerSourceDir$
;----------------------------------------------
Winbatch_install_1 /sysnative
;----------------------------------------------
; ---------------------------------------------------------------
comment "check the result"
; ----------------------------------------------------------------
; check the outcome of the call, produce either a "failed" state of the script or log the result
set $ExitCode$ = getlastexitcode
if "true" = isMsiExitcodeFatal_short($exitcode$, "true", $ErrorString$ )
includelog "%opsiLogDir%\"+$ProductId$+".install_log.txt" "50" "utf16le"
LogError $ErrorString$
isfatalerror $ErrorString$
else
Comment $ErrorString$
endif
; ----------------------------------------------------------------
; ----------------------------------------------------------------
Code: Alles auswählen
; ----------------------------------------------------------------
; This is a opsi-script file.
; See https://opsi.org https://uib.de
; This code was originally created by opsi-setup-detector 4.3.7.2
; ----------------------------------------------------------------
encoding=utf8
;here we start
[Actions]
;check if the running opsiscript version is not too old
requiredOpsiscriptVersion >= "4.12.5.0"
;fetch helper libraries
importlib "uib_exitcode.opsiscript"
importlib "osd-lib.opsiscript"
; All variables are defined here:
include_insert "declarations.opsiinc"
; All sections are defined here:
include_append "sections.opsiinc"
; ----------------------------------------------------------------
comment "put fixed infos into the script (maybe produced by the setup detector maybe manually)"
; ----------------------------------------------------------------
; the values can be manually edited or automatically suggested by the opsi setup detector
;
; ----------------------------------------------------------------
; $ProductId$ is the name of the product in opsi, only lower letters, no umlauts, no white spaces, use '-' as a separator
Set $ProductId$ = "villa_setup_1_2_3"
; the path where we find the product after the installation
Set $InstallDir$ = "%ProgramFiles32Dir%\Villa\Presidenten"
; ----------------------------------------------------------------
; the operating system, in which the interpreter is running
; supported values are "Windows_NT", "Linux", "MacOS"
set $OS$ = GetOS
Message "Uninstalling " + $ProductId$ + " ..."
; ----------------------------------------------------------------
comment "check if the script is adequate to the environment"
; ----------------------------------------------------------------
if not(($OS$ = "Windows_NT"))
logError "Installation aborted: wrong OS version: only Windows"
isFatalError "wrong OS"
endif
; ---------------------------------------------------------------
comment "inform the user at the PC about product installation"
; ----------------------------------------------------------------
; for a better visual appearance, show some graphic (at most of size 160x160 [px] )
comment "Show product picture"
ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $ProductId$
set $installerSourceDir$ = "%scriptpath%\files1"
if FileExists("%ScriptPath%\delinc.opsiinc")
comment "Start uninstall part"
include_insert "%ScriptPath%\delinc.opsiinc"
endif
; ----------------------------------------------------------------
; ----------------------------------------------------------------
Viele Grüße