How to enable or disable USB storage device?

  • Thread starter Thread starter kiros
  • Start date Start date
K

kiros

Hi all
Is there any way to control the usb storage device enable or disable?

My xpe image has two accounts, one is User, another is Administrator.
As default, i want the User can't access the Usb storage device.
So i want to disable it. But when he login with administrator.
He can enable it again. Is there any way ( like registry key ) to do that?

It's very urgent.
Thanks

Kiros
 
Hi Kiros,

Use devcon.exe on USBSTOR.

Or registry entry:
HKLM\SYSTEM\CurrentControlSet\Services\USBSTOR\Start = 4 (For disable) (3 for enable)

For registry entry to work you will have to disconnect all devices. And then connect them.
Devcon can stop devices.

Regards,
Slobodan
 
Thanks, Slobodan

Now i can let the usb storage device enable or disable by setting the registry.
But there is a problem about the usb floppy.
When i plug the usb floppy first time.(The registry entry is disable)
The PnP will detect it(Use device manager to see, it will show the conflict.)
but can't use. That's OK.

But when i set the registry entry enable and plug it again.
It's nothing happen. And the device manager still show a conflict with it.
I must uninstall it and plug again. And the usb floppy will work.

I don't know why it can't work immediately when i plug.
Because i use the usb cdrom, usb flash drive, usb HD, they will work
immediately when i plug them. (The registry entry is enable.)

Thanks
Kiros
 
Hi Kiros,

I never tried USB floppy. Or to do thing that you want.
But be aware that when you plug new device during the install registry entry will change and enable (this must be changed for
instance in usbstor.inf file)

Anyhow you will have to play with these and use devcon.exe for installing/uninstallin, operations.

Regards,
Slobodan
 
Back
Top