|
如图,
硬盘(5)中,本地磁盘(Z:)与有可移动存储的设备(3)中的可移动磁盘(U:),是同一个U盘。想把 硬盘(5)中,本地磁盘(Z:)去掉,应该修改CMD中什么地方?怎样修改?烦请高手们指点。谢谢!
部分CMD如下:
for /f "tokens=1,2,3,5 delims=|" %%a in ('drvtype -a ^|find ":"') do (
set diskorder=%%a
set hdtype=%%b
set gptmbr=%%c
set strdrv=%%d
set hddrv=
for %%e in (!strdrv!) do (
set eachdrv=%%e
set eachdrv=!eachdrv:~1,2!
set hddrv=!hddrv! !eachdrv!
set order=!order! !diskorder!:%%e
)
set hdtype=!hdtype:Vmware=!
if !hdtype! neq %%b (
set /a ii+=1
echo Vmware Internel !gptmbr! hard disk !ii! mount path: !hddrv!
set thddrv=!thddrv! !hddrv!
) else (
set hdtype=!hdtype:diskvirtual=!
if !hdtype! neq %%b (
set /a rr+=1
echo Virtual PC Internel !gptmbr! hard disk !rr! mount path: !hddrv!
set thddrv=!thddrv! !hddrv!
) else (
set "hdtype=!hdtype:Virtual=!"
if !hdtype! neq %%b (
set /a jj+=1
echo Virtual !gptmbr! hard disk !jj! mount path: !hddrv!
set virdrv=!virdrv! !hddrv!
) else (
set hdtype=!hdtype:RAMDISK=!
if !hdtype! neq %%b (
set /a oo+=1
echo RAMDISK !gptmbr! hard disk !oo! mount path: !hddrv!
set virdrv=!virdrv! !hddrv!
) else (
set hdtype=!hdtype:FIRADISK=!
if !hdtype! neq %%b (
set /a pp+=1
echo FIRADISK !gptmbr! hard disk !pp! mount path: !hddrv!
set firadrv=!firadrv! !hddrv!
) else (
set hdtype=!hdtype:USB=!
if /i !hdtype! neq %%b (
set /a nn+=1
set tmpsysdrv=!hddrv:%systemdrive%=!
if /i !hddrv! neq !tmpsysdrv! (
set uhddrv=!uhddrv! !hddrv!
)
echo Fixed USB !gptmbr! disk !nn! mount path: !hddrv!
) else (
set hdtype=!hdtype:SSD=!
if !hdtype! neq %%b (
set /a qq+=1
echo Solid State !gptmbr! Hard disk !qq! mount path: !hddrv!
if !qq!==1 (
for %%e in (!strdrv!) do (
set "eachdrv=%%e"
if "!eachdrv:~-1!"=="$" set actdrv=!eachdrv:~1,2!
)
)
set ssddrv=!ssddrv! !hddrv!
) else (
set /a ll+=1
if !ll!==1 (
if not defined actdrv (
for %%e in (!strdrv!) do (
set "eachdrv=%%e"
if "!eachdrv:~-1!"=="$" set actdrv=!eachdrv:~1,2!
)
)
)
set thddrv=!thddrv! !hddrv!
echo Internal !gptmbr! hard disk !ll! mount path: !hddrv!
)
)
)
)
)
)
)
) |
|