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-12 11:47
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » Processing of hiding drive letters View 5,588 Replies 23
Original Poster Posted 2007-02-05 02:22 ·  中国 北京 门头沟区 联通
初级用户
Credits 35
Posts 10
Joined 2007-01-29 06:10
19-year member
UID 78007
Gender Male
Status Offline
Hide F drive

@echo off
mountvol f: /l >MountPoint.txt
mountvol f: /d

Restore F drive

@echo
set /p name=<MountPoint.txt
mountvol f: %name%

Note: Do not place the executable file in the drive you are going to hide.
Floor 2 Posted 2007-02-05 05:50 ·  中国 湖南 株洲 电信
初级用户
★★
Credits 135
Posts 54
Joined 2006-09-10 03:07
19-year member
UID 62265
Status Offline
992912
Floor 3 Posted 2007-02-05 06:06 ·  中国 辽宁 沈阳 联通
初级用户
Credits 24
Posts 9
Joined 2006-12-27 02:53
19-year member
UID 74657
Gender Male
Status Offline
I just saw this not long ago,
It belongs to a prank,
There are many solutions.
Floor 4 Posted 2007-02-05 07:21 ·  中国 吉林 四平 联通
高级用户
★★★
Credits 859
Posts 413
Joined 2006-08-14 21:55
19-year member
UID 60532
Status Offline
I don't know if the C drive is okay /d
Floor 5 Posted 2007-02-07 12:06 ·  中国 福建 泉州 电信
初级用户
Credits 64
Posts 26
Joined 2006-01-10 16:34
20-year member
UID 48756
Status Offline
What is the main function of this parameter?
Floor 6 Posted 2007-02-08 01:20 ·  中国 江苏 连云港 电信
高级用户
★★★
前进者
Credits 641
Posts 303
Joined 2007-01-10 02:57
19-year member
UID 76009
Gender Male
Status Offline
I've never seen this command before. Thanks, but I still don't really know how to use it and don't dare to use it randomly.
我相信总有一天,总会遇到一个人可以相濡以沫、相吻以湿!
Floor 7 Posted 2007-02-08 01:41 ·  中国 甘肃 兰州 电信
金牌会员
★★★★
Credits 4,103
Posts 1,744
Joined 2006-01-20 13:00
20-year member
UID 49241
Gender Male
From 甘肃.临泽
Status Offline
This can also be used to list all current drive letters.
Floor 8 Posted 2007-02-08 01:52 ·  中国 吉林 四平 联通
高级用户
★★★
Credits 859
Posts 413
Joined 2006-08-14 21:55
19-year member
UID 60532
Status Offline
What will happen if you use this command to format the C drive with /d?
Floor 9 Posted 2007-02-08 01:52 ·  中国 江西 吉安 遂川县 电信
中级用户
★★
Credits 253
Posts 112
Joined 2006-05-31 11:12
20-year member
UID 56308
Gender Male
Status Offline
Floor 10 Posted 2007-02-08 02:05 ·  中国 江西 吉安 遂川县 电信
中级用户
★★
Credits 253
Posts 112
Joined 2006-05-31 11:12
20-year member
UID 56308
Gender Male
Status Offline
Using it in the C drive will cause system errors, such as desktop icons disappearing. Applications cannot be opened~ It will seriously affect system operations~
Floor 11 Posted 2007-02-08 22:06 ·  中国 吉林 四平 联通
高级用户
★★★
Credits 859
Posts 413
Joined 2006-08-14 21:55
19-year member
UID 60532
Status Offline
Floor 12 Posted 2007-03-12 09:50 ·  中国 北京 海淀区 IDC机房
初级用户
☆流星雨◇帅气冲天狂
Credits 24
Posts 21
Joined 2007-03-09 08:10
19-year member
UID 81176
Gender Male
From 广东
Status Offline
Develop the good habit of reading posts and replying to posts
Recent Ratings for This Post ( 1 in total) Click for details
RaterScoreTime
namejm -12 2007-03-12 10:15
Floor 13 Posted 2007-03-12 23:26 ·  中国 安徽 芜湖 电信
高级用户
★★★
Credits 866
Posts 415
Joined 2005-12-04 11:19
20-year member
UID 46459
Status Offline
Mountvol creates, deletes, or lists volume mount points. Mountvol is a way to connect volumes without a drive letter.

Syntax
mountvol [Drive:]Path VolumeName

mountvol [Drive:]Path /d

mountvol [Drive:]Path /L

mountvol Drive:/s

Parameters
[drive:]path
Specifies the existing NTFS directory folder where the mount point will reside.
VolumeName
Specifies the volume name of the target volume for the mount location. The general form of the volume name is \\?\Volume{GUID}\, where {GUID} is a Globally Unique Identifier (GUID) (for example, \\?\Volume\{2eca078d-5cbc-43d3-aff8-7e8511f60d0e}\).
/d
Deletes the volume mount point from the specified folder.
L
Lists the volume name mounted by the specified folder.
/s
Only for Itanium-based computers. Mounts the EFI system partition on the specified drive.
/?
Displays help at the command prompt.
Remarks
If all available drive letters are used up, mount a local volume without a drive letter.
If you want to extend volume space without reformatting or replacing the hard drive, you can add mount paths to another volume.
If you use a volume with multiple mount paths, the advantage is that you can access all local volumes using a single drive letter (such as C:). Although users can mount local volumes and assign drive letters to them, they don't need to remember which volume corresponds to which drive letter.
Floor 14 Posted 2007-03-12 23:44 ·  新西兰
初级用户
Credits 107
Posts 47
Joined 2007-03-03 03:12
19-year member
UID 80618
Gender Male
Status Offline
Modifying the registry can also do it

@echo off
REG ADD HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer /v NoDrives /t REG_DWORD /d 4294967295 /f

Hide all drive letters
Floor 15 Posted 2007-03-14 04:19 ·  中国 广东 东莞 电信
初级用户
Credits 50
Posts 21
Joined 2007-03-13 08:06
19-year member
UID 81579
Gender Male
Status Offline
LZ, I deleted the "mount point" file, and now I can't restore my CD drive letter.
Forum Jump: