Domanda

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?

È stato utile?

Soluzione

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

Altri suggerimenti

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.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top