windows: 禁止创建 winre 分区

This commit is contained in:
bin456789 2024-06-03 21:44:36 +08:00
parent bcfd36214b
commit ed84ad3f36
No known key found for this signature in database
GPG Key ID: EE301B386DE6C11B
4 changed files with 29 additions and 10 deletions

View File

@ -225,6 +225,7 @@ bash reinstall.sh windows \
- <https://www.microsoft.com/evalcenter/download-windows-server-2016>
- <https://www.microsoft.com/evalcenter/download-windows-server-2019>
- <https://www.microsoft.com/evalcenter/download-windows-server-2022>
- <https://www.microsoft.com/evalcenter/download-windows-server-2025>
</details>
@ -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

View File

@ -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

View File

@ -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

View File

@ -127,6 +127,10 @@
</settings>
<settings pass="oobeSystem">
<!-- 好像不起作用 -->
<!-- <component name="Microsoft-Windows-WinRE-RecoveryAgent" processorArchitecture="%arch%" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<UninstallWindowsRE>true</UninstallWindowsRE>
</component> -->
<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="%arch%" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<UserAccounts>
<AdministratorPassword>