Click here to Skip to main content
15,894,896 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All,
I am Doing a project, In that I want to create two Partition on my Pen-drive, in which one will be Hidden. Which can only be access through my application. How can I proceed on this. Please Help me. I want to do it with Visual Studio.

With Regards
Gireesh M
Posted
Updated 16-Nov-10 1:13am
v4

1 solution

Though im not getting any fair idea about what you want to do actually. But, I can tell you somthing about hiding/unhiding partition by customizing group policy from the registry.

what to do:
go to this path and create a new registry key named as "NoDrives", as a type DWORD (32-bit) Value at runtime.

"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer"

The Value of this key will control the hide/unhide the partition.
these are the value for the drive letters to be hiden

A=1, B=2, C=4, D=8, E=16, F=32, G=64, H=128, I=256, J=512, K=1024, L=2048, M=4096, N=8192, O=16384, P=32768, Q=65536, R=131072, S=262144, T=524288, U=1048576, V=2097152, W=4194304, X=8388608, Y=16777216, Z=33554432, All drives=67108863

Example:

After setting the key value, it would show like below if I hide "D" drive.

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer]
"NoDrives"=dword:00000008

follow this link to know, how to access registry at run time.:

http://msdn.microsoft.com/en-us/library/ms838625.aspx[^]


Njoy dude!!!!!!!
dont forget to vote me, if it's help u a bit.
 
Share this answer
 
Comments
Peter_in_2780 16-Nov-10 18:18pm    
I'm guessing this is not what he wants, even though it's good stuff. I think what OP wants is the partition to be hidden on ANY computer he puts the USB stick into. AFAIK, he can't *hide* it, but he could *encrypt* it, which probably achieves what he wants. Requires more thinking...

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900