隐藏硬盘CMD
@echo off
color 0a
mode con lines=20 cols=40
title 隐藏硬盘 はなふぶき
echo.
echo.
echo.
echo 隐藏硬盘(慎用)
echo 1.无(取消隐藏)
echo 2.A盘
echo 3.B盘
echo 4.C盘
echo 5.D盘
echo 6.E盘
echo 7.F盘
echo 8.全部
echo q.退出
echo.
echo.
set /p choice= 输入要隐藏盘的序号:
if {%choice%}=={} goto end
if /i %choice%==1 goto W
if /i %choice%==2 goto A
if /i %choice%==3 goto B
if /i %choice%==4 goto C
if /i %choice%==5 goto D
if /i %choice%==6 goto E
if /i %choice%==7 goto F
if /i %choice%==8 goto G
if /i %choice%==q goto end
:W
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v "NoDrives" /d 0 /t REG_DWORD /f
cmd /c taskkill /f /im explorer.exe&&explorer.exe
cls
exit
:A
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v "NoDrives" /d 1 /t REG_DWORD /f
cmd /c taskkill /f /im explorer.exe&&explorer.exe
cls
exit
:B
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v "NoDrives" /d 2 /t REG_DWORD /f
cmd /c taskkill /f /im explorer.exe&&explorer.exe
cls
exit
:C
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v "NoDrives" /d 4 /t REG_DWORD /f
cmd /c taskkill /f /im explorer.exe&&explorer.exe
cls
exit
:D
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v "NoDrives" /d 8 /t REG_DWORD /f
cmd /c taskkill /f /im explorer.exe&&explorer.exe
cls
exit
:E
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v "NoDrives" /d 10 /t REG_DWORD /f
cmd /c taskkill /f /im explorer.exe&&explorer.exe
cls
exit
:F
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v "NoDrives" /d 20 /t REG_DWORD /f
cmd /c taskkill /f /im explorer.exe&&explorer.exe
cls
exit
:end
cls
exit
::reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\" /v "winoldapp" /d disabled /t REG_DWORD /f