[Windows] Introduction of the registry and commands to hide the physical drive displayed on Explorer

IT / Computer

Hello!This time I would like to introduce how to hide the local disk.

Windows is already an OS used by a wide range of users from children to adults.
Needless to say, it is used for children's education and the lives and hobbies of the elderly.

However, I think that I am using the installed software (Internet browser, application, etc.) rather than Windows, and I rarely mess with Windows itself.

A common problem at such times is that the file has gone somewhere, deleted, etc. after a strange operation.

One solution to avoid such an incident is to hide the drive.
If you can't see it, you won't be able to access it ... (laughs)

Of course, it will be much easier to manage by displaying only the drives that you can use even at work.

Let's see how to do it right away!

Thing you want to do

I want to hide the drive that is displayed on Windows 10 Explorer.
Doing this will hide the specified drive in Explorer.

Of course, it will not be displayed in the side menu.

Script example (when hiding C drive / D drive)

This time I will set it in the registry.Since it is in the form of a command as in the example, execute it from the command prompt etc. running by the administrator.

For all users

Reg Add "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v NoDrives /d 12 /t REG_DWORD

For only the set user

Reg Add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v NoDrives /d 12 /t REG_DWORD

The above commandCommand prompt started with administrator privilegesEnter inRebootThen it will be reflected.
In the sample, "C/D"XNUMX drives are hidden.


This time, the drive is hidden by adding the following registry.

* All users HKEY_LOCAL_MACHINE \ Software \ Microsoft \ Windows \ CurrentVersion \ Policies \ Explorer * Current user HKEY_CURRENT_USER \ Software \ Microsoft \ Windows \ CurrentVersion \ Policies \ Explorer Key name: NoDrives Key type: REG_DWORD Value: Value corresponding to each drive Total value (12 for C / D drive) * Details below

If this is set, the set drive will not be visible after rebooting.

To hide other drives

If you want to hide other drives,"" In the sample command12"Rewrite the part.

Reg Add "HKEY_CURRENT_USER \ Software \ Microsoft \ Windows \ CurrentVersion \ Policies \ Explorer" / v NoDrives / d 12 / t REG_DWORD

Example:C / D / E driveTo hide

Corresponding values ​​(see table below) C = 4, D = 8 Please rewrite with the value which added all.
4 + 8 =12

Example:E / F driveTo hide

Corresponding values ​​(see table below)E = 16, F = 32 Please rewrite with the value which added all.

16 + 32 =48

* To return the hidden setting to the default setting, delete the registry value added above.

Drive letter and value combination table

I made a list of each drive and numerical value for reference.
Please use it if you like.


Supplement: About flag processing using bits

As a supplement, the numerical value set this time is the flag processing that is often used.
When this value is converted to a binary number, it becomes C (4 = 0100) D (8 = 1000), and when this is added,
4 + 8 = 12 0100 + 1000 = 1100.

This method of switching 0/1 like a switch is often used, so it may be good to remember.


This time, I introduced a command to hide the drive letter displayed on Explorer ♪

I want to make the screen cleaner when I usually display Explorer!Lots of unnecessary information!If you feel that, you may try using the above command.

In the title, I wrote it as a physical drive, but even if you are using a slightly advanced usage (virtual drive etc.), if a drive letter is set, hide it in the same way. I can.

Please be careful about the order of the drive letters!

I hope it helps you.


Translate »
I copied the title and URL