Replace throw with Write-Warning for unload registry hive error in ImportRegistryFile function

This commit is contained in:
Jeffrey
2026-05-18 21:57:42 +02:00
parent 85ae8487d6
commit 178fc0185f

View File

@@ -111,7 +111,7 @@ function ImportRegistryFile {
$unloadExitCode = $LASTEXITCODE
if ($unloadExitCode -ne 0) {
throw "Failed to unload registry hive HKU\Default after importing '$path' (exit code: $unloadExitCode)"
Write-Warning "Failed to unload registry hive HKU\Default after importing '$path' (exit code: $unloadExitCode)"
}
}
}