USB权限控制
1、首先,关闭USB存储设备的盘符自动分配,打开注册表,到HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\USBSTOR,将"Start"的值改为4(禁止自动启动),默认为3是自动分配盘符 2、干掉USB存储设备的作用文件:进入WINDOWS系统目录,到X:\Windows\inf,这里说明一下,USB存储设备的作用文件有两个,分别是usbstor.inf和usbstor.pnf,因为后续可能需要重新打开USB功能,所以不要删除它,建议拷贝到其他位置,当然你要暴力一点,删除它也没关系,但记得做好备份。
发泡聚苯乙烯我用两条批处理指令实现:
copy %Windir%\inf\usbstor.inf %Windir%\usbstor.inf /y >nul
copy %Windir%\inf\usbstor.pnf %Windir%\usbstor.pnf /y >nul
del %Windir%\inf\usbstor.pnf /q/f >nul
del %Windir%\inf\usbstor.inf /q/f >nul
3、然后,禁止将电脑里的资料拷贝到USB存储设备,意思是把USB存储设备设置只读的,干成残废。
负压脉动式清肺仪打开注册表:定位到HKEY_LOCAL_MACHINE\SYSTEM \CurrentControlSet\Control,在其下新建一个名为“StorageDevicePolicies”的项,选中它,在右边的窗格中新建一个名为“WriteProtect”的DWORD值,并将其数值数据设置为1
批处理代码
关闭过程:
@echo off
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet Control\StorageDevicePolicies“ /v WriteProtect /t reg_dword /d 1 /f
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\USBSTOR" /v
Start /t reg_dword /d 4 /f
copy %Windir%\inf\usbstor.inf %Windir%\usbstor.inf /y >nul
copy %Windir%\inf\usbstor.pnf %Windir%\usbstor.pnf /y >nul
del %Windir%\inf\usbstor.pnf /q/f >nul
del %Windir%\inf\usbstor.inf /q/f >nul
@echo on
开启过程:
@echo off
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\USBSTOR" /v Start /t reg_dword /d 3 /f
copy %Windir%\usbstor.inf %Windir%\inf\usbstor.inf /y >nul
copy %Windir%\usbstor.pnf %Windir%\inf\usbstor.pnf /y >nul
助勃器del %Windir%\usbstor.pnf /q/f >nul
del %Windir%\usbstor.inf /q/f >nul
@echo on
将以上代码保存为两个BAT文档,然后放进x:\Windows\system32\目录下,比如DisableUSB.bat和EnableUSB.bat
然后直接在运行里面输入指令:DisableUSB (关闭)EnableUSB(开启)
具体实施的过程可以使用以下批处理来完成!
将以下代码保存为Scan.Bat,将DisableUSB.bat放到与批处理同一文件夹执行即可。
代码解释:扫描局域网中的计算机,扫描范围包括:192.168.1.1~192.168.8.254,扫描数量共计2032个,扫描到存活的主机后将DisableUSB.bat拷贝到对方机器的C$系统共享目录(这个得保证是开启状态),然后执行 @echo off
echo 操作成功的電腦IP包括:>E:\
for /l %%a in (1,1,8) do (
for /l %%b in (1,1,254) do (
ping -n 1 -w 50 192.168.%%a.%%b && net use \\192.168.%%a.%%b "password" /user:administrator && copy DisableUSB.bat \\192.168.%%a.%%b\C$\ Windows\System32\DisableUSB.bat && Start DisableUSB.bat>>E:\
石墨电极加工)销钉
)
电弧发生器