How to Create a Virtual Windows Drive
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:
- FileDisk and HttpDisk by Bo Brantén: http://www.acc.umu.se/~bosse/
- ImDisk by Olof Lagerkvist: http://www.ltr-data.se/opencode.html/#ImDisk
Solution 3
to use the SUBST command in a script launched by your app could be an option.
Related videos on Youtube
HyLian
Updated on October 05, 2021Comments
-
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 almost 15 yearssubst 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 almost 15 yearsThanks for your response but that's not exactly what i want :)
-
MSalters almost 15 yearsHowever, these objects only exist at Shell (Explorer) level. You cannot use them in CreateFile() calls.
-
Ivan G. over 13 yearsUnfortunately it's a black box and costs money.
-
tonek about 13 yearsI see that it's very old question but what approche did you choose and how usable it was? Thank you!
-
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 almost 13 yearsHad 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. over 10 yearsLooks 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 over 9 yearsThis is not what the OP wants.
-
Damn Vegetables almost 9 yearsA 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 over 8 yearsThis is not a marketing platform. Disclose that you work for the company before suggesting it. It fosters transparency and trust
-
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 over 7 years@EugeneMayevski'EldoS Ah, but now that you know the new policy, you can edit in the disclosure.