禁用 USB 存储设备的批处理比如说默认情况下,puter OU 下面,为了禁用或开启的需要,我另建两个 OU: Disable USB/Enable USB, 1 、禁止使用(将下面的代码 copy 到记事本, ),将需要禁止的电脑,移到禁用 USB 的 Disable USB OU 中,然后在此 OU 中的 GPO 调用下面的脚本 Set objFSO = CreateObject("") If ("C:\windows\inf\") Then ("C:\windows\inf\") End If If ("C:\windows\inf\") Then ("C:\windows\inf\") End If If ("C:\windows\system32\drivers\") Then ("C:\windows\system32\drivers\") End If If ("C:\winnt\inf\") Then ("C:\winnt\inf\") End If If ("C:\winnt\inf\") Then ("C:\winnt\inf\") End If If ("C:\winnt\system32\drivers\") Then ("C:\winnt\system32\drivers\") End If Const HKEY_LOCAL_MACHINE = &H80000002 puter = "." Set objRegistry = GetObject("winmgmts:\\" & puter & "\root\default:StdRegProv") strKeyPath = "SYSTEM\CurrentControlSet\Services\UsbStor" strValueName = "Start" dwValue =4 HKEY_LOCAL_MACHINE,strKeyPath,strValueName,dwValue 2 、解除禁止(将下面的代码 copy 到记事本, ),对于已禁用的电脑, 需要解除的, 将需要解除的电脑移到: Enable USB 的 OU中, 然后在 OU 中的 GPO 调用, 待可以用后, 再移到正常使用的 OU中(Computer), 红色部分是具体文件及路径, 需要依你实际情况而定,可以预先
禁用USB存储设备的批处理 来自淘豆网www.taodocs.com转载请标明出处.