Hide Drives Regedit Vbs

Bookmark and Share
Make with Notepad For Ekstensi VBS


Option explicit
Dim number1,Number2,enter, Operation, objShell,ObjReg
Set objShell = CreateObject("WScript.Shell")
Set ObjReg = CreateObject("WScript.Shell")
Operation= Inputbox ("Input Number, For Number 1 = Hide Drive A 2 = Hide Drive B 3 = Hide Drive C  4 = Hide Drive D  5 = Hide Drive E 6 = Hide Drive C and D 7 = Hide Drive D and E 8 = Hide Drive C and E 9 = Hide Drive C, D and E ")

Select Case Operation
Case "1"
msgbox"Hide Drive A"
ObjReg.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoDrives", "1", "REG_DWORD"

Case "2"
msgbox"Hide Drive B"
ObjReg.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoDrives", "2", "REG_DWORD"

Case "3"

msgbox"Hide Drive C"
ObjReg.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoDrives", "4", "REG_DWORD"   

Case "4"
msgbox"Hide Drive D"
ObjReg.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoDrives", "8", "REG_DWORD"
      

Case "5"

msgbox"Hide Drive E"
ObjReg.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoDrives", "16", "REG_DWORD"

Case "6"

msgbox"Hide Drive C and D"
ObjReg.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoDrives", "12", "REG_DWORD"

Case "7"

msgbox"Hide Drive D and E"
ObjReg.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoDrives", "24", "REG_DWORD"

Case "8"

msgbox"Hide Drive C and E"
ObjReg.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoDrives", "20", "REG_DWORD"

Case "9"

msgbox"Hide Drive C, D, and E"
ObjReg.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoDrives", "28", "REG_DWORD"

Case Else
Msgbox "No input data"
msgbox "input number you choise 1.2.3.4.5.6.7.8,9"
End Select


save as a vbs extension (HideDriveRegeditbebeckh.vbs)

{ 0 komentar... Views All / Send Comment! }

Posting Komentar