I’ve been trying to create a batch file that calls out diskpart commands and then exits back to the batch file. The diskpart commands increase the size of the recovery partition.
Here is the current batch file I have:
@echo off
reagentc /disable
diskpart /s diskpartincreasepartition.txt
reagentc /enable
exit /b
And here’s what I have in the diskpartincreasepartition.txt file:
diskpart
list disk
sel disk 0
list part
sel part 5
shrink desired=1000 minimum=1000
sel part 4
delete partition override
create partition primary id=de94bba4-06d1-4d40-a16a-bfd50179d6ac
gpt attributes =0x8000000000000001
format quick fs=ntfs label="Windows RE tools"
exit
Right now, it just calls diskpart and doesn’t do anything else. I have both the .bat and .txt files saved to my USB drive with nothing else on it. I am running the .bat file that calls out the .txt file. What am I doing wrong here?
Zachary Widener is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.