From 7b121a4f2f696b8df75caa0e5fe0f51d36161026 Mon Sep 17 00:00:00 2001 From: poslop Date: Wed, 14 Jan 2026 12:14:02 -0600 Subject: [PATCH] cleaned string variables --- RemoveHKeyPrinters.ps1 | 7 ------- 1 file changed, 7 deletions(-) diff --git a/RemoveHKeyPrinters.ps1 b/RemoveHKeyPrinters.ps1 index cf64956..9fcc5e3 100644 --- a/RemoveHKeyPrinters.ps1 +++ b/RemoveHKeyPrinters.ps1 @@ -41,8 +41,6 @@ foreach ($HKLMPrinterPaths in $HKLMPrinterPaths) { foreach ($sidKey in $sids) { $sid = $sidKey.PSChildName $profilePath = (Get-ItemProperty -Path $sidKey.PSPath -Name ProfileImagePath).ProfileImagePath - - foreach ($printerPath in $printerPaths) { try { @@ -52,11 +50,6 @@ foreach ($sidKey in $sids) { Write-Host "Error: $($_.Exception.Message)" } } - - - if (-not $mounted) { - $unloadResult = & reg.exe unload "HKU\$sid" 2>&1 - } } try {