You are on page 1of 1

@echo off

REM
***********************************************************************************
**
REM ==== Description : This script disables All USB Ports on Windows Server &
Client
REM ==== Applied to : XP, Vista, 7, 8/8.1,10, 2008/08R2, 2012/12R2, 2016
and 2018
REM ==== Author : Yuvaraju P| http://hichamkadiri.wordpress.com

REM
***********************************************************************************
**

REM ==== Important : You have to run this script as "Administrator" !

REM
===================================================================================
==

[HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows\RemovableStorageDevices]
"Deny_All"=-

[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\RemovableStorageDevices]
"Deny_All"=dword:00000001

[HKEY_CURRENT_USER\SYSTEM\CurrentControlSet\Services\USBSTOR]
"Start"=-

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\USBSTOR]
"Start"=dword:00000003

[HKEY_CURRENT_USER\SYSTEM\CurrentControlSet\Services\CDRom]
"Start"=-

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\CDRom]
"Start"=dword:00000001

You might also like