-# Host architecture. RuntimeInformation rather than PROCESSOR_ARCHITECTURE: an
-# emulated PowerShell reports the emulated architecture in the environment
-# variable while this API reports the real one. Values: X64, Arm64, X86.
-$HostArch = [Runtime.InteropServices.RuntimeInformation]::OSArchitecture.ToString()
-$IsArm64 = ($HostArch -eq 'Arm64')
+# Host architecture, from the machine environment in the registry. Both of the
+# obvious sources report the EMULATED architecture inside an emulated x64
+# PowerShell - which is what `powershell` resolves to when launched from an x64
+# shell on an ARM64 box. Measured on this machine:
+# [RuntimeInformation]::OSArchitecture X64 <- wrong
+# $env:PROCESSOR_ARCHITECTURE AMD64 <- wrong
+# HKLM\...\Session Manager\Environment ARM64 <- right
+# OSArchitecture is documented as the OS's architecture, and on .NET Core it is;
+# under .NET Framework on Prism it is not, so it is kept only as a fallback.
+# $IsArm64 decides which steps run at all, so this has to be the real one.
+$rawArch = (Get-ItemProperty 'HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Environment' -ErrorAction SilentlyContinue).PROCESSOR_ARCHITECTURE
+if (-not $rawArch) { $rawArch = [Runtime.InteropServices.RuntimeInformation]::OSArchitecture.ToString() }
+$IsArm64 = ($rawArch -eq 'ARM64')
+$HostArch = if ($IsArm64) { 'Arm64' } elseif ($rawArch -eq 'AMD64') { 'X64' } else { $rawArch }
+
+# Steps that do not run on ARM64, with the reason printed in place of the step.
+#
+# The ARM64 machine is provisioned as a single-compiler build box - see the
+# x64-only set in setup-windows.bat - so the packages these three steps wire up
+# are not installed there. Skipping the step rather than letting it find nothing
+# matters: Install-BinSkim would happily download and PATH the x64 build, and
+# Add-LlvmToUserPath is the step that put an emulated-adjacent toolchain on the
+# PATH ahead of MSVC in the first place.
+#
+# -Skip still works on top of this; it can only subtract.
+$Arm64Dropped = [ordered]@{
+ WinMerge = 'not installed on ARM64 - the only build an unelevated winget can fetch is the emulated x64 one'
+ BinSkim = 'not installed on ARM64 - the NuGet package publishes win-x64 only'
+ LlvmPath = 'not installed on ARM64 - this box carries MSVC alone'
+}