Introduction: Secret Partition
This idea came to me when I saw the new Asus Rog GT51. This desktop has a really cool feature : hide or show a drive partition by passing a bracelet (with NFC tag embedded in it) in front of the case.
I made some research and I'm now able to do the same thing with a tiny batch script. In few steps, you will be able to do the same : to hide your data and keep more privacy on your PC !
Before starting : you will do some serious manipulations on your PC. All manipulations are on your own risk and I can't be blame if something goes wrong during this tutorial.
Let's do this !
Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.
Step 1: Create Partition
If you already have a partition (or a drive) you want to hide, you don't have to read this and you can directly skip this step to the next one !
I won't show you screenshots of me creating a new partition : my OS is in French and I won't be able to explain clearly the instructions. But, here is a great tutoral to help you to do so : https://technet.microsoft.com/en-us/magazine/gg309...
Step 2: Take Measures
Okay, now we will check the letter and the number of the volume to hide. To do that :
- open a command prompt by win key + r and type "cmd"
- type "diskpart" and hit the return key. A new window should show up
- in this new window, type "list volume" and hit enter. The list of all drives/partitions will appear. Here you have to take note of the number and the partition name you want to hide. In my case, I choose the fifth volume with the letter G. Be careful, you won't be able to hide the partition were your OS is installed.
- to hide a partiton you have to type those two lines :
"select volume X" (where X is the number of the volume you want to hide. In my case 5) hit return
"remove letter X" (where X is the letter assign to your volume. In my case G) hit return
At this moment, your volume is hidden and no one can access to the files it contains !
- to show it again, you have to type those two lines :
"select volume X" (where X is the number of the volume you want to show. In my case, still 5) hit return
"assign letter X" (where X is the letter assign to your volume. In my case G) hit return
Now, your drive is in the exact same state that before you start the above manipulation. Keep in mind what was the number and the letter ;)
The next step is the set up of a script to automatize the execution of the show/hide. So before going further, please ensure these 4 lines of command work !
Step 3: Script Is Life
Now, we have to create two files that are going to act like a switch : hide the partition when it is visible or show it up if it is hidden.
What are those two file : the first one, is a simple text file (.txt) that contains instructions that will be executed by diskpart. The second one, is a batch script (file with the .bat extention) that will read and edit the txt file and then run diskpart with right instructions.
How does it work ?
- the .bat file starts by reading the text file to know the last instruction launched (hide or show?)
- according to that, it will rewrite the txt file with the opposite instruction !
- then, ask to diskpart to run instructions contained in the txt file !
The two files are attached to this step. You will have to edit them to change the number of the volume and the letter assign to it.
Once done, you just have to execute the .bat file to hide/show your partition !
Tip : if you want to link the execution with something else (like an nfc detection) you will have to run the script as an administrator. In order to do that, create a shortcut to the batch file, right click on it and in properties --> advanced you have to check the box to always run this as an administrator.