From 6de9dacf9386314e52cfe2a77d83580deba9edab Mon Sep 17 00:00:00 2001 From: Pete Brown Date: Mon, 2 Dec 2024 12:14:07 -0500 Subject: [PATCH] Add 64/32 bit check to reg scripts --- src/dev-tools/reg-helpers/midi-list-reg.ps1 | 7 +++++++ .../reg-helpers/midi-pre-install-reg-steps.ps1 | 10 ++++++++++ 2 files changed, 17 insertions(+) diff --git a/src/dev-tools/reg-helpers/midi-list-reg.ps1 b/src/dev-tools/reg-helpers/midi-list-reg.ps1 index ddc6fbad..b10cd13d 100644 --- a/src/dev-tools/reg-helpers/midi-list-reg.ps1 +++ b/src/dev-tools/reg-helpers/midi-list-reg.ps1 @@ -27,6 +27,13 @@ Write-Host "you will need to run the dev-prep script before running the installer." -ForegroundColor DarkCyan Write-Host + if (!([Environment]::Is64BitProcess)) +{ + Write-Host + Write-Host "This appears to be a 32-bit host. This script must be run from a 64-bit elevated shell." -ForegroundColor Red + Write-Host + Exit +} # display info about the MIDI Service that is installed diff --git a/src/dev-tools/reg-helpers/midi-pre-install-reg-steps.ps1 b/src/dev-tools/reg-helpers/midi-pre-install-reg-steps.ps1 index f625b27d..11498cd7 100644 --- a/src/dev-tools/reg-helpers/midi-pre-install-reg-steps.ps1 +++ b/src/dev-tools/reg-helpers/midi-pre-install-reg-steps.ps1 @@ -98,6 +98,16 @@ Write-Host Write-Host "These actions are not easily reversible without reinstalling Windows." -ForegroundColor DarkCyan Write-Host +if (!([Environment]::Is64BitProcess)) +{ + Write-Host + Write-Host "This appears to be a 32-bit host. This script must be run from a 64-bit elevated shell." -ForegroundColor Red + Write-Host + Exit +} + + + $confirmation = Read-Host "Do you want to continue? (y/n)" if ($confirmation -eq 'y' -or $confirmation -eq 'Y') {