How to Create a Virtual Windows Drive

15,407

Solution 1

As I see, there are several options to implement this.

The "native" one is creating a custom driver (.sys file) that intercepts the I/O operations. Microsoft calls it MiniFilter. This option is the toughest one but allows you full control.

The coward's ;) option is to use a existing library to do this, examples of this are Dokan, GPL (dokan-dev.github.io), Pismo, free (pismotec.com) or Callback File System (callback.com/cbfsconnect).

However if you don't have Windows as main target, you can use FUSE which is a pretty good option.

Solution 2

If you (or someone else) still mind coding the driver itself, there are several opensource and working prototypes already:

Solution 3

to use the SUBST command in a script launched by your app could be an option.

Share:
15,407

Related videos on Youtube

HyLian
Author by

HyLian

Updated on October 05, 2021

Comments

  • HyLian
    HyLian over 2 years

    I'm trying to create a Windows Virtual Drive ( like c:\ ) to map a remote storage. The main purpose is to do it in a clear way to the user. Therefore the user wouldn't know that he is writing/reading from another site.

    I was searching for available products, and i find that FUSE is not an option in Windows and WebDAV maps directly the drive, and i would like to build a middle layer between windows and remote storage to implement some kind of services. Another alternatives exists, such as Dokan, that is very expensive, and System.IO.IsolatedStorage Namespace, that doesn't seem to explicity create a new Windows Drive.

    Probably pismo ( http://www.pismotechnic.com/ ) is the thing that mostly matches my requirements but I would know if there is another alternative, including some Windows ( C++ or .NET ) native API to do that.

    Thanks for reading :)

  • HyLian
    HyLian almost 15 years
    subst is a good option, but as long i would to implement a kind of middle layer, i would like to "catch" read and write events. I think that with subst I cannot implement that. Maybe i can make a "daemon" program which continously monitor the folder "substituted", but i prefer another option.
  • HyLian
    HyLian almost 15 years
    Thanks for your response but that's not exactly what i want :)
  • MSalters
    MSalters almost 15 years
    However, these objects only exist at Shell (Explorer) level. You cannot use them in CreateFile() calls.
  • Ivan G.
    Ivan G. over 13 years
    Unfortunately it's a black box and costs money.
  • tonek
    tonek about 13 years
    I see that it's very old question but what approche did you choose and how usable it was? Thank you!
  • HyLian
    HyLian about 13 years
    @tonek - We used Dokan, and well, playing with Windows Explorer and Filesystem issues is tough, but i think dokan is the best free option. If you want a paid one, go for Eldos.
  • VHanded
    VHanded almost 13 years
    Had anyone tried codeproject.com/KB/winsdk/Galaxy_Toolkit.aspx ? I not yet give it a try, but from description, it is doing the similar thing.
  • Eric F.
    Eric F. over 10 years
    Looks at GalaxyTK just now, I think its only provide Windows Shell NameSpace Extension which can't use like a mapped drive (see MSalters reply to Paul-Jan below)
  • Eugene Mayevski 'Callback
    Eugene Mayevski 'Callback over 9 years
    This is not what the OP wants.
  • Damn Vegetables
    Damn Vegetables almost 9 years
    A lot of programs I have seen created virtual "mapped network drive", not virtual hard disk drive. Is this because the former is easier to implement? If I want the former for virtual data I/O (for example, a virtual network drive for a web site storage), is Prismo still the best choice?
  • IsakBosman
    IsakBosman over 8 years
    This is not a marketing platform. Disclose that you work for the company before suggesting it. It fosters transparency and trust
  • Eugene Mayevski 'Callback
    Eugene Mayevski 'Callback over 8 years
    @Bozzy Please pay attention to the date of the answer when commenting. The rules were different that days. Also being polite doesn't hurt (a friendly hint for you).
  • ErikE
    ErikE over 7 years
    @EugeneMayevski'EldoS Ah, but now that you know the new policy, you can edit in the disclosure.