Lock / hide partitions with "mountvol.exe"

Applies to Win versions XP-Pro / 2000


Using the "gpedit.msc" of the XP Pro version, it is only possible with greater effort to deny access to a volume / partition and the drive continues to be displayed despite the denial.
The aim is to remove the provision of a volume (partition) in order to prevent access, as drives are no longer displayed / mounted in Explorer.

requirements:
Win XP-Pro or Win 2000
Admin rights, since restricted users do not have access to "mountvol.exe" and the disk management in the standard setting.


Attention please:
The system and start partitions can also be switched off, the system then no longer starts because no one has access to the system any more.
Inexperienced users should, as always with such actions, make sure that they have a backup of the system.

In this example, drive G: \ should be locked / not displayed.

1.)
Open the command prompt (DOS box).
Start -> Run -> Input -> cmd -> ok

2.)
In the DOS box -> mountvol -> enter -> ok

mountvol


Now the IDs of each partition / volume are displayed with the corresponding LW letter including CD / DVD-Rom (s) and floppy disk.

A single / specific ID is displayed (here LW G: \) by entering
mountvol g: / L -> ok

This is what the entry / provision point for G: \ looks like, for example, which can vary within the curly brackets.

mountvol

3.)
mountvol g: / d
-> ok removes the provision of the LW.

4.)
mountvol g: \\?\Volume{acd14a26-5512-11d9-a341-806d6172696f}\
provides it again.


The provision can only be carried out when restarting / starting and logging in / out.
The provisioning can be canceled during the current session, the drive is immediately no longer displayed in Explorer, but can still be accessed via the disk management by right-clicking -> Open.
An Explorer window then appears with the folders / files it contains, which can still be accessed.
However, no recovery is possible during the session, neither on the old drive letter nor on a free drive letter.
Error message appears "The directory is not empty".

In order to ensure that LW G: \ can only be accessed automatically for a certain user, but not for all others, two batches / text files must be written and integrated as logoff, logon or login / logout scripts.

Batch for mounting the volume at startup and at login with the following content:

Insert the following line in a text editor and save it as, for example, with -lw-g.bat.

mountvol g: \\?\Volume{acd14a26-5512-11d9-a341-806d6172696f}\


In the XP-Pro version navigate using "gpedit.msc" under Start -> Run -> gepedit.msc -> ok
for Computer Configuration -> Windows Settings -> Scripts

3computer conf

Here double click on "starten", then -> Add -> Search -> and mark the file" mit-lw-g.bat "-> ok -> ok
As the next step, double-click on "shut down"with the same procedure and integrate the file" without-lw-g.bat ".

Now leave the computer configuration and switch to the user configuration
Do the same again in User Configuration -> Windows Settings -> Scripts -> Login / Logout To run.

4user conf

"ohne-lw-g.bat" for logging off.
"mit-lw-g.bat" for logging in.

From now on, drive G: \ is only available to the logged in user.

 

Transparency: This article may contain affiliate links. These lead directly to the provider. If a purchase is made through this, we receive a commission. There are no additional costs for you! These links help us to refinance the operation of win-tipps-tweaks.de.

___________________________________________________
This tip comes from www.win-tipps-tweaks.de
© Copyright Michael Hille

Warning:
Using Registry Editor or its tips incorrectly can cause serious system problems that may require you to reinstall your operating system. Tampering with the registry files and using the tips is at your own risk.