mirror of
https://github.com/Raphire/Win11Debloat.git
synced 2026-05-25 07:06:18 +00:00
Remove unblocking logic as it doesnt work
This commit is contained in:
@@ -281,39 +281,7 @@ function ImportRegistryFile {
|
|||||||
Write-Warning "reg import failed for '$path'. Falling back to PowerShell registry writer. Details: $details"
|
Write-Warning "reg import failed for '$path'. Falling back to PowerShell registry writer. Details: $details"
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if ($script:GuiWindow) {
|
Invoke-RegistryImportViaPowerShell -RegFilePath $regFilePath -UseOfflineHive:$usesOfflineHive -OfflineHiveDatPath $hiveDatPath
|
||||||
$repoRootPath = Split-Path -Path $script:RegfilesPath -Parent
|
|
||||||
$registryPathHelpersScript = Join-Path $repoRootPath 'Scripts\Helpers\RegistryPathHelpers.ps1'
|
|
||||||
$regFileOperationsScript = Join-Path $repoRootPath 'Scripts\Helpers\Get-RegFileOperations.ps1'
|
|
||||||
$importRegistryScript = Join-Path $repoRootPath 'Scripts\Features\ImportRegistryFile.ps1'
|
|
||||||
|
|
||||||
Invoke-NonBlocking -ScriptBlock {
|
|
||||||
param(
|
|
||||||
$registryPathHelpersScriptPath,
|
|
||||||
$regFileOperationsScriptPath,
|
|
||||||
$importRegistryScriptPath,
|
|
||||||
$targetRegFilePath,
|
|
||||||
$useOfflineHive,
|
|
||||||
$offlineHiveDatPath
|
|
||||||
)
|
|
||||||
|
|
||||||
. $registryPathHelpersScriptPath
|
|
||||||
. $regFileOperationsScriptPath
|
|
||||||
. $importRegistryScriptPath
|
|
||||||
|
|
||||||
Invoke-RegistryImportViaPowerShell -RegFilePath $targetRegFilePath -UseOfflineHive:$useOfflineHive -OfflineHiveDatPath $offlineHiveDatPath
|
|
||||||
} -ArgumentList @(
|
|
||||||
$registryPathHelpersScript,
|
|
||||||
$regFileOperationsScript,
|
|
||||||
$importRegistryScript,
|
|
||||||
$regFilePath,
|
|
||||||
$usesOfflineHive,
|
|
||||||
$hiveDatPath
|
|
||||||
)
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
Invoke-RegistryImportViaPowerShell -RegFilePath $regFilePath -UseOfflineHive:$usesOfflineHive -OfflineHiveDatPath $hiveDatPath
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host "Fallback import succeeded for '$path'." -ForegroundColor Yellow
|
Write-Host "Fallback import succeeded for '$path'." -ForegroundColor Yellow
|
||||||
Write-Host ""
|
Write-Host ""
|
||||||
|
|||||||
Reference in New Issue
Block a user