From fccc7986d98537066017ed7f85c8930415aa00fd Mon Sep 17 00:00:00 2001 From: Guofang Date: Sun, 25 Oct 2026 13:10:52 +0800 Subject: [PATCH] Pick the ws2tcp-local download URL by CPU architecture Use windows_arm64_url on ARM64 and windows_x64_url otherwise, instead of the generic windows_url. Co-Authored-By: Claude Sonnet 5.5 --- seediso/windows11/70-Install-ws2tcp-local-Admin.bat | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/seediso/windows11/70-Install-ws2tcp-local-Admin.bat b/seediso/windows11/70-Install-ws2tcp-local-Admin.bat index 31720f9..fb7f628 100644 --- a/seediso/windows11/70-Install-ws2tcp-local-Admin.bat +++ b/seediso/windows11/70-Install-ws2tcp-local-Admin.bat @@ -12,9 +12,14 @@ if errorlevel 1 ( set "MANIFEST=https://wangguofang.net/ws2tcp-local/releases/latest.json" set "INSTALLER=%TEMP%\ws2tcp-local-setup.exe" -echo Looking up the latest ws2tcp-local release... +set "ARCH=%PROCESSOR_ARCHITECTURE%" +if defined PROCESSOR_ARCHITEW6432 set "ARCH=%PROCESSOR_ARCHITEW6432%" +set "KEY=windows_x64_url" +if /i "%ARCH%"=="ARM64" set "KEY=windows_arm64_url" + +echo Looking up the latest ws2tcp-local release (%ARCH%)... set "URL=" -for /f "usebackq delims=" %%U in (`powershell -NoProfile -ExecutionPolicy Bypass -Command "(Invoke-RestMethod -UseBasicParsing '%MANIFEST%').windows_url"`) do set "URL=%%U" +for /f "usebackq delims=" %%U in (`powershell -NoProfile -ExecutionPolicy Bypass -Command "(Invoke-RestMethod -UseBasicParsing '%MANIFEST%').'%KEY%'"`) do set "URL=%%U" if not defined URL ( echo Could not read the download URL from %MANIFEST%. if not defined INSTALL_ALL pause