Click here to Skip to main content
14,392,678 members
Rate this:
Please Sign up or sign in to vote.
See more:
First, I would like to mention that I'm a C# programmer and I'm utterly blind with C++. I use C++ tags since according to search results, this task is unachievable in C# and I should use C++.

My application needs should has a feature to hide folders from explorer and other programs. According to search results, the best approach would be to use File system filter driver since I would like to avoid any rootkits behavior.

I'm using VS2005 and I'm willing to start learning C++ from basic. Can you guys give me some tutorial on those two topic (File system filter driver or basic c++ with GUI)?

[Edit]
Mr. Holguin's comment seems like what I really need, so I would like to ask if anyone has a tutorial on showing a file as folder. (My google-fu seems to be ineffective)
[/Edit]
Posted
Updated 20-Nov-11 15:58pm
v3
Comments
Emilio Garavaglia 18-Nov-11 2:42am
   
This sounds suspicious.
It is your application, but it is not you computer.
Let the computer owner to decide what he has to to with his own folders.
Firo Atrum Ventus 18-Nov-11 3:31am
   
Well, since there're applications such as folder lock I thought that it's okay to add a similar feature to my application (it's an image management app).
Rate this:
Please Sign up or sign in to vote.

Solution 1

Permission in Windows NT system.

But Remember for Admin its open
   
Comments
Firo Atrum Ventus 18-Nov-11 4:04am
   
Open for admin is its fatal flaw. I'm searching for a way to protect a folder from everyone but it's creator.
JackDingler 18-Nov-11 11:09am
   
Encryption is likely your best bet.

You won't be able to hide a folder from anyone doing Computer Forensics. They'll scan the sectors on the hard drive, and find your images anyway.
Rate this:
Please Sign up or sign in to vote.

Solution 3

The proper way to do this is don't make a single app solving everything including problems not related to the app itself.

There are two distinct separate problem here: An app that wants to manage images (that shouldn't question about folder nature, since they belong to the operating system) and the need to "secrete" the images and related management structure to the OS itself.

Now, if your app just manage images without having to save proper data structure I suggest you not to make any strang folder manage in your app, but afford the "secreting folder problem" in another distinct app.
This second app should be a shell extension[^] that access what for the OS is an encrypted file exposing to the OS itself as it is a folder one the user "unlocked" it.
If encryption is not a need, compound files[^] can also be a valid open data structure.
This way you end up with a more general and universal "strongbox" tool, and a simple and general "image editor".

If these functionalities are strongly related (that is: your app needs to store some proper information along with the images it manages) than consider the idea to use compound files[^]: you app will consider what for the OS is a file as a folder containing lot of things for itself only.
   
Rate this:
Please Sign up or sign in to vote.

Solution 2

Not sure what folder lock does, but my guess is it corrupts the directory structure so the locked folders no longer appear in the list, just like deleting pointers from a tree to prevent you looking at the data they point to. The software then provides you with an alternate way to access the folder, because it knows where it's stored.

This is dangerous for several reasons though:

1. backup software will not find such folders either, so you (or more to the point, the user) won't be able to make backups
2. Depending on how exactly you hide the folder other software using similar low level mechanichs (e. g. a defragger) might corrupt the data, because it doesn't know there actually is meaningful data in that location
3. Uninstallers will fail to free this folder, unless you provide an Uninstaller of your own
4. Users won't be able to exchange stored files with other, legitimate users, or with other programs (whether or not this makes sense is not for you to decide in a time where plugins are the rule rather than the exception...)

In short, I'd advise against it.
   
Comments
Albert Holguin 18-Nov-11 12:19pm
   
I think folder lock is actually just an encrypted file that allows users to load multiple files into it. This means that anyone can see it, just can't access it. Not sure if OP recognizes this difference.
Firo Atrum Ventus 20-Nov-11 20:18pm
   
So that means it loads this file as virtual folder when the user "unlocks" it, right?
Albert Holguin 20-Nov-11 21:14pm
   
Yep... pretty much.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100