![]() |
|
[C#] Hiding Drives Using The Registry - Printable Version +- Hack Forums (https://hackforums.net) +-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444) +--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151) +---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118) +---- Thread: [C#] Hiding Drives Using The Registry (/showthread.php?tid=6222025) |
Hiding Drives Using The Registry - WeedIsInTheAir - Sep 23, 2022 Disclaimer >> You can find the original project and/or source in codeproject under the creator's name Gun Gun Febrianza. Perfect for beginners. Useful to some, useless to others. The creator left us a little message about the program: Gun Gun Febrianza Wrote:We must create a subkey in HKEY_CURRENT_USER and this is the path Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer we must create DWORD 'NoDrives' with value 4. Value 4 is used for hiding drive 'C'. Straight to the point. But not giving a lot of info either. We can Google ss64/nt/syntax-nodrives and learn more about this. SS64 Wrote:Copy the result into the registry to hide the drive letter(s) And even a deep quote by Carl Jung😁 Quote:“The dream is the small hidden door in the deepest and most intimate sanctum of the soul, which opens to that primeval cosmic night that was soul long before there was conscious ego and will be soul far beyond what a conscious ego could ever reach” ~ Carl Jung Now that we know what we're doing, let's peek the code. First thing we encounter is a restart() function Code private void restart()After hiding our drive(s) we are required to logoff/reboot in order to see the changes. This function kills the process explorer.exe (which is charge of displaying the UI) and runs it again. This allows us to see the changes without rebooting or logging off. Terminating the process via Task Manager will force you to start a new task as it won't start by itself. Just in case someone wondered. Let's continue exploring the *magic* behind scenes Code private void button_HideDrive_click(object sender, EventArgs e)As we already know what we are doing, this function is pretty self explanatory. Creating a registry key with the values "NoDrives" and value 4. Why 4? It's the value needed in order to hide the C: drive. More info can be found at the original project, you can click below to see other values. Spoiler (Click to View) Finally we close the registry and invoke the restart() function we talked about before, allowing us to see the changes in our system. I don't need to explain that this doesn't protect/encrypt your drive(s), right? Regards, |