Question

I would like to create a functionality for hiding a device, such as a DISK ON KEY, under explorer (for instance making E drive invisible).

I should emphasize I only want to HIDE the device (or drive letter) under my computer, and not entirely unmount it. just so the user does not see it.

How do I programmatically do this, without forcing a restart or killing explorer for the change to take effect?

Était-ce utile?

La solution

The easiest solution is to unassign the drive letter: DeleteVolumeMountPoint("E:\").

Autres conseils

You can hide a drive in the explorer using this registry value: NoDrives. However it will be accessible if someone types its drive letter.

You can have fine-grain control over access to the disks using a filter driver. You can write a minifilter yourself or there exist solutions such as our CallbackFilter that let you implement your business logic in user mode.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top