Re: How to disable The Plug-and-play for new USB storage devises ? by jason
jason
Tue Mar 13 07:38:57 CDT 2007
disable USB
Dim o
Set o=WScript.CreateObject("WScript.Shell")
o.RegWrite
"HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\USBSTOR\Start",04,"REG_DWORD"
if
o.regread("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\USBSTOR\Start")=4
then
msgbox "USB Disable success!"
else
msgbox "USB Disable failure£¬please check perssion!"
end if
enable USB
Dim o
Set o=WScript.CreateObject("WScript.Shell")
o.RegWrite
"HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\USBSTOR\Start",03,"REG_DWORD"
if
o.regread("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\USBSTOR\Start")=3
then
msgbox "USB Enable success!"
else
msgbox "USB Enable failure£¬please check perssion!"
end if
"Alexander Grigoriev" <alegr@earthlink.net> дÈëÏûÏ¢ÐÂÎÅ:uqvsGvEVHHA.1200@TK2MSFTNGP04.phx.gbl...
> Search for "disable USB storage" in Microsoft knowledge base.
>
> <ranglz@gmail.com> wrote in message
> news:1171902938.069911.275840@h3g2000cwc.googlegroups.com...
>>I manage to disable old USB storage devices and new devices.
>> When there is a new storage devices connected the PnP open the
>> options
>> That enables the operation to browse the HD to locate the drivers.
>> Is there any option to disable all these dialogs?
>>
>> My application does not allow the user to access the HD in any way.
>>
>> Thanks
>>
>
>