mirror of
https://github.com/bin456789/reinstall.git
synced 2025-01-18 20:39:14 +08:00
8 lines
350 B
Batchfile
8 lines
350 B
Batchfile
@echo off
|
|
mode con cp select=437 >nul
|
|
|
|
set C=%SystemDrive:~0,1%
|
|
for /f "tokens=2" %%a in ('echo list vol ^| diskpart ^| findstr "\<installer\>"') do (echo select vol %%a & echo delete partition) | diskpart
|
|
for /f "tokens=2" %%a in ('echo list vol ^| diskpart ^| findstr "\<%C%\>"') do (echo select vol %%a & echo extend) | diskpart
|
|
del "%~f0"
|