Jump to content
Sign in to follow this  
Hina

How Can I Hide any Drive?

Recommended Posts

Hina
I want to hide the D-Drive of my PC from my kids by using Autoit so that It won't appear to anyone. By using which command of autoit I can do that??If U can help then it will be much appreciated

Share this post


Link to post
Share on other sites
Yashied

I want to hide the D-Drive of my PC from my kids by using Autoit so that It won't appear to anyone. By using which command of autoit I can do that??If U can help then it will be much appreciated

Registry

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

NoDrives = ... (0 - All Show, 1 - "A", 2 - "B", 4 - "C", 8 - "D", (1 + 8) - "A" and "D", etc)

*Requires restart

AutoIt

RegRead(), RegWrite(), Shutdown(2)

:D

Share this post


Link to post
Share on other sites
mrmacadamia

I wanna try on this. I know its easy ok.

If you want to hide FIXED drive only, i think this should be work.

$list = DriveGetDrive("FIXED")
If Not @error Then
MsgBox(4096,"", "Found " & $list[0] & " drives")
       For $i = 1 To $list[0]
        $drvname = StringLeft($list[$i], 1)
        Switch $drvname
            Case "c"
                RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer", "NoDrives", "REG_DWORD", "4")
            Case "d"
                RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer", "NoDrives", "REG_DWORD", "8")
            Case "e"
                RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer", "NoDrives", "REG_DWORD", "16")
            Case "f"
                RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer", "NoDrives", "REG_DWORD", "32")
            Case "g"
                RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer", "NoDrives", "REG_DWORD", "64")
            Case "h"
                RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer", "NoDrives", "REG_DWORD", "128")
            Case "i"
                RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer", "NoDrives", "REG_DWORD", "256")
        EndSwitch
    Next
EndIf

Share this post


Link to post
Share on other sites
Richard Robertson

Or go to your administrator tools, select computer management, select storage, select partition, select properties, set to not have a drive letter.

No restart required.

Edited by Richard Robertson

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.