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
eswar saiAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
eswar saiAuthor Commented:
Thank u i got an idea i am on win10 i will use home group option
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Networking

From novice to tech pro — start learning today.