最新消息:

usb 禁用启用小工具,支持密码,进程保护

autoit 永恒心锁 1491浏览 0评论

usb 禁用启用小工具,支持密码,进程保护禁用usb存储设备,不禁用USB鼠标,启用USB存储设备需输入密码。
Alt + 0 = 退出脚本 Alt + 3 = 启用 Alt + 4 = 禁用
如果用户手动修改注册表启用usb,则程序自动修改成禁用。

#NoTrayIcon

#include <Misc.au3>

#include <ProtectProcess.au3>
Opt("TrayIconHide",1)

_ProtectProcess()

HotKeySet("!0","_quit");退出

HotKeySet("!3","open");开启USB

HotKeySet("!4","close");关闭USB





Global $Paused

While 1
$jianzhi = RegRead("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\USBSTOR","Start")
Sleep(600)
If $jianzhi = "3" Then
RegWrite ("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\USBSTOR","Start","REG_DWORD",4) 
DllCall("user32.dll","int","SendMessageTimeout","hwnd",65535,"int",26,"int",0,"int",0,"int",0,"int",1000,"str","dwResult")

EndIf
WEnd



Func open()
 
Dim $code,$mima
 $mima = "xxxxxx"
 $code = InputBox("密码验证","请输入正确的密码解锁","","*","-1","-1",default,default)
 
 If $code = $mima Then
 ;启用
RegWrite ("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\USBSTOR","Start","REG_DWORD",3)
DllCall("user32.dll","int","SendMessageTimeout","hwnd",65535,"int",26,"int",0,"int",0,"int",0,"int",1000,"str","dwResult")

;Run("gpupdate /force","",@SW_HIDE)
$Paused = Not $Paused
 While $Paused
 Sleep(100)
 
 WEnd
EndIf
EndFunc



Func close()



$Paused = Not $Paused
 While $Paused
 Sleep(100)
 
 WEnd

RegWrite ("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\USBSTOR","Start","REG_DWORD",4)
DllCall("user32.dll","int","SendMessageTimeout","hwnd",65535,"int",26,"int",0,"int",0,"int",0,"int",1000,"str","dwResult")

;Run("gpupdate /force","",@SW_HIDE)
EndFunc



Func _quit()
$mi = "xxxxxxxxxx"
$duqu = InputBox("退出程序 __ hzpc","请输入正确的密码","","*","130","130",default,default)

If $duqu = $mi Then
 
Exit
 
 EndIf
EndFunc
免责声明:根据《计算机软件保护条例》第十七条规定“为了学习和研究软件内含的设计思想和原理,通过安装、显示、传输或者存储软件等方式使用软件的,可以不经软件著作权人许可,不向其支付报酬。”您需知晓本站所有内容资源均来源于网络,仅供用户交流学习与研究使用,版权归属原版权方所有,版权争议与本站无关,用户本人下载后不能用作商业或非法用途,需在24个小时之内从您的电脑中彻底删除上述内容,否则后果均由用户承担责任;如果您访问和下载此文件,表示您同意只将此文件用于参考、学习而非其他用途,否则一切后果请您自行承担,如果您喜欢该程序,请支持正版软件,购买注册,得到更好的正版服务。丨本站为个人博客非盈利性站点,所有软件信息均来自网络,所有资源仅供学习参考研究目的,并不贩卖软件,不存在任何商业目的及用途。丨本文采用知识共享 署名4.0国际许可协议 [BY-NC-SA] 进行授权BY-NC-SA协议进行授权

转载请注明:永恒心锁-分享互联网 » usb 禁用启用小工具,支持密码,进程保护

您必须 登录 才能发表评论!