|
按照你的思路其实很麻烦, 看下面的一点代码,试过我的机子能奏效,不过建议你开始玩UEFI+GPT,那个更好玩了。
@echo off&mode con lines=30 cols=80
title ActivePart_Marc提供
color 0a
setlocal enabledelayedexpansion
echo.
@echo ------------------------------------------------------------------------------
rd %systemdrive%\users\Dir_Test>nul 2>nul
md %systemdrive%\users\Dir_Test>nul 2>nul||(Echo 请使用右键管理员身份运行&&Pause >nul&&Exit)
rd %systemdrive%\users\Dir_Test>nul 2>nul
cls
echo list vol>%~dp0DiskPart.txt
echo exit>>%~dp0DiskPart.txt
diskpart /s %~dp0DiskPart.txt
echo ------------------------------------------------------------------------------
set /p choiceVol_6=请输入要激活分区的卷编号,我不检测无效编号,然后回车---
echo select vol !choiceVol_6!>%temp%\DiskPart.txt
echo active>>%temp%\DiskPart.txt
echo exit>>%temp%\DiskPart.txt
diskpart /s %temp%\DiskPart.txt
del /f /s /q %temp%\DiskPart.txt>nul 2>nul
|
|