From 1b861feef3bfc4857383d355f3f47efcc00484ff Mon Sep 17 00:00:00 2001 From: Mingyang Zheng Date: Sun, 21 Jul 2024 18:40:27 -0700 Subject: [PATCH] Delete regtrans-ms and txr.blf files under config\TxR for Windows Server 2016 or newer version --- src/windows/win-crowdstrike-fix-bootloop-v2.ps1 | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/windows/win-crowdstrike-fix-bootloop-v2.ps1 b/src/windows/win-crowdstrike-fix-bootloop-v2.ps1 index d5548c8..e8a69d4 100644 --- a/src/windows/win-crowdstrike-fix-bootloop-v2.ps1 +++ b/src/windows/win-crowdstrike-fix-bootloop-v2.ps1 @@ -22,20 +22,24 @@ function CleanUpRegtransmsAndTxrblfFiles { Log-Info "Trying to Delete regtrans-ms and txr.blf files under config\TxR..." $regtransmsFiles = "$DriveLetter\Windows\system32\config\TxR\*.TxR.*.regtrans-ms" - try { + try + { Remove-Item $regtransmsFiles -ErrorAction Stop Log-Info "regtrans-ms files under config\TxR removed" } - catch { + catch + { Log-Error "Remove regtrans-ms files under config\TxR failed: Error: $_" } $txrBlfFiles = "$DriveLetter\Windows\system32\config\TxR\*.TxR.blf" - try { + try + { Remove-Item $txrBlfFiles -ErrorAction Stop Log-Info "txr.blf files under config\TxR removed" } - catch { + catch + { Log-Error "Remove txr.blf files under config\TxR failed: Error: $_" }