const HKEY_LOCAL_MACHINE = &H80000002
strComputer = "."
'Set StdOut = WScript.StdOut
Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strComputer & "\root\default:StdRegProv")
strKeyPath = "SYSTEM\CurrentControlSet\Services\USBSTOR"
strValueName = "Start"
dwValue = 4
oReg.SetDWORDValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,dwValue
Use dwValue = 3 for enable
Monday, February 7, 2011
Disable USB Storage VB Script
Subscribe to:
Post Comments (Atom)
This is useful thanks and 5* for the same
ReplyDeleteVery very useful
ReplyDelete