From 2bc8329f03f2e6a0da13433c480ffe88a50dbbe4 Mon Sep 17 00:00:00 2001 From: Carter <60557606+Carterpersall@users.noreply.github.com> Date: Wed, 29 Jun 2022 21:35:33 -0500 Subject: [PATCH] Fix bug in #39 (#40) - Closes #39 - $arch is not set to a value in the script, and it throws an error when the If-Statement is called - Fixed by replacing the $arch variable check with a wmic check --- winutil.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/winutil.ps1 b/winutil.ps1 index 3db38260..9eebce55 100644 --- a/winutil.ps1 +++ b/winutil.ps1 @@ -1399,7 +1399,7 @@ $WPFFixesUpdate.Add_Click({ Get-BitsTransfer | Remove-BitsTransfer Write-Host "10) Attempting to install the Windows Update Agent..." - If ($arch -eq 64) { + If (!((wmic OS get OSArchitecture | Out-String).IndexOf("64") -eq -1)) { wusa Windows8-RT-KB2937636-x64 /quiet } else {