How can I hide/show a system drive??
Printable View
How can I hide/show a system drive??
Not really a VB issue - but if you get hold of TweakUI by Microsoft (you can probably search for it on their website) it allows you to change many things including the visibility of drives in My Computer.
If this helps...
I meant through CODE
Depends on how you are listing drives (drivelistbox etc)
I meant ACTUALLY hide the drive in Windows. I know its possible because programs like Winboost can do it
hum, I dunno.
I read that the Tweak UI will indeed allow you to change drive visibility in MyComputer and that it does it through a registry change. The registry entry is as follows.
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer
DWORD Value named "NoDrives"
Basically you will want to put a decimal value in that registry entry based on the drive or drives you want to hide.
The values should be as follows:
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
You can use any one of these values to hide the one drive or you can add them to hide multiple drives (for example to hide drives D and E you would use the combined value or 24.
NOTE: This will not prevent access to the drive. There are still a ton of ways to get to it. Command Prompt, Start-Run-D:\, and numberous others but it will hide it in explorer/my computer.
Hope that helps,
KillemAll
That is an interesting post. Sounds like it might work. Thanks everyone. Also I have one more question that might also relate to that post. Using code, how can I diable/enable a drive's autorun? And if you are wondering, yes these questions are linked.
I think there's a registry setting somewhere.
____________________________________________________________
This is not as easy as the disable a drive question. Unless something has changed since i looked into this issue last ( a year or so ago) you have to change the following registry entry:
HKEY_LOCAL_MACHINE\Enum\SCSI\MEMOREX_CRW-1622________D\MF&CHILD0001&PCI&VEN_1106&DEV_0571&SUBSYS_00000000&REV_06&BUS_00&DEV_07&FUNC_0110
That is for the memorex I had.
HKEY_LOCAL_MACHINE\Enum\SCSI\KENWOOD_CD-ROM_UCR-421__2\MF&CHILD0001&PCI&VEN_1106&DEV_0571&SUBSYS_00000000&REV_06&BUS_00&DEV_07&FUNC_0100
That is for the Kenwood 72-X that I currently use.
There is really no way to know what entry a persons computer will have for their particular CD-Rom Drive. I think (if I am not mistaken) that this only applies to Win9x. I don't know for sure about WinME or Win2k but I am almost positive that it is not the same for WinNT.
You will probably just have to enumerate through all entries under "HKEY_LOCAL_MACHINE\Enum\SCSI\" until you find those with the correct value two subkeys deep. This Value is a hex 00 or 01. 00 turns it of and 01 turns it on. The value label is:
"AutoInsertNotification"
I hope that helps,
KillemAll
And dont forget the value "67108863" for all the drives...