Search code examples
.netwindows-explorerwindows-explorer-integration

Adding a "fake drive" to Windows Explorer


An application I use, Mozy Backup, adds its own "drive" to Windows Explorer that I can browse and view all the files I've backed up. Windows knows it's not a physical drive - it's shows up under "Other" if my drive list is divided by type.

How is a "drive" like this registered with explorer? I'd like to do this with a current .NET application I'm developing, but I can't find any explanation about how it's done. Also, I can't seem to find any documentation about making my application "browsable", meaning that it presents a similar interface that a user can browse folders and files.

Here is a screenshot of what I'm talking about:
Example of Mozy drive


Solution

  • It is not registered with explorer. It is an operating system registration. What you do is write a device driver for windows that gets installed on the local system and looks to windows like a disk drive device. Instead of interfacing with some hardware (a physical device) your driver interfaces with something virtual (however, windows does not need to know this, it looks like a regular disk drive to windows).

    You can find out more about writing device drivers here:

    http://www.microsoft.com/whdc/driver/foundation/default.mspx

    and here

    http://msdn.microsoft.com/en-us/library/ms809956.aspx