• Status: Solved
  • Priority: Low
  • Security: Public
  • Views: 40
  • Last Modified:

i want to block usb ports using batch file through wifi/lan

please help me i need to disable usb ports on all computers that are connected to a same network using batch files
0
eswar sai
Asked:
eswar sai
  • 4
  • 4
1 Solution
 
CESNetwork AdministratorCommented:
this is simple to do using group policy or registry changes.  Does this have to be a batch file?
0
 
Ali Raeis-MohammadCommented:
0
 
eswar saiAuthor Commented:
Not gpo only batch file
0
Improve Your Query Performance Tuning

In this FREE six-day email course, you'll learn from Janis Griffin, Database Performance Evangelist. She'll teach 12 steps that you can use to optimize your queries as much as possible and see measurable results in your work. Get started today!

 
CESNetwork AdministratorCommented:
I would then suggest using a test machine to disable the ports using the below instructions:

Go to Start > Run, type “regedit” and press enter to open the registry editor
Navigate to the following key
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\USBSTOR
In the right pane, select Start and change the value to  4 to disable USB Storage. Click OK.


Then export this registry setting to a .reg file.  Next, you can write a batch file to install this reg entry and reboot the computer.  that should do it.
0
 
eswar saiAuthor Commented:
Not on my pc i need to disable usb ports of all pc  that are connected my network using batch file i hope u can understand my wuestion now this a project plz help me out any one
0
 
CESNetwork AdministratorCommented:
You can change your values back afterwards by changing the 4 to a 3 in the registry key.  A batch file alone does not have the ability to disable USB ports, so you need to leverage the registry or PowerShell.  This link may be helpful:

https://www.experts-exchange.com/questions/26863745/batch-files-to-enable-and-disable-usb-port-and-cd.html
0
 
eswar saiAuthor Commented:
My question is that how can i run this batch files on other computers that are connected to my network
0
 
CESNetwork AdministratorCommented:
Oh ok...

so on some computer, you need to set up a shared folder and allow anonymous access (so that you are not prompted for password to access the share):

http://nikolar.com/2015/03/10/creating-network-share-with-anonymous-access/

then on the other computers, browse to that UNC path and run your batch file
1
 
eswar saiAuthor Commented:
Thank u i got an idea i am on win10 i will use home group option
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

  • 4
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now