#Region ;**** 参数创建于 ACNWrapper_GUI ****
#AutoIt3Wrapper_icon=C:\autoit3\Aut2Exe\Icons\lock.ico
#AutoIt3Wrapper_outfile=Tools.exe
#AutoIt3Wrapper_Compression=4
#AutoIt3Wrapper_Res_Comment=工具权限锁
#AutoIt3Wrapper_Res_Description=龙旋风工具锁
#AutoIt3Wrapper_Res_Fileversion=1.0.0.0
#AutoIt3Wrapper_Res_LegalCopyright=免费软件 自由传播
#EndRegion ;**** 参数创建于 ACNWrapper_GUI ****
#Region AutoIt3Wrapper 预编译参数(常用参数)
;#AutoIt3Wrapper_Res_Field=AutoIt Version|%AutoItVer% ;自定义资源段
;#AutoIt3Wrapper_Run_Tidy= ;脚本整理
;#AutoIt3Wrapper_Run_Obfuscator= ;代码迷惑
;#AutoIt3Wrapper_Run_AU3Check= ;语法检查
;#AutoIt3Wrapper_Run_Before= ;运行前
;#AutoIt3Wrapper_Run_After= ;运行后
#EndRegion AutoIt3Wrapper 预编译参数设置完成
#cs ____________________________________
Au3 版本:3.3.6.1
脚本作者:东拼西凑
Email:control938@yeah.net
QQ/TM:5823475
脚本版本:1.0.0.0
脚本功能:工具权限锁
#ce _______________脚本开始_________________
#include <GUIConstants.au3>
#include <Process.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("龙旋风工具锁 V" & @YEAR, 288, 100, 354, 160);标题栏
GUISetBkColor(0x0066CC);设置窗体颜色
$Button1 = GUICtrlCreateButton("系统锁定", 30, 20, 100, 25, 0)
$Button2 = GUICtrlCreateButton("系统解锁", 160, 20, 100, 25, 0)
$Label1 = GUICtrlCreateLabel("系统时间:", 95, 65, 96, 25)
$Label2 = GUICtrlCreateLabel("Label2", 155, 65, 48, 25)
$sUsS = @UserName
$sUsN = "administrator"
$sUsP = @WDAY & @HOUR & @MDAY & @WDAY & @MON & @HOUR
login()
GUISetState(@SW_SHOW)
WinSetState($Form1,"",@SW_HIDE)
#EndRegion ### END Koda GUI section ###
While 1
If TrayGetMsg()=$TRAY_EVENT_PRIMARYDOWN Then
WinSetState($Form1,"",@SW_HIDE)
login()
WinSetState($Form1,"",@SW_SHOW)
EndIf
$nMsg = GUIGetMsg()
GUICtrlSetData($Label2, @HOUR & ':' & @MIN & ':' & @SEC)
Sleep(50)
Switch $nMsg
Case $GUI_EVENT_CLOSE
GUISetState(@SW_HIDE, $Form1)
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer", "NoRecentDocsMenu", "REG_DWORD", "00000001");开始菜单-隐藏文档
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer", "NoSetFolders", "REG_DWORD", "00000001");开始菜单-隐藏设置中的<控制面板>和<打印机>
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer", "NoSetTaskbar", "REG_DWORD", "00000001");开始菜单-隐藏设置中的<任务栏和开始菜单>1
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer", "NoChangeStartMenu", "REG_DWORD", "00000001");开始菜单-隐藏设置中的<任务栏和开始菜单>2
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer", "NoFavoritesMenu", "REG_DWORD", "00000001");开始菜单-隐藏收藏夹
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer", "NoFind", "REG_DWORD", "00000001");开始菜单-隐藏查找
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer", "NoSMHelp", "REG_DWORD", "00000001");开始菜单-隐藏帮助
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer", "NoRun", "REG_DWORD", "00000001");开始菜单-隐藏运行
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer", "StartMenuLogOff", "REG_DWORD", "00000001");开始菜单-隐藏注销
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer", "NoNetHood", "REG_DWORD", "00000001");桌面-隐藏网上邻居
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer", "NoTrayContextMenu", "REG_DWORD", "00000001");桌面-禁任务栏右键
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer", "NoActiveDesktop", "REG_DWORD", "00000001");桌面-禁<活动桌面>
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer", "NoCloseDragDropBands", "REG_DWORD", "00000001");桌面-禁止更改任务栏
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer", "NoFileMenu", "REG_DWORD", "00000001");资源管理器-隐藏文件菜单
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer", "NoNetConnectDisconnect", "REG_DWORD", "00000001");资源管理器-删除网络映射菜单
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer", "NoSharedDocuments", "REG_BINARY", "00000001");资源管理器-隐藏共享文档
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer", "NoLowDiskSpaceChecks", "REG_DWORD", "3ffffff");资源管理器-禁止显示磁盘空间不足
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer", "NoFolderOptions", "REG_DWORD", "00000001");开始菜单-隐藏设置中的<文件夹选项>
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer", "NoSetActiveDesktop", "REG_DWORD", "00000001");开始菜单-隐藏设置中的<活动桌面>
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer", "NoWindowsUpdate", "REG_DWORD", "00000001");开始菜单-隐藏设置中的<Windows Update>
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer", "NoControlPanel", "REG_DWORD", "00000001");开始菜单-锁定控制面板
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer", "NoRecentDocsHistory", "REG_DWORD", "00000001");开始菜单-禁止<文档>记载记录
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\system", "DisableLockWorkstation", "REG_DWORD", "00000001");系统-禁止锁定计算机
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\system", "DisableChangePassword", "REG_DWORD", "00000001");系统-禁止锁定电脑时修改密码
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\system", "Disableregistrytools", "REG_DWORD", "00000001");系统-禁用注册表编辑器
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Associations", "ModRiskFileTypes", "REG_SZ", ".exe");系统-禁用文件安全警告
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\ClassicStartMenu", "{450D8FBA-AD25-11D0-98A8-0800361B1103}", "REG_DWORD", "00000001");桌面-隐藏我的文档
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\ClassicStartMenu", "{20D04FE0-3AEA-1069-A2D8-08002B30309D}", "REG_DWORD", "00000001");桌面-隐藏我的电脑
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\ClassicStartMenu", "{208D2C60-3AEA-1069-A2D7-08002B30309D}", "REG_DWORD", "00000001");桌面-隐藏网络邻居
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\ClassicStartMenu", "{871C5380-42A0-1069-A2EA-08002B30309D}", "REG_DWORD", "00000001");桌面-隐藏IE
RegWrite("HKEY_CURRENT_USER\Software\Policies\Microsoft\Internet Explorer\Restrictions", "NoBrowserOptions", "REG_DWORD", "00000001");IE-禁IE选项
RegWrite("HKEY_CURRENT_USER\Software\Policies\Microsoft\Internet Explorer\Restrictions", "NoSelectDownloadDir", "REG_DWORD", "00000001");IE-禁止下载文件保存到磁盘
RegDelete("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Desktop\NameSpace\{645FF040-5081-101B-9F08-00AA002F954E}");桌面-隐藏回收站
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\3", "1803", "REG_DWORD", "00000003");IE-锁定IE下载功能
RegWrite("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurePipeServers\winreg", "RemoteRegAccess", "REG_DWORD", "00000001");禁止远程修改注册表
RegWrite("HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows\System", "DisableCMD", "REG_DWORD", "00000002");系统-禁用命令行
RegDelete("HKEY_CLASSES_ROOT\lnkfile", "IsShortcut"); 去除快捷方式的箭头
RegWrite("HKEY_CLASSES_ROOT\lnkfile","","REG_SZ",""); 去除快捷方式字样
RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run","龙旋风工具锁","REG_SZ",@AutoItExe);添加自启动项
;禁止组策略.
_RunDOS("regsvr32 /s /u fde.dll")
_RunDOS("regsvr32 /s /u gpedit.dll")
_RunDOS("regsvr32 /s /u gptext.dll")
_RunDOS("regsvr32 /s /u wsecedit.dll")
_RunDOS("gpupdate.exe /force");刷新策略
_RunDOS("gpupdate.exe /force");必须刷新两次才能见效果
;快捷方式
FileCreateShortcut(@ScriptFullPath,@DesktopCommonDir & "\龙旋风工具锁 .lnk")
FileCreateShortcut(@ScriptFullPath,@StartMenuDir & "\龙旋风工具锁 .lnk")
FileCreateShortcut(@ScriptFullPath,@StartMenuCommonDir & "\龙旋风工具锁 .lnk")
Case $Button1
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer", "NoRecentDocsMenu", "REG_DWORD", "00000001");开始菜单-隐藏文档
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer", "NoSetFolders", "REG_DWORD", "00000001");开始菜单-隐藏设置中的<控制面板>和<打印机>
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer", "NoSetTaskbar", "REG_DWORD", "00000001");开始菜单-隐藏设置中的<任务栏和开始菜单>1
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer", "NoChangeStartMenu", "REG_DWORD", "00000001");开始菜单-隐藏设置中的<任务栏和开始菜单>2
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer", "NoFavoritesMenu", "REG_DWORD", "00000001");开始菜单-隐藏收藏夹
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer", "NoFind", "REG_DWORD", "00000001");开始菜单-隐藏查找
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer", "NoSMHelp", "REG_DWORD", "00000001");开始菜单-隐藏帮助
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer", "NoRun", "REG_DWORD", "00000001");开始菜单-隐藏运行
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer", "StartMenuLogOff", "REG_DWORD", "00000001");开始菜单-隐藏注销
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer", "NoNetHood", "REG_DWORD", "00000001");桌面-隐藏网上邻居
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer", "NoTrayContextMenu", "REG_DWORD", "00000001");桌面-禁任务栏右键
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer", "NoActiveDesktop", "REG_DWORD", "00000001");桌面-禁<活动桌面>
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer", "NoCloseDragDropBands", "REG_DWORD", "00000001");桌面-禁止更改任务栏
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer", "NoFileMenu", "REG_DWORD", "00000001");资源管理器-隐藏文件菜单
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer", "NoNetConnectDisconnect", "REG_DWORD", "00000001");资源管理器-删除网络映射菜单
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer", "NoSharedDocuments", "REG_BINARY", "00000001");资源管理器-隐藏共享文档
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer", "NoLowDiskSpaceChecks", "REG_DWORD", "3ffffff");资源管理器-禁止显示磁盘空间不足
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer", "NoFolderOptions", "REG_DWORD", "00000001");开始菜单-隐藏设置中的<文件夹选项>
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer", "NoSetActiveDesktop", "REG_DWORD", "00000001");开始菜单-隐藏设置中的<活动桌面>
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer", "NoWindowsUpdate", "REG_DWORD", "00000001");开始菜单-隐藏设置中的<Windows Update>
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer", "NoControlPanel", "REG_DWORD", "00000001");开始菜单-锁定控制面板
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer", "NoRecentDocsHistory", "REG_DWORD", "00000001");开始菜单-禁止<文档>记载记录
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\system", "DisableLockWorkstation", "REG_DWORD", "00000001");系统-禁止锁定计算机
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\system", "DisableChangePassword", "REG_DWORD", "00000001");系统-禁止锁定电脑时修改密码
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\system", "Disableregistrytools", "REG_DWORD", "00000001");系统-禁用注册表编辑器
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Associations", "ModRiskFileTypes", "REG_SZ", ".exe");系统-禁用文件安全警告
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\ClassicStartMenu", "{450D8FBA-AD25-11D0-98A8-0800361B1103}", "REG_DWORD", "00000001");桌面-隐藏我的文档
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\ClassicStartMenu", "{20D04FE0-3AEA-1069-A2D8-08002B30309D}", "REG_DWORD", "00000001");桌面-隐藏我的电脑
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\ClassicStartMenu", "{208D2C60-3AEA-1069-A2D7-08002B30309D}", "REG_DWORD", "00000001");桌面-隐藏网络邻居
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\ClassicStartMenu", "{871C5380-42A0-1069-A2EA-08002B30309D}", "REG_DWORD", "00000001");桌面-隐藏IE
RegWrite("HKEY_CURRENT_USER\Software\Policies\Microsoft\Internet Explorer\Restrictions", "NoBrowserOptions", "REG_DWORD", "00000001");IE-禁IE选项
RegWrite("HKEY_CURRENT_USER\Software\Policies\Microsoft\Internet Explorer\Restrictions", "NoSelectDownloadDir", "REG_DWORD", "00000001");IE-禁止下载文件保存到磁盘
RegDelete("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Desktop\NameSpace\{645FF040-5081-101B-9F08-00AA002F954E}");桌面-隐藏回收站
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\3", "1803", "REG_DWORD", "00000003");IE-锁定IE下载功能
RegWrite("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurePipeServers\winreg", "RemoteRegAccess", "REG_DWORD", "00000001");禁止远程修改注册表
RegWrite("HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows\System", "DisableCMD", "REG_DWORD", "00000002");系统-禁用命令行
RegDelete("HKEY_CLASSES_ROOT\lnkfile", "IsShortcut"); 去除快捷方式的箭头
RegWrite("HKEY_CLASSES_ROOT\lnkfile","","REG_SZ",""); 去除快捷方式字样
RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run","龙旋风工具锁","REG_SZ",@AutoItExe);添加自启动项
;禁止组策略.
_RunDOS("regsvr32 /s /u fde.dll")
_RunDOS("regsvr32 /s /u gpedit.dll")
_RunDOS("regsvr32 /s /u gptext.dll")
_RunDOS("regsvr32 /s /u wsecedit.dll")
_RunDOS("gpupdate.exe /force");刷新策略
_RunDOS("gpupdate.exe /force");必须刷新两次才能见效果
;快捷方式
FileCreateShortcut(@ScriptFullPath,@DesktopCommonDir & "\龙旋风工具锁 .lnk")
FileCreateShortcut(@ScriptFullPath,@StartMenuDir & "\龙旋风工具锁 .lnk")
FileCreateShortcut(@ScriptFullPath,@StartMenuCommonDir & "\龙旋风工具锁 .lnk")
Case $Button2
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer", "NoRecentDocsMenu", "REG_DWORD", "00000000");开始菜单-隐藏文档
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer", "NoSetFolders", "REG_DWORD", "00000000");开始菜单-隐藏设置中的<控制面板>和<打印机>
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer", "NoSetTaskbar", "REG_DWORD", "00000000");开始菜单-隐藏设置中的<任务栏和开始菜单>1
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer", "NoChangeStartMenu", "REG_DWORD", "00000000");开始菜单-隐藏设置中的<任务栏和开始菜单>2
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer", "NoFavoritesMenu", "REG_DWORD", "00000000");开始菜单-隐藏收藏夹
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer", "NoFind", "REG_DWORD", "00000000");开始菜单-隐藏查找
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer", "NoSMHelp", "REG_DWORD", "00000000");开始菜单-隐藏帮助
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer", "NoRun", "REG_DWORD", "00000000");开始菜单-隐藏运行
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer", "StartMenuLogOff", "REG_DWORD", "00000000");开始菜单-隐藏注销
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer", "NoViewContextMenu", "REG_DWORD", "00000000");桌面-禁鼠标右键
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer", "NoTrayContextMenu", "REG_DWORD", "00000000");桌面-禁任务栏右键
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer", "NoCloseDragDropBands", "REG_DWORD", "00000000");桌面-禁止更改任务栏
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer", "NoFileMenu", "REG_DWORD", "00000000");资源管理器-隐藏文件菜单
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer", "NoDrives", "REG_DWORD", "0X00000000");资源管理器-隐藏盘符
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer", "NoViewOnDrive", "REG_DWORD", "00000000");禁止从我的电脑访问驱动器(只允许打开D盘)
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer", "NoFolderOptions", "REG_DWORD", "00000000");开始菜单-隐藏设置中的<文件夹选项>
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer", "NoControlPanel", "REG_DWORD", "00000000");开始菜单-锁定控制面板
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\system","NoDispAppearancePage","REG_DWORD","00000000");桌面-隐藏显示属性中的<外观>
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\system","NoDispScrSavPage","REG_DWORD","00000000");桌面-隐藏显示属性中的<屏幕保护>
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\system","NoDispSettingsPage","REG_DWORD","00000000");桌面-隐藏显示属性中的<设置>
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\system","NoDispBackgroundPage","REG_DWORD","00000000");桌面-隐藏显示属性中的<背景>
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\system", "DisableLockWorkstation", "REG_DWORD", "00000000");系统-禁止锁定计算机
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\system", "DisableChangePassword", "REG_DWORD", "00000000");系统-禁止锁定电脑时修改密码
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\system", "DisableTaskMgr", "REG_DWORD", "00000000");系统-禁用任务管理器
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\system", "Disableregistrytools", "REG_DWORD", "00000000");系统-禁用注册表编辑器
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\ClassicStartMenu", "{450D8FBA-AD25-11D0-98A8-0800361B1103}", "REG_DWORD", "00000000");桌面-显示我的文档
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\ClassicStartMenu", "{20D04FE0-3AEA-1069-A2D8-08002B30309D}", "REG_DWORD", "00000000");桌面-显示我的电脑
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\ClassicStartMenu", "{871C5380-42A0-1069-A2EA-08002B30309D}", "REG_DWORD", "00000000");桌面-显示IE
RegWrite("HKEY_CLASSES_ROOT\CLSID\{3FC0B520-68A9-11D0-8D77-00C04FD70822}\InProcServer32","","REG_EXPAND_SZ","%SystemRoot%\System32\shell32.dll");桌面-隐藏显示属性中的<桌面>
RegWrite("HKEY_CLASSES_ROOT\CLSID\{645FF040-5081-101B-9F08-00AA002F954E}\InProcServer32","","REG_SZ","shell32.dll");解锁回收站
RegWrite("HKEY_CLASSES_ROOT\CLSID\{450D8FBA-AD25-11D0-98A8-0800361B1103}\InProcServer32","","REG_SZ","mydocs.dll");解锁我的文档
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer","NoThemesTab","REG_DWORD","00000000");桌面-隐藏显示属性中的<主题>
RegWrite("HKEY_CURRENT_USER\Software\Policies\Microsoft\Internet Explorer\Restrictions", "NoBrowserOptions", "REG_DWORD", "00000000");IE-禁IE选项
RegWrite("HKEY_CURRENT_USER\Software\Policies\Microsoft\Internet Explorer\Restrictions", "NoFavorites", "REG_DWORD", "00000000");IE-禁IE收藏夹
RegWrite("HKEY_CURRENT_USER\Software\Policies\Microsoft\Internet Explorer\Restrictions", "NoSelectDownloadDir", "REG_DWORD", "00000000");IE-禁止下载文件保存到磁盘
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\3", "1803", "REG_DWORD", "00000000");IE-锁定IE下载功能
RegWrite("HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows\System", "DisableCMD", "REG_DWORD", "00000000");系统-禁用命令行
RegDelete("HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\Ratings");删除IE分级审查
;启用组策略.
_RunDOS("regsvr32 /s fde.dll")
_RunDOS("regsvr32 /s gpedit.dll")
_RunDOS("regsvr32 /s gptext.dll")
_RunDOS("regsvr32 /s wsecedit.dll")
_RunDOS("gpupdate.exe /force");刷新策略
_RunDOS("gpupdate.exe /force");必须刷新两次才能见效果
MsgBox(64, "提示", "系统解锁成功!")
;快捷方式
FileCreateShortcut(@ScriptFullPath,@DesktopCommonDir & "\龙旋风工具锁 .lnk")
FileCreateShortcut(@ScriptFullPath,@StartMenuDir & "\龙旋风工具锁 .lnk")
FileCreateShortcut(@ScriptFullPath,@StartMenuCommonDir & "\龙旋风工具锁 .lnk")
EndSwitch
WEnd
Func login()
If $sUsS <> $sUsN Then
$sUsPi = InputBox($sUsP, "请输入密码:", "", "*", 200, 80)
If $sUsPi = $sUsP Then
Else
MsgBox(64, "提示", "请联系管理员")
Exit
EndIf
EndIf
EndFunc ;==>login
看了版主的代码.套了一下,脚本提示$TRAY_EVENT_PRIMARYDOWN: 未声明的全局变量.谁帮我声明一下啊