How to block pendrive
Block your pendrive/stores devices
without software
Sometimes we need to block pendrive for our computer
safety. If you have a domain server and your client pc is added to your pc, you
may need to block this. You can use
third party app for this. But if you want you can do this very simply without
software.
Or you can do this for safe your pc from pendrive viruses. You can
use this tips on your local computer.
There are two systems to block pendrive
First:
block those pendrives which is not yet installed.
Second:
block those which is already installed your system.
First
step: for yet not installed:-
Open your notepad and copy the below code and paste
to notepad.
cd\
cd c:\windows\inf
cacls usbstor.inf /p system:n /e
cacls usbstor.pnf /p system:n /e
Now save this anyname.bat
this file will save as a
batch file. Now run this batch file with double click. Its done. Now if you
plug any pendrive you will get’Device can’t
be recognized ‘ type message.
Note: if you want to unlock change
this
> system:n to system:f
If you have domain controller copy the anyname.bat file and paste in %systemroot%\sysvol\sysvol\<domain_DNS_name>\scripts system folder and go >domain controller>user
properties> profile. Now in the text box of Logon Script, write the
name of your batch file. Now your user can’t use uninstalled pendrive. But they
can use those drive which are installed before.
Second
step: block installed pendrive
Copy and paste the below code to notepad and save it
as>anyname.reg
Windows
Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Servic
es\USBSTOR]
"Start"=dword:00000004
Now run this to block pre installed
pendrive.
Note: if you want to unlock change >
dword:00000004
to dword:00000003
If you have any
problem please take a minute to comment below.
Comments
Post a Comment