diff --git a/README.en.md b/README.en.md index 85e40b4..13e7bcd 100644 --- a/README.en.md +++ b/README.en.md @@ -215,14 +215,15 @@ bash reinstall.sh windows \ - Massgrave - (Recommended, iso sourced from official channels, updated monthly, includes the latest patches) - Microsoft - - - - (Need to open it with a mobile User-Agent) - - - - - - - - - - - - + - + - (Need to open it with a mobile User-Agent) + - + - + - + - + - + - + - - diff --git a/README.md b/README.md index 7a85a2a..ae61151 100644 --- a/README.md +++ b/README.md @@ -221,10 +221,12 @@ bash reinstall.sh windows \ - - - + - - - - - + - diff --git a/reinstall.sh b/reinstall.sh index fea5e7c..3700f5b 100644 --- a/reinstall.sh +++ b/reinstall.sh @@ -489,7 +489,7 @@ is_have_arm_version() { 11) case "$edition" in pro | education | enterprise | 'pro education' | 'pro for workstations') return ;; - 'iot enterprise') return ;; + 'iot enterprise' | 'iot enterprise subscription') return ;; 'enterprise ltsc 2024' | 'iot enterprise ltsc 2024' | 'iot enterprise ltsc 2024 subscription') return ;; esac ;; @@ -535,7 +535,7 @@ get_windows_iso_links() { esac ;; '2012 r2' | \ - 2016 | 2019 | 2022) + 2016 | 2019 | 2022 | 2025) case "$edition" in serverstandard | serverstandardcore) echo _ ;; serverdatacenter | serverdatacentercore) echo _ ;; @@ -594,7 +594,7 @@ get_windows_iso_links() { case "$edition" in home | 'home single language') echo consumer ;; pro | education | enterprise | 'pro education' | 'pro for workstations') echo business ;; - 'iot enterprise') echo 'iot enterprise' ;; + 'iot enterprise' | 'iot enterprise subscription') echo 'iot enterprise' ;; 'enterprise ltsc 2024') echo 'enterprise ltsc 2024' ;; 'iot enterprise ltsc 2024' | 'iot enterprise ltsc 2024 subscription') echo 'iot enterprise ltsc 2024' ;; esac diff --git a/trans.sh b/trans.sh index 7de1de3..0cf8aa5 100644 --- a/trans.sh +++ b/trans.sh @@ -1304,7 +1304,8 @@ create_part() { size_bytes=$((7 * 1024 * 1024 * 1024)) fi - # 按iso容量计算分区大小,200m用于驱动和文件系统自身占用 + # 按iso容量计算分区大小 + # 200m 用于驱动/文件系统自身占用 + pagefile (手动 dism 释放镜像时使用) part_size="$((size_bytes / 1024 / 1024 + 200))MiB" apk add ntfs-3g-progs diff --git a/windows-setup.bat b/windows-setup.bat index 02c8ebc..140dccc 100644 --- a/windows-setup.bat +++ b/windows-setup.bat @@ -40,8 +40,13 @@ for /f "tokens=2" %%a in ('echo list vol ^| diskpart ^| find "installer"') do ( rem 将 installer 分区设为 Y 盘 (echo select vol %VolIndex% & echo assign letter=Y) | diskpart -rem 设置虚拟内存,好像没必要,安装时会自动在 C 盘设置虚拟内存 -rem wpeutil CreatePageFile /path=Y:\pagefile.sys +rem 旧版安装程序会自动在 C 盘设置虚拟内存 +rem 新版安装程序(24h2)不会自动设置虚拟内存 +rem 在 installer 分区创建虚拟内存,不用白不用 +call :createPageFile + +rem 查看虚拟内存 +rem wmic pagefile rem 获取主硬盘 id rem vista pe 没有 wmic,因此用 diskpart @@ -107,7 +112,13 @@ rem 运行 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 + exit /b :sleep @@ -117,3 +128,13 @@ echo wscript.sleep(%~1) > X:\sleep.vbs cscript //nologo X:\sleep.vbs del X:\sleep.vbs exit /b + +:createPageFile +rem 尽量填满空间,pagefile 默认 64M +for /l %%i in (1, 1, 10) do ( + wpeutil CreatePageFile /path=Y:\pagefile%%i.sys 2>nul + if errorlevel 1 ( + exit /b + ) +) +exit /b