China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-08-01 13:47
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » Hide disk drives with batch processing View 3,322 Replies 7
Original Poster Posted 2005-12-14 14:28 ·  中国 北京 朝阳区 联通
银牌会员
★★★
DOS联盟捡破烂的
Credits 1,144
Posts 425
Joined 2005-10-20 00:00
20-year member
UID 43784
From 北京
Status Offline
Actually, this is not something new for a long time. Just post it for fun. It's just modifying the registry. I didn't test it because I was considering the company's machines, so please ask some enthusiastic friend to help test it. Thanks in advance here! The following is his code~~~~~~~~~~~

@echo off
:recall
cls
echo.
echo.
echo ●█〓██▄▄▄▄▄▄ ●●●●●● Japan!
echo ▄▅██████▅▄▃▂
echo ██████████████
echo ◥⊙▲⊙▲⊙▲⊙▲⊙▲⊙▲◤
echo;
echo Please select the following disk drives to hide... ...Fill in the number in front... ...
echo.
echo (1) Hide local C drive
echo (2) Hide local D drive
echo (3) Hide local E drive
echo (4) Hide local F drive
echo (5) Hide all local disks
echo (6) Exit program
echo.
set /p ii=Please enter the corresponding number:
set ii=%ii:~-1%
if #%ii%==#1 goto c
if #%ii%==#2 goto d
if #%ii%==#3 goto e
if #%ii%==#4 goto f
if #%ii%==#5 goto all
if #%ii%==#6 goto end
cls
echo.
echo.
echo I`am Sorry!!! Please enter right number!!!
ping 1.1.1.1 -n 20 -w 100 >nul
goto recall
:c
echo Windows Registry Editor Version 5.00 >1.reg
echo. >>1.reg
echo [HKEY_CURRENT_USER\SoftWare\Microsoft\Windows\CurrentVersion\Policies\Explorer] >>1.reg
echo "NoDrives"=hex:01,00,00,00 >>1.reg
regedit /s 1.reg
del /f 1.reg
echo Hide C drive Finish~~~~~~~~
goto end
:d
echo Windows Registry Editor Version 5.00 >1.reg
echo. >>1.reg
echo [HKEY_CURRENT_USER\SoftWare\Microsoft\Windows\CurrentVersion\Policies\Explorer] >>1.reg
echo "NoDrives"=hex:02,00,00,00 >>1.reg
regedit /s 1.reg
del /f 1.reg
echo Hide D drive Finish~~~~~~~~
goto end
:e
echo Windows Registry Editor Version 5.00 >1.reg
echo. >>1.reg
echo [HKEY_CURRENT_USER\SoftWare\Microsoft\Windows\CurrentVersion\Policies\Explorer] >>1.reg
echo "NoDrives"=hex:04,00,00,00 >>1.reg
regedit /s 1.reg
del /f 1.reg
echo Hide E drive Finish~~~~~~~~
goto end
:f
echo Windows Registry Editor Version 5.00 >1.reg
echo. >>1.reg
echo [HKEY_CURRENT_USER\SoftWare\Microsoft\Windows\CurrentVersion\Policies\Explorer] >>1.reg
echo "NoDrives"=hex:08,00,00,00 >>1.reg
regedit /s 1.reg
del /f 1.reg
echo Hide F drive Finish~~~~~~~~
goto end
:all
echo Windows Registry Editor Version 5.00 >1.reg
echo. >>1.reg
echo [HKEY_CURRENT_USER\SoftWare\Microsoft\Windows\CurrentVersion\Policies\Explorer] >>1.reg
echo "NoDrives"=hex:ff,ff,ff,ff >>1.reg
regedit /s 1.reg
del /f 1.reg
echo Hide all drives Finish~~~~~~~~
goto end
:end
echo.
echo.
echo.
echo Welcome to use the batch hidden disk tool  Note: The effect can be seen after restarting!!!!!!!!!
Attachments
hidedrive.rar (765 bytes, Credits to download 1 pts, Downloads: 86)
Floor 2 Posted 2005-12-15 18:55 ·  中国 江苏 苏州 电信
新手上路
Credits 6
Posts 3
Joined 2005-12-15 11:36
20-year member
UID 47176
Gender Male
From 苏州
Status Offline
Not bad. It would be better to add a PAUSE later
Floor 3 Posted 2005-12-17 15:07 ·  中国 广东 广州 白云区 电信
初级用户
★★
Credits 152
Posts 74
Joined 2005-12-01 23:06
20-year member
UID 46314
Status Offline
Support
Floor 4 Posted 2005-12-17 20:52 ·  中国 广西 北海 电信
初级用户
Credits 54
Posts 18
Joined 2005-11-05 01:38
20-year member
UID 44610
Status Offline
Support!!Good stuff... I'll also add:
Finally add:
taskkill /f /im explorer.exe

explorer

Hehe, no need to restart....
Also display all drives:
@echo off
title Display all drives
reg delete

HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer /va /f

taskkill /f /im explorer.exe

explorer


[ Last edited by zhoung0 on 2005-12-17 at 20:58 ]
Floor 5 Posted 2006-01-02 16:22 ·  中国 江苏 苏州 吴江区 电信
初级用户
★★
Credits 125
Posts 72
Joined 2005-09-13 06:10
20-year member
UID 42467
Status Offline
Not bad, learned it..................
Floor 6 Posted 2006-01-02 20:37 ·  中国 江苏 连云港 电信
中级用户
★★
传说中的菜鸟
Credits 275
Posts 112
Joined 2005-04-22 00:00
21-year member
UID 38486
Gender Male
Status Offline
I can't understand it very well. I'll take it down and study it slowly.
Floor 7 Posted 2009-05-25 09:52 ·  中国 河南 郑州 联通
初级用户
Credits 29
Posts 24
Joined 2009-04-09 02:10
17-year member
UID 142464
Gender Male
From 河南
Status Offline
Floor 8 Posted 2010-12-29 12:02 ·  中国 广东 东莞 中移铁通
初级用户
★★
Credits 115
Posts 92
Joined 2010-12-24 16:57
15-year member
UID 179794
Gender Male
Status Offline
Learning
Forum Jump: