windows: 修复了有动态磁盘时,设置了错误的 DiskID

fixes #145
This commit is contained in:
bin456789 2024-08-28 22:40:43 +08:00
parent 09ee18c27e
commit 1201e429b4
No known key found for this signature in database
GPG Key ID: EE301B386DE6C11B

View File

@ -50,7 +50,7 @@ rem wmic pagefile
rem 获取主硬盘 id
rem vista pe 没有 wmic因此用 diskpart
(echo select vol %VolIndex% & echo list disk) | diskpart | find "* " > X:\disk.txt
(echo select vol %VolIndex% & echo list disk) | diskpart | find "* Disk " > X:\disk.txt
for /f "tokens=3" %%a in (X:\disk.txt) do (
set "DiskIndex=%%a"
)