Packagerecorder Errorlevel 0 und 70000

Ich versuche mich gerade an meinem ersten Packagerecorder Paket.

Beim reinstallieren per Empirum Agent und auch beim Deinstallieren läuft das Paket auf Errorlevel 70000, bzw. das eigentlich Installshield Setup beendet mit 0, was ja eigentlich erfolgreich ist. Wen man das Paket nochmal laufen lässt geht es dann auf Erfolg. Ich habe die Vermutung, das irgendwas mit der Erkennung des Deinstallationerfolgs nicht passt.

Wenn ich das Paket manuell auf der Paketierungsstation per Powershell installiere/deinstalliere/reinstalliere läuft es immer ohne Fehler durch. Auch wenn ich die Powershell als System User starte um denselben Kontext wie der Empirum Agent zu haben.

Anbei ein Uninstall Log mit dem Fehler.

<![LOG[[Initialization] :: *******************************************************************************]LOG]!><time="14:53:50.761120" date="04-08-2025" component="PSAppDeployToolkit" context="NT-AUTORITÄT\SYSTEM" type="1" thread="10588" file="Deploy-Application.ps1">
<![LOG[[Initialization] :: Display session information for all logged on users: 
]LOG]!><time="14:53:50.778120" date="04-08-2025" component="PSAppDeployToolkit" context="NT-AUTORITÄT\SYSTEM" type="1" thread="10588" file="Deploy-Application.ps1">
<![LOG[[Initialization] :: No users are logged on to the system.]LOG]!><time="14:53:50.793120" date="04-08-2025" component="PSAppDeployToolkit" context="NT-AUTORITÄT\SYSTEM" type="1" thread="10588" file="Deploy-Application.ps1">
<![LOG[[Initialization] :: The current system account [NT-AUTORITÄT\SYSTEM] has a primary UI language of [DE].]LOG]!><time="14:53:50.805120" date="04-08-2025" component="PSAppDeployToolkit" context="NT-AUTORITÄT\SYSTEM" type="1" thread="10588" file="Deploy-Application.ps1">
<![LOG[[Initialization] :: The following UI messages were imported from the config XML file: [UI_Messages_DE].]LOG]!><time="14:53:50.817120" date="04-08-2025" component="PSAppDeployToolkit" context="NT-AUTORITÄT\SYSTEM" type="1" thread="10588" file="Deploy-Application.ps1">
<![LOG[[Initialization] :: The system has a DPI scale factor of [100] with DPI pixels [96].]LOG]!><time="14:53:50.830120" date="04-08-2025" component="PSAppDeployToolkit" context="NT-AUTORITÄT\SYSTEM" type="1" thread="10588" file="Deploy-Application.ps1">
<![LOG[[Initialization] :: Unable to load COM Object [Microsoft.SMS.TSEnvironment]. Therefore, script is not currently running from a SCCM Task Sequence.]LOG]!><time="14:53:50.855120" date="04-08-2025" component="PSAppDeployToolkit" context="NT-AUTORITÄT\SYSTEM" type="1" thread="10588" file="Deploy-Application.ps1">
<![LOG[[Initialization] :: Service [Schedule] exists.]LOG]!><time="14:53:50.886120" date="04-08-2025" component="Test-ServiceExists" context="NT-AUTORITÄT\SYSTEM" type="1" thread="10588" file="Deploy-Application.ps1">
<![LOG[[Initialization] :: Getting the service [Schedule] startup mode.]LOG]!><time="14:53:50.946120" date="04-08-2025" component="Get-ServiceStartMode" context="NT-AUTORITÄT\SYSTEM" type="1" thread="10588" file="Deploy-Application.ps1">
<![LOG[[Initialization] :: Service [Schedule] startup mode is set to [Automatic].]LOG]!><time="14:53:50.982120" date="04-08-2025" component="Get-ServiceStartMode" context="NT-AUTORITÄT\SYSTEM" type="1" thread="10588" file="Deploy-Application.ps1">
<![LOG[[Initialization] :: Getting the service object for service [Schedule].]LOG]!><time="14:53:51.073120" date="04-08-2025" component="Start-ServiceAndDependencies" context="NT-AUTORITÄT\SYSTEM" type="1" thread="10588" file="Deploy-Application.ps1">
<![LOG[[Initialization] :: Service [Schedule] with display name [Aufgabenplanung] has a status of [Running].]LOG]!><time="14:53:51.113120" date="04-08-2025" component="Start-ServiceAndDependencies" context="NT-AUTORITÄT\SYSTEM" type="1" thread="10588" file="Deploy-Application.ps1">
<![LOG[[Initialization] :: The task scheduler service is in a healthy state: True.]LOG]!><time="14:53:51.141120" date="04-08-2025" component="PSAppDeployToolkit" context="NT-AUTORITÄT\SYSTEM" type="1" thread="10588" file="Deploy-Application.ps1">
<![LOG[[Initialization] :: Session 0 detected, process not running in user interactive mode; deployment mode set to [NonInteractive].]LOG]!><time="14:53:51.159120" date="04-08-2025" component="PSAppDeployToolkit" context="NT-AUTORITÄT\SYSTEM" type="1" thread="10588" file="Deploy-Application.ps1">
<![LOG[[Initialization] :: Installation is running in [NonInteractive] mode.]LOG]!><time="14:53:51.180120" date="04-08-2025" component="PSAppDeployToolkit" context="NT-AUTORITÄT\SYSTEM" type="1" thread="10588" file="Deploy-Application.ps1">
<![LOG[[Initialization] :: Deployment type is [Deinstallation].]LOG]!><time="14:53:51.192120" date="04-08-2025" component="PSAppDeployToolkit" context="NT-AUTORITÄT\SYSTEM" type="1" thread="10588" file="Deploy-Application.ps1">
<![LOG[[Initialize-Environment] :: Package configuration successfully parsed into global:PackageConfig object.]LOG]!><time="14:53:51.247120" date="04-08-2025" component="Get-NxtPackageConfig" context="NT-AUTORITÄT\SYSTEM" type="1" thread="10588" file="Deploy-Application.ps1">
<![LOG[[Initialize-Environment] :: Registry key value [Registry::HKEY_LOCAL_MACHINE\Software\neoPackages] [AppRootFolderNames] does exist.]LOG]!><time="14:53:51.310120" date="04-08-2025" component="Test-RegistryValue" context="NT-AUTORITÄT\SYSTEM" type="1" thread="10588" file="Deploy-Application.ps1">
<![LOG[[Initialize-Environment] :: Getting registry key [Registry::HKEY_LOCAL_MACHINE\Software\neoPackages] value [AppRootFolderNames].]LOG]!><time="14:53:51.411120" date="04-08-2025" component="Get-RegistryKey" context="NT-AUTORITÄT\SYSTEM" type="1" thread="10588" file="Deploy-Application.ps1">
<![LOG[[Initialize-Environment] :: AppRootFolderName with Name 'neo42Pkgs' found.]LOG]!><time="14:53:51.445120" date="04-08-2025" component="Initialize-NxtAppRootFolder" context="NT-AUTORITÄT\SYSTEM" type="1" thread="10588" file="Deploy-Application.ps1">
<![LOG[[Initialize-Environment] :: Found a default setup config file 'Setup.cfg'...]LOG]!><time="14:53:51.528120" date="04-08-2025" component="Initialize-NxtEnvironment" context="NT-AUTORITÄT\SYSTEM" type="1" thread="10588" file="Deploy-Application.ps1">
<![LOG[[Initialize-Environment] :: The setup config file is already at its correct location.]LOG]!><time="14:53:51.547120" date="04-08-2025" component="Initialize-NxtEnvironment" context="NT-AUTORITÄT\SYSTEM" type="1" thread="10588" file="Deploy-Application.ps1">
<![LOG[[Initialize-Environment] :: Checking for config file [setup.cfg] under [C:\ProgramData\neo42Pkgs\HP\Realtek USB Audio\6.4.0.393\neo42-Install\setup.cfg]...]LOG]!><time="14:53:51.585120" date="04-08-2025" component="Set-NxtSetupCfg" context="NT-AUTORITÄT\SYSTEM" type="1" thread="10588" file="Deploy-Application.ps1">
<![LOG[[Initialize-Environment] :: Read ini file [C:\ProgramData\neo42Pkgs\HP\Realtek USB Audio\6.4.0.393\neo42-Install\setup.cfg]. ]LOG]!><time="14:53:51.686120" date="04-08-2025" component="Import-NxtIniFileWithComments" context="NT-AUTORITÄT\SYSTEM" type="1" thread="10588" file="Deploy-Application.ps1">
<![LOG[[Initialize-Environment] :: Setup.cfg file [C:\ProgramData\neo42Pkgs\HP\Realtek USB Audio\6.4.0.393\neo42-Install\setup.cfg] is valid.]LOG]!><time="14:53:51.857120" date="04-08-2025" component="Test-NxtSetupCfg" context="NT-AUTORITÄT\SYSTEM" type="1" thread="10588" file="Deploy-Application.ps1">
<![LOG[[Initialize-Environment] :: Read ini file [C:\ProgramData\neo42Pkgs\HP\Realtek USB Audio\6.4.0.393\neo42-Install\setup.cfg]. ]LOG]!><time="14:53:51.891120" date="04-08-2025" component="Import-NxtIniFile" context="NT-AUTORITÄT\SYSTEM" type="1" thread="10588" file="Deploy-Application.ps1">
<![LOG[[Initialize-Environment] :: [setup.cfg] was found and successfully parsed into global:SetupCfg object.]LOG]!><time="14:53:51.917120" date="04-08-2025" component="Set-NxtSetupCfg" context="NT-AUTORITÄT\SYSTEM" type="1" thread="10588" file="Deploy-Application.ps1">
<![LOG[[Initialize-Environment] :: Checking for custom config file [CustomSetup.cfg] under [C:\ProgramData\neo42Pkgs\HP\Realtek USB Audio\6.4.0.393\neo42-Install\CustomSetup.cfg]...]LOG]!><time="14:53:52.022120" date="04-08-2025" component="Set-NxtCustomSetupCfg" context="NT-AUTORITÄT\SYSTEM" type="1" thread="10588" file="Deploy-Application.ps1">
<![LOG[[Initialize-Environment] :: No [CustomSetup.cfg] found. Skipped parsing customized values.]LOG]!><time="14:53:52.048120" date="04-08-2025" component="Set-NxtCustomSetupCfg" context="NT-AUTORITÄT\SYSTEM" type="1" thread="10588" file="Deploy-Application.ps1">
<![LOG[[Initialize-Environment] :: Setting package architecture variables...]LOG]!><time="14:53:52.098120" date="04-08-2025" component="Set-NxtPackageArchitecture" context="NT-AUTORITÄT\SYSTEM" type="1" thread="10588" file="Deploy-Application.ps1">
<![LOG[[Initialize-Environment] :: Package architecture variables successfully set.]LOG]!><time="14:53:52.121120" date="04-08-2025" component="Set-NxtPackageArchitecture" context="NT-AUTORITÄT\SYSTEM" type="1" thread="10588" file="Deploy-Application.ps1">
<![LOG[[Initialize-Environment] :: Getting environment variables set by the deployment system...]LOG]!><time="14:53:52.316120" date="04-08-2025" component="Get-NxtVariablesFromDeploymentSystem" context="NT-AUTORITÄT\SYSTEM" type="1" thread="10588" file="Deploy-Application.ps1">
<![LOG[[Initialize-Environment] :: Environment variables successfully read.]LOG]!><time="14:53:52.361120" date="04-08-2025" component="Get-NxtVariablesFromDeploymentSystem" context="NT-AUTORITÄT\SYSTEM" type="1" thread="10588" file="Deploy-Application.ps1">
<![LOG[[Initialize-Environment] :: ConfigVersion: 2024.11.13.1]LOG]!><time="14:53:53.158120" date="04-08-2025" component="Test-NxtConfigVersionCompatibility" context="NT-AUTORITÄT\SYSTEM" type="1" thread="10588" file="Deploy-Application.ps1">
<![LOG[[Package-Preparation] :: Getting registry key [Registry::HKEY_LOCAL_MACHINE\Software\neoPackages\{0427319F-03EC-47D9-A645-59AEC686D58B}] value [ProductGUID].]LOG]!><time="14:53:53.344120" date="04-08-2025" component="Get-RegistryKey" context="NT-AUTORITÄT\SYSTEM" type="1" thread="10588" file="Deploy-Application.ps1">
<![LOG[[Package-Preparation] :: Getting registry key [Registry::HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Uninstall\{0427319F-03EC-47D9-A645-59AEC686D58B}] value [Installed].]LOG]!><time="14:53:53.388120" date="04-08-2025" component="Get-RegistryKey" context="NT-AUTORITÄT\SYSTEM" type="1" thread="10588" file="Deploy-Application.ps1">
<![LOG[[Package-Preparation] :: Getting information for installed Product Code [{0a46a65d-89ac-464c-8026-3cd44960bd04}]...]LOG]!><time="14:53:54.967120" date="04-08-2025" component="Get-InstalledApplication" context="NT-AUTORITÄT\SYSTEM" type="1" thread="10588" file="Deploy-Application.ps1">
<![LOG[[Package-Preparation] :: Found installed application [Realtek USB Audio] version [6.4.0.393] matching product code [{0a46a65d-89ac-464c-8026-3cd44960bd04}].]LOG]!><time="14:53:55.825120" date="04-08-2025" component="Get-InstalledApplication" context="NT-AUTORITÄT\SYSTEM" type="1" thread="10588" file="Deploy-Application.ps1">
<![LOG[[Package-Preparation] :: Skipped 0 entries while searching, because they were considered Microsoft updates.]LOG]!><time="14:53:56.143120" date="04-08-2025" component="Get-InstalledApplication" context="NT-AUTORITÄT\SYSTEM" type="1" thread="10588" file="Deploy-Application.ps1">
<![LOG[[Package-Preparation] :: Excluded [neoPackage HP Realtek USB Audio 6.4.0.393] from the results above.]LOG]!><time="14:53:56.183120" date="04-08-2025" component="Get-NxtInstalledApplication" context="NT-AUTORITÄT\SYSTEM" type="1" thread="10588" file="Deploy-Application.ps1">
<![LOG[[Package-Preparation] :: Getting registry key [Registry::HKEY_LOCAL_MACHINE\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{0A46A65D-89AC-464C-8026-3CD44960BD04}] value [SystemComponent].]LOG]!><time="14:53:56.235120" date="04-08-2025" component="Get-RegistryKey" context="NT-AUTORITÄT\SYSTEM" type="1" thread="10588" file="Deploy-Application.ps1">
<![LOG[[Package-Preparation] :: Deleting registry value [Registry::HKEY_LOCAL_MACHINE\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{0A46A65D-89AC-464C-8026-3CD44960BD04}] [SystemComponent].]LOG]!><time="14:53:56.281120" date="04-08-2025" component="Remove-RegistryKey" context="NT-AUTORITÄT\SYSTEM" type="1" thread="10588" file="Deploy-Application.ps1">
<![LOG[[Package-Uninstallation] :: Checking if application is installed...]LOG]!><time="14:53:56.372120" date="04-08-2025" component="Test-NxtAppIsInstalled" context="NT-AUTORITÄT\SYSTEM" type="1" thread="10588" file="Deploy-Application.ps1">
<![LOG[[Package-Uninstallation] :: Getting information for installed Product Code [{0a46a65d-89ac-464c-8026-3cd44960bd04}]...]LOG]!><time="14:53:56.398120" date="04-08-2025" component="Get-InstalledApplication" context="NT-AUTORITÄT\SYSTEM" type="1" thread="10588" file="Deploy-Application.ps1">
<![LOG[[Package-Uninstallation] :: Found installed application [Realtek USB Audio] version [6.4.0.393] matching product code [{0a46a65d-89ac-464c-8026-3cd44960bd04}].]LOG]!><time="14:53:57.069120" date="04-08-2025" component="Get-InstalledApplication" context="NT-AUTORITÄT\SYSTEM" type="1" thread="10588" file="Deploy-Application.ps1">
<![LOG[[Package-Uninstallation] :: Skipped 0 entries while searching, because they were considered Microsoft updates.]LOG]!><time="14:53:57.189120" date="04-08-2025" component="Get-InstalledApplication" context="NT-AUTORITÄT\SYSTEM" type="1" thread="10588" file="Deploy-Application.ps1">
<![LOG[[Package-Uninstallation] :: Excluded [neoPackage HP Realtek USB Audio 6.4.0.393] from the results above.]LOG]!><time="14:53:57.223120" date="04-08-2025" component="Get-NxtInstalledApplication" context="NT-AUTORITÄT\SYSTEM" type="1" thread="10588" file="Deploy-Application.ps1">
<![LOG[[Package-Uninstallation] :: Found one application matching UninstallKey [{0a46a65d-89ac-464c-8026-3cd44960bd04}], UninstallKeyIsDisplayName [False], UninstallKeyContainsWildCards [False] and DisplayNamesToExclude [neoPackage HP Realtek USB Audio 6.4.0.393]. Returning [True].]LOG]!><time="14:53:57.253120" date="04-08-2025" component="Test-NxtAppIsInstalled" context="NT-AUTORITÄT\SYSTEM" type="1" thread="10588" file="Deploy-Application.ps1">
<![LOG[[Package-Uninstallation] :: [C:\Program Files (x86)\InstallShield Installation Information\{0A46A65D-89AC-464C-8026-3CD44960BD04}\setup.exe] is a valid fully qualified path, continue.]LOG]!><time="14:53:57.313120" date="04-08-2025" component="Execute-Process" context="NT-AUTORITÄT\SYSTEM" type="1" thread="10588" file="Deploy-Application.ps1">
<![LOG[[Package-Uninstallation] :: Working Directory is [C:\Program Files (x86)\InstallShield Installation Information\{0A46A65D-89AC-464C-8026-3CD44960BD04}].]LOG]!><time="14:53:57.361120" date="04-08-2025" component="Execute-Process" context="NT-AUTORITÄT\SYSTEM" type="1" thread="10588" file="Deploy-Application.ps1">
<![LOG[[Package-Uninstallation] :: Executing [C:\Program Files (x86)\InstallShield Installation Information\{0A46A65D-89AC-464C-8026-3CD44960BD04}\setup.exe -s -runfromtemp -removeonly -SMS -f1"C:\ProgramData\neo42Pkgs\HP\Realtek USB Audio\6.4.0.393\neo42-Source\uninstall.iss" -f2"C:\ProgramData\neo42PkgsLogs\HP\Realtek USB Audio\6.4.0.393\Uninstall.2025-04-08_14-53-52.log"]...]LOG]!><time="14:53:57.375120" date="04-08-2025" component="Execute-Process" context="NT-AUTORITÄT\SYSTEM" type="1" thread="10588" file="Deploy-Application.ps1">
<![LOG[[Package-Uninstallation] :: PassThru parameter specified, returning execution results object.]LOG]!><time="14:54:02.493120" date="04-08-2025" component="Execute-Process" context="NT-AUTORITÄT\SYSTEM" type="1" thread="10588" file="Deploy-Application.ps1">
<![LOG[[Package-Uninstallation] :: Execution completed successfully with exit code [0].]LOG]!><time="14:54:02.512120" date="04-08-2025" component="Execute-Process" context="NT-AUTORITÄT\SYSTEM" type="1" thread="10588" file="Deploy-Application.ps1">
<![LOG[[Package-Uninstallation] :: Checking if application is installed...]LOG]!><time="14:54:07.604120" date="04-08-2025" component="Test-NxtAppIsInstalled" context="NT-AUTORITÄT\SYSTEM" type="1" thread="10588" file="Deploy-Application.ps1">
<![LOG[[Package-Uninstallation] :: Getting information for installed Product Code [{0a46a65d-89ac-464c-8026-3cd44960bd04}]...]LOG]!><time="14:54:07.636120" date="04-08-2025" component="Get-InstalledApplication" context="NT-AUTORITÄT\SYSTEM" type="1" thread="10588" file="Deploy-Application.ps1">
<![LOG[[Package-Uninstallation] :: Found installed application [Realtek USB Audio] version [6.4.0.393] matching product code [{0a46a65d-89ac-464c-8026-3cd44960bd04}].]LOG]!><time="14:54:08.216120" date="04-08-2025" component="Get-InstalledApplication" context="NT-AUTORITÄT\SYSTEM" type="1" thread="10588" file="Deploy-Application.ps1">
<![LOG[[Package-Uninstallation] :: Skipped 0 entries while searching, because they were considered Microsoft updates.]LOG]!><time="14:54:08.280120" date="04-08-2025" component="Get-InstalledApplication" context="NT-AUTORITÄT\SYSTEM" type="1" thread="10588" file="Deploy-Application.ps1">
<![LOG[[Package-Uninstallation] :: Excluded [neoPackage HP Realtek USB Audio 6.4.0.393] from the results above.]LOG]!><time="14:54:08.303120" date="04-08-2025" component="Get-NxtInstalledApplication" context="NT-AUTORITÄT\SYSTEM" type="1" thread="10588" file="Deploy-Application.ps1">
<![LOG[[Package-Uninstallation] :: Found one application matching UninstallKey [{0a46a65d-89ac-464c-8026-3cd44960bd04}], UninstallKeyIsDisplayName [False], UninstallKeyContainsWildCards [False] and DisplayNamesToExclude [neoPackage HP Realtek USB Audio 6.4.0.393]. Returning [True].]LOG]!><time="14:54:08.318120" date="04-08-2025" component="Test-NxtAppIsInstalled" context="NT-AUTORITÄT\SYSTEM" type="1" thread="10588" file="Deploy-Application.ps1">
<![LOG[[Package-Uninstallation] :: Uninstallation of 'Realtek USB Audio' failed. ErrorLevel: 0]LOG]!><time="14:54:08.355120" date="04-08-2025" component="Uninstall-NxtApplication" context="NT-AUTORITÄT\SYSTEM" type="3" thread="10588" file="Deploy-Application.ps1">
<![LOG[[CustomUninstallEndOnError] :: Uninstallation of 'Realtek USB Audio' failed. ErrorLevel: 0]LOG]!><time="14:54:08.427120" date="04-08-2025" component="Exit-NxtScriptWithError" context="NT-AUTORITÄT\SYSTEM" type="3" thread="10588" file="Deploy-Application.ps1">
<![LOG[[CustomUninstallEndOnError] :: Creating registry key [Registry::HKEY_LOCAL_MACHINE\Software\neoPackages\{0427319F-03EC-47D9-A645-59AEC686D58B}_Error].]LOG]!><time="14:54:08.477120" date="04-08-2025" component="Set-RegistryKey" context="NT-AUTORITÄT\SYSTEM" type="1" thread="10588" file="Deploy-Application.ps1">
<![LOG[[CustomUninstallEndOnError] :: Setting registry key value: [Registry::HKEY_LOCAL_MACHINE\Software\neoPackages\{0427319F-03EC-47D9-A645-59AEC686D58B}_Error] [AppPath = C:\ProgramData\neo42Pkgs\HP\Realtek USB Audio\6.4.0.393].]LOG]!><time="14:54:08.500120" date="04-08-2025" component="Set-RegistryKey" context="NT-AUTORITÄT\SYSTEM" type="1" thread="10588" file="Deploy-Application.ps1">
<![LOG[[CustomUninstallEndOnError] :: Setting registry key value: [Registry::HKEY_LOCAL_MACHINE\Software\neoPackages\{0427319F-03EC-47D9-A645-59AEC686D58B}_Error] [DebugLogFile = C:\ProgramData\neo42PkgsLogs\HP\Realtek USB Audio\6.4.0.393\HP_RealtekUSBAudio_6.4.0.393_PSAppDeployToolkit_Uninstall.log].]LOG]!><time="14:54:08.531120" date="04-08-2025" component="Set-RegistryKey" context="NT-AUTORITÄT\SYSTEM" type="1" thread="10588" file="Deploy-Application.ps1">
<![LOG[[CustomUninstallEndOnError] :: Setting registry key value: [Registry::HKEY_LOCAL_MACHINE\Software\neoPackages\{0427319F-03EC-47D9-A645-59AEC686D58B}_Error] [DeploymentStartTime = 2025-04-08_14-53-52].]LOG]!><time="14:54:08.558120" date="04-08-2025" component="Set-RegistryKey" context="NT-AUTORITÄT\SYSTEM" type="1" thread="10588" file="Deploy-Application.ps1">
<![LOG[[CustomUninstallEndOnError] :: Setting registry key value: [Registry::HKEY_LOCAL_MACHINE\Software\neoPackages\{0427319F-03EC-47D9-A645-59AEC686D58B}_Error] [DeveloperName = HP].]LOG]!><time="14:54:08.598120" date="04-08-2025" component="Set-RegistryKey" context="NT-AUTORITÄT\SYSTEM" type="1" thread="10588" file="Deploy-Application.ps1">
<![LOG[[CustomUninstallEndOnError] :: Setting registry key value: [Registry::HKEY_LOCAL_MACHINE\Software\neoPackages\{0427319F-03EC-47D9-A645-59AEC686D58B}_Error] [ErrorTimeStamp = 2025-04-08_14-54-08].]LOG]!><time="14:54:08.632120" date="04-08-2025" component="Set-RegistryKey" context="NT-AUTORITÄT\SYSTEM" type="1" thread="10588" file="Deploy-Application.ps1">
<![LOG[[CustomUninstallEndOnError] :: Setting registry key value: [Registry::HKEY_LOCAL_MACHINE\Software\neoPackages\{0427319F-03EC-47D9-A645-59AEC686D58B}_Error] [ErrorMessage = Uninstallation of 'Realtek USB Audio' failed. ErrorLevel: 0].]LOG]!><time="14:54:08.665120" date="04-08-2025" component="Set-RegistryKey" context="NT-AUTORITÄT\SYSTEM" type="1" thread="10588" file="Deploy-Application.ps1">
<![LOG[[CustomUninstallEndOnError] :: Setting registry key value: [Registry::HKEY_LOCAL_MACHINE\Software\neoPackages\{0427319F-03EC-47D9-A645-59AEC686D58B}_Error] [ErrorMessagePSADT = Die DisplayName-Eigenschaft kann nicht gefunden werden.].]LOG]!><time="14:54:08.690120" date="04-08-2025" component="Set-RegistryKey" context="NT-AUTORITÄT\SYSTEM" type="1" thread="10588" file="Deploy-Application.ps1">
<![LOG[[CustomUninstallEndOnError] :: Setting registry key value: [Registry::HKEY_LOCAL_MACHINE\Software\neoPackages\{0427319F-03EC-47D9-A645-59AEC686D58B}_Error] [LastExitCode = 0].]LOG]!><time="14:54:08.723120" date="04-08-2025" component="Set-RegistryKey" context="NT-AUTORITÄT\SYSTEM" type="1" thread="10588" file="Deploy-Application.ps1">
<![LOG[[CustomUninstallEndOnError] :: Setting registry key value: [Registry::HKEY_LOCAL_MACHINE\Software\neoPackages\{0427319F-03EC-47D9-A645-59AEC686D58B}_Error] [PackageArchitecture = x86].]LOG]!><time="14:54:08.771120" date="04-08-2025" component="Set-RegistryKey" context="NT-AUTORITÄT\SYSTEM" type="1" thread="10588" file="Deploy-Application.ps1">
<![LOG[[CustomUninstallEndOnError] :: Setting registry key value: [Registry::HKEY_LOCAL_MACHINE\Software\neoPackages\{0427319F-03EC-47D9-A645-59AEC686D58B}_Error] [PackageStatus = Failure].]LOG]!><time="14:54:08.799120" date="04-08-2025" component="Set-RegistryKey" context="NT-AUTORITÄT\SYSTEM" type="1" thread="10588" file="Deploy-Application.ps1">
<![LOG[[CustomUninstallEndOnError] :: Setting registry key value: [Registry::HKEY_LOCAL_MACHINE\Software\neoPackages\{0427319F-03EC-47D9-A645-59AEC686D58B}_Error] [ProductName = Realtek USB Audio].]LOG]!><time="14:54:08.835120" date="04-08-2025" component="Set-RegistryKey" context="NT-AUTORITÄT\SYSTEM" type="1" thread="10588" file="Deploy-Application.ps1">
<![LOG[[CustomUninstallEndOnError] :: Setting registry key value: [Registry::HKEY_LOCAL_MACHINE\Software\neoPackages\{0427319F-03EC-47D9-A645-59AEC686D58B}_Error] [Revision = 0].]LOG]!><time="14:54:08.873120" date="04-08-2025" component="Set-RegistryKey" context="NT-AUTORITÄT\SYSTEM" type="1" thread="10588" file="Deploy-Application.ps1">
<![LOG[[CustomUninstallEndOnError] :: Setting registry key value: [Registry::HKEY_LOCAL_MACHINE\Software\neoPackages\{0427319F-03EC-47D9-A645-59AEC686D58B}_Error] [SrcPath = C:\ProgramData\neo42Pkgs\HP\Realtek USB Audio\6.4.0.393\neo42-Install].]LOG]!><time="14:54:08.901120" date="04-08-2025" component="Set-RegistryKey" context="NT-AUTORITÄT\SYSTEM" type="1" thread="10588" file="Deploy-Application.ps1">
<![LOG[[CustomUninstallEndOnError] :: Setting registry key value: [Registry::HKEY_LOCAL_MACHINE\Software\neoPackages\{0427319F-03EC-47D9-A645-59AEC686D58B}_Error] [StartupProcessor_Architecture = AMD64].]LOG]!><time="14:54:08.931120" date="04-08-2025" component="Set-RegistryKey" context="NT-AUTORITÄT\SYSTEM" type="1" thread="10588" file="Deploy-Application.ps1">
<![LOG[[CustomUninstallEndOnError] :: Setting registry key value: [Registry::HKEY_LOCAL_MACHINE\Software\neoPackages\{0427319F-03EC-47D9-A645-59AEC686D58B}_Error] [StartupProcessOwner = REMS-MURR-KREIS\SYSTEM].]LOG]!><time="14:54:08.970120" date="04-08-2025" component="Set-RegistryKey" context="NT-AUTORITÄT\SYSTEM" type="1" thread="10588" file="Deploy-Application.ps1">
<![LOG[[CustomUninstallEndOnError] :: Setting registry key value: [Registry::HKEY_LOCAL_MACHINE\Software\neoPackages\{0427319F-03EC-47D9-A645-59AEC686D58B}_Error] [StartupProcessOwnerSID = S-1-5-18].]LOG]!><time="14:54:09.002120" date="04-08-2025" component="Set-RegistryKey" context="NT-AUTORITÄT\SYSTEM" type="1" thread="10588" file="Deploy-Application.ps1">
<![LOG[[CustomUninstallEndOnError] :: Setting registry key value: [Registry::HKEY_LOCAL_MACHINE\Software\neoPackages\{0427319F-03EC-47D9-A645-59AEC686D58B}_Error] [UninstallOld = True].]LOG]!><time="14:54:09.034120" date="04-08-2025" component="Set-RegistryKey" context="NT-AUTORITÄT\SYSTEM" type="1" thread="10588" file="Deploy-Application.ps1">
<![LOG[[CustomUninstallEndOnError] :: Setting registry key value: [Registry::HKEY_LOCAL_MACHINE\Software\neoPackages\{0427319F-03EC-47D9-A645-59AEC686D58B}_Error] [UserPartOnInstallation = False].]LOG]!><time="14:54:09.065120" date="04-08-2025" component="Set-RegistryKey" context="NT-AUTORITÄT\SYSTEM" type="1" thread="10588" file="Deploy-Application.ps1">
<![LOG[[CustomUninstallEndOnError] :: Setting registry key value: [Registry::HKEY_LOCAL_MACHINE\Software\neoPackages\{0427319F-03EC-47D9-A645-59AEC686D58B}_Error] [UserPartOnUninstallation = False].]LOG]!><time="14:54:09.098120" date="04-08-2025" component="Set-RegistryKey" context="NT-AUTORITÄT\SYSTEM" type="1" thread="10588" file="Deploy-Application.ps1">
<![LOG[[CustomUninstallEndOnError] :: Setting registry key value: [Registry::HKEY_LOCAL_MACHINE\Software\neoPackages\{0427319F-03EC-47D9-A645-59AEC686D58B}_Error] [Version = 6.4.0.393].]LOG]!><time="14:54:09.130120" date="04-08-2025" component="Set-RegistryKey" context="NT-AUTORITÄT\SYSTEM" type="1" thread="10588" file="Deploy-Application.ps1">
<![LOG[[CustomUninstallEndOnError] :: Temp folder [C:\n42Tmp] does not exist. Skipping.]LOG]!><time="14:54:09.158120" date="04-08-2025" component="Clear-NxtTempFolder" context="NT-AUTORITÄT\SYSTEM" type="1" thread="10588" file="Deploy-Application.ps1">
<![LOG[[CustomUninstallEndOnError] :: Bypassing function [Unblock-NxtAppExecution], because [BlockExecution: False].]LOG]!><time="14:54:09.183120" date="04-08-2025" component="Unblock-NxtAppExecution" context="NT-AUTORITÄT\SYSTEM" type="1" thread="10588" file="Deploy-Application.ps1">
<![LOG[[CustomUninstallEndOnError] :: Bypassing Close-InstallationProgress [Mode: NonInteractive]]LOG]!><time="14:54:09.234120" date="04-08-2025" component="Close-InstallationProgress" context="NT-AUTORITÄT\SYSTEM" type="1" thread="10588" file="Deploy-Application.ps1">
<![LOG[[CustomUninstallEndOnError] :: HP_RealtekUSBAudio_6.4.0.393 Deinstallation completed with exit code [70000].]LOG]!><time="14:54:09.257120" date="04-08-2025" component="Exit-Script" context="NT-AUTORITÄT\SYSTEM" type="1" thread="10588" file="Deploy-Application.ps1">
<![LOG[[CustomUninstallEndOnError] :: -------------------------------------------------------------------------------]LOG]!><time="14:54:09.278120" date="04-08-2025" component="Exit-Script" context="NT-AUTORITÄT\SYSTEM" type="1" thread="10588" file="Deploy-Application.ps1">

