I want to develop a program that can hide a folder. Not a hidden attribute, but a real hiding so that no applications can find it. I think for that I need to create a file system driver.
How can I do it in C#?
I want to develop a program that can hide a folder. Not a hidden attribute, but a real hiding so that no applications can find it. I think for that I need to create a file system driver.
How can I do it in C#?
You can't do it in C#.
You may find these videos interesting. Inside file system filters Part1 & Part2.
If you want privacy, you might be best to write an app that can encrypt a folder so that no other program can read it.
What about using the system attribute on the folder?
When you want to use your own file system you will also need a separate partition. An example are e.g. recovery tools on pre-installed Windows system which are installed in a separate hidden partition.
This is going to take a ton of work, and you are most likely going to end up corrupting your file system. Maybe you can tell us the 50,000 foot view of what you are trying to accomplish by hiding these folders.
Such as what is the need to hide these folders? They are just going to be hidden from users of the computer, but any software that reads the disc drive for recovery will still be able to read them, is this acceptable? Why isn't encryption with a hidden flag just as good?
// Get Application start up path
string path = Application.StartupPath;
// Create Batch File Path
string filePath = path + "\\Hide.bat";
// Write syntex to write in BAtch File
string strToWrite = "attrib +h +s " + '"' + path + '"';
// Create Batch File
FileStream fs = new FileStream(filePath, FileMode.Create);
StreamWriter sw = new StreamWriter(fs);
sw.WriteLine(strToWrite);
sw.Close();
fs.Close();
I think i have to create a file system filter driver for what i really want. Its not just changing attribute
May I suggest just downloading a rootkit instead of trying to build one from scratch?