Sunday, November 8, 2009

Disabling USB storage driver (USBSTOR)

Hello friends, in this articles I am going to describe you how to disable USB storage devices on your personal computer or your organization network.
Disabling USB storage driver (USBSTOR)
Open registry editor by typing REGEDIT in the RUN dialog box like this.

Locate the registry key

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\UsbStor\ Start
And change its value data to 4 (Disable).


The main drawback of this method is that, it only works if the USB storage driver is already installed. If it has not, Windows resets the Start value to 3 which enables the USB port again. So, manually you can enable or disable you USB storage device by setting its Start value to 3 (Enable) and 4 (Disable).

If you are “C” Lover then you can also do the above trick by using a snippet of code as below :

// Disabling USB Storage

#include

void main()

{

system("reg add HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\USBSTOR \/v Start \/t REG_DWORD \/d 4 \/f");

}

// Enabling USB Storage

#include

void main()

{

system("reg add HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\USBSTOR \/v Start \/t REG_DWORD \/d 3 \/f");

}

Compile the programs. Make .EXE file and distribute it to your friends. Enjoy!!!