将要在diskpart输入的指令保存为文本文件命名为diskpart.txtselect disk 0select partition 2active然后在同一文件夹建立bat文件,内容如下diskpart /s diskpart.txt