diff --git a/resize.bat b/resize.bat index d003b6a..51b0847 100644 --- a/resize.bat +++ b/resize.bat @@ -1,2 +1,3 @@ +set C=%SystemDrive:~0,1% for /f "tokens=2" %%a in ('echo list vol ^| diskpart ^| findstr /i "installer"') do (echo select disk 0 & echo select vol %%a & echo delete partition) | diskpart -for /f "tokens=2" %%a in ('echo list vol ^| diskpart ^| findstr "\"') do (echo select disk 0 & echo select vol %%a & echo extend) | diskpart \ No newline at end of file +for /f "tokens=2" %%a in ('echo list vol ^| diskpart ^| findstr "\<%C%\>"') do (echo select disk 0 & echo select vol %%a & echo extend) | diskpart \ No newline at end of file