From ed84ad3f3688eee23725b4e602726dd2a832a5e8 Mon Sep 17 00:00:00 2001 From: bin456789 Date: Mon, 3 Jun 2024 21:44:36 +0800 Subject: [PATCH] =?UTF-8?q?windows:=20=E7=A6=81=E6=AD=A2=E5=88=9B=E5=BB=BA?= =?UTF-8?q?=20winre=20=E5=88=86=E5=8C=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.en.md | 3 ++- README.md | 2 +- windows-setup.bat | 30 ++++++++++++++++++++++-------- windows.xml | 4 ++++ 4 files changed, 29 insertions(+), 10 deletions(-) diff --git a/README.en.md b/README.en.md index 13e7bcd..210f272 100644 --- a/README.en.md +++ b/README.en.md @@ -225,6 +225,7 @@ bash reinstall.sh windows \ - - - + - @@ -248,7 +249,7 @@ Use `Dism++` File menu > Open Image File, select the iso to be installed to get #### Supported systems - Windows (Vista ~ 11) -- Windows Server (2008 ~ 2022) +- Windows Server (2008 ~ 2025) - Windows Server Essentials - Windows Server (Semi) Annual Channel - Hyper-V Server diff --git a/README.md b/README.md index ae61151..69ad3fa 100644 --- a/README.md +++ b/README.md @@ -250,7 +250,7 @@ Windows Server 2022 SERVERDATACENTER #### 支持的系统 - Windows (Vista ~ 11) -- Windows Server (2008 ~ 2022) +- Windows Server (2008 ~ 2025) - Windows Server Essentials - Windows Server (Semi) Annual Channel - Hyper-V Server diff --git a/windows-setup.bat b/windows-setup.bat index 140dccc..80e1ef1 100644 --- a/windows-setup.bat +++ b/windows-setup.bat @@ -108,17 +108,31 @@ move /y %tempFile% %file% rename X:\setup.exe.disabled setup.exe -rem 运行 X:\setup.exe 的话 +rem 设置 +set EnableEMS=0 +set ForceOldSetup=0 +set DisableRecoveryPartition=1 + +if %EnableEMS% EQU 1 ( + set EMS=/EMSPort:COM1 /EMSBaudRate:115200 +) + +rem winre 分区会在 installer 分区前面创建 +rem 因此禁止创建 winre 分区,禁止后 winre 储存在 C 盘,依然有效 +if %DisableRecoveryPartition% EQU 1 if exist Y:\sources\reagent.* ( + set ResizeRecoveryPartition=/ResizeRecoveryPartition disable +) + +rem 运行 ramdisk X:\setup.exe 的话 rem vista 会找不到安装源 rem server 23h2 会无法运行 -rem Y:\setup.exe /emsport:COM1 /emsbaudrate:115200 - -rem 旧版安装程序 -rem Y:\sources\setup.exe - -rem 新版安装程序 -Y:\setup.exe +if %ForceOldSetup% EQU 1 ( + set setup=Y:\sources\setup.exe +) else ( + set setup=Y:\setup.exe +) +%setup% %ResizeRecoveryPartition% %EMS% exit /b :sleep diff --git a/windows.xml b/windows.xml index 3eae968..c9068a5 100644 --- a/windows.xml +++ b/windows.xml @@ -127,6 +127,10 @@ + +