Auch wenn ich anstatt dem uninstallkey, stattdessen nach dem Displayname checken lassen, kommt es zu dem Fehler bei Deinstallation.

image

Wenn ich in der Registry unter:
HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall
und
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall

Suche finde ich aber keine Anwendung mit dem Displayname „Realtek USB Audio“. Im Log sagt er aber eindeutig er findet einen Eintrag und daher kommt es zum Abbruch der Deinstallation. Beim erneuten ausführen des Pakets des Pakets scheint er es dann auch nicht mehr zu finden und geht auf Success.

MIttlerweile vermute ich hier ein Timing Problem, dass während die Setuproutine noch läuft und das Skript schon prüft ob der Uninstallkey nicht mehr vorhanden ist. Das sollte aber eigentlich über den Schalter -SMS ausgeschlossen sein.

Meine Vermutung hat sich bestätigt. Ich habe in der AppDeployToolkitExtensions.ps1 in der Funktion „Test-NxtAppIsInstalled“ unterhalb der der Zeile 10532 folgende 2 Zeilen hinzugefügt:

    Write-Log -Message "30 Sekunden warten"
    Start-Sleep -Seconds 30

Prüft leider auch vor der Installation, aber es tut was es soll und noch mehr Zeit wollte ich jetzt nicht reinstecken. Schöner wäre natürlich wenn der geöffnete Prozess geprüft wird bis er geschlossen ist (evtl. noch mit einem Timeout Wert verknüpft). Aber den Aufwand spare ich mir für das einzelne Paket und sollte meiner Meinung nach auch upstream gelöst werden seitens neo42.

Eventuell hilft hier auch diese Einstellung in der neo42PackageConfig.json weiter: TestConditionsPreSetupSuccessCheck

Gruß, Marius

Wäre toll wenn man das direkt schon per Package Recorder befüllen könnte.