![]() |
中国DOS联盟-- 联合DOS 推动DOS 发展DOS --联盟域名:www.cn-dos.net 论坛域名:www.cn-dos.net/forum |
| 游客 | 登录 | 注册 | 会员 | 搜索 | 中国DOS联盟 |
|
中国DOS联盟论坛 现在时间是 2026-08-04 02:22 |
共 48,038 主题排行 / 350,123 发帖 / 今日 0 篇 / 48,251 会员排行 |
| DOS批处理 & 脚本技术(批处理室) » baomaboy上此的锁定注册表文件谁能帮改一下? |
| 可打印版本 790 / 2 |
| 第1楼 wjlove2002 | 发表于 2007-04-11 03:57 |
| 初级用户 发帖 18 积分 51 | |
|
baomaboy上此的锁定注册表文件谁能帮改一下? Dim WshShell,FSO
On Error Resume Next Set WshShell = WScript.CreateObject("WScript.Shell") Set FSO = CreateObject("Scripting.FileSystemObject") Set WinVer = WshShell.Environment("Process") Set Args = WScript.Arguments CloseTime = 5 FileName = WScript.ScriptName FileFullName = WScript.ScriptFullName FilePath = FSO.GetParentFolderName(FileFullName) InsPath = FSO.GetSpecialFolder(1) InsFullName = FSO.BuildPath(InsPath ,FileName) LnkPathNT = WshShell.SpecialFolders(2) LnkPath9X = WshShell.SpecialFolders(14) LnkPathAll = WshShell.SpecialFolders("StartMenu") OtherFileName="regini.exe" OtherFilePath=FSO.GetSpecialFolder(1) TemFileName="regset.bat" TemFilePath=FSO.GetSpecialFolder(2) Copyright="玲珑科技" QQ="QQ:25926183" Email="Email:fty1995@163.com" InsTitle="锁定注册表启动权限" InsAnswer="锁定注册表启动权限" If WinVer("OS") = "Windows_NT" Then RegPath1="HKEY_CLASSES_ROOT\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}\shell\lockupregistry\" RegValue1="锁定/释放启动项" RegForm1="REG_SZ" RegPath2="HKEY_CLASSES_ROOT\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}\shell\lockupregistry\command\" RegValue2="wscript.exe "&InsFullName RegForm2="REG_SZ" RegPath3="HKLM\SOFTWARE\LLKJ\SYSSoft\LockUp_Registry\LockUp" RegValue3="0" RegForm3="REG_DWORD" RegPath9="HKEY_CLASSES_ROOT\Drive\shell\" RegPath10="HKEY_CLASSES_ROOT\Folder\shell\" RegPath11="HKEY_CLASSES_ROOT\Directory\shell\" RegValue13="open" WshSHell.RegWrite RegPath9,RegValue13,RegForm1 WshSHell.RegWrite RegPath10,RegValue13,RegForm1 WshSHell.RegWrite RegPath11,RegValue13,RegForm1 IF FileFullName <> InsFullName then intAnswer = MsgBox("【是】将“"+ InsAnswer +"”加入到我的电脑右键菜单,"&Chr(10)&Chr(10)&"【否】将“"+ InsAnswer +"”从我的电脑右键菜单删除。 ", vbQuestion + vbYesNoCancel, "安装 - "+ InsTitle +" - "+ Copyright) If intAnswer = vbYes Then FSO.GetFile(FileFullName).Copy(InsFullName) If (FSO.FileExists(FSO.BuildPath(OtherFilePath,OtherFileName)))=false Then'''由于上传前调试代码添加=false请之前看过朋友自行删除吧 else If (FSO.FileExists(FSO.BuildPath(FilePath,"regini.llkj"))) Then FSO.GetFile(FSO.BuildPath(FilePath,"regini.llkj")).Copy(FSO.BuildPath(OtherFilePath,OtherFileName)) else Call alltovbs end if end if WshSHell.RegWrite RegPath1,RegValue1,RegForm1 WshSHell.RegWrite RegPath2,RegValue2,RegForm2 WshSHell.RegWrite RegPath3,RegValue3,RegForm3 WshShell.popup _ "添加脚本文件:"+chr(10)+InsFullName+chr(10)+chr(10)+ _ "添加注册表项:"+chr(10)+chr(34)+ RegPath1 +chr(34)+chr(10)+ _ chr(10) & CloseTime & " 秒钟后本窗口将自动关闭!" +chr(10)+chr(10)+ _ chr(10) & "Copyright(C) " + Copyright +" " & QQ &" " + Email _ , CloseTime, "安装成功 - "+ InsTitle +" - "+ Copyright, 0 + 64 WshSHell.Run (InsFullName),vbHide end if If intAnswer = vbNo Then FSO.DeleteFile InsFullName WshSHell.RegDelete RegPath3 WshSHell.RegDelete RegPath2 WshSHell.RegDelete RegPath1 WshShell.popup _ "删除脚本文件:"+chr(10)+InsFullName+chr(10)+chr(10)+ _ "删除注册表项:"+chr(10)+chr(34)+ RegPath1 +chr(34)+chr(10)+ _ chr(10) & CloseTime & " 秒钟后本窗口将自动关闭!" +chr(10)+chr(10)+ _ chr(10) & "Copyright(C) " + Copyright +" " & QQ &" " + Email _ , CloseTime, "卸载成功 - "+ InsTitle +" - "+ Copyright, 0 + 64 end if If intAnswer = vbCancel Then end if ELSE if WshSHell.RegRead(RegPath3) = "0" then WshSHell.RegWrite RegPath3, 1,"REG_DWORD" WshSHell.RegWrite RegPath1,"释放启动项" ULR="" WshShell.popup chr(10) &_ "注册表启动项已经锁定。"+ chr(10) &chr(10) & _ chr(10) & CloseTime & " 秒钟后本窗口将自动关闭!" +chr(10)+chr(10)+ _ chr(10) & "Copyright(C) " + Copyright +" " & QQ &" " + Email _ , CloseTime, "锁定系统注册表 - "+ InsTitle +" - "+ Copyright, 0 + 64 else WshSHell.RegWrite RegPath3, 0,"REG_DWORD" WshSHell.RegWrite RegPath1,"锁定启动项" ULR="" WshShell.popup chr(10) &_ "注册表启动项已解除锁定。"+ chr(10) &chr(10) & _ chr(10) & CloseTime & " 秒钟后本窗口将自动关闭!" +chr(10)+chr(10)+ _ chr(10) & "Copyright(C) " + Copyright +" " & QQ &" " + Email _ , CloseTime, "解除注册表锁定 - "+ InsTitle +" - "+ Copyright, 0 + 64 end if inilujing=FSO.BuildPath(InsPath,"regset.ini") with FSO.OpenTextFile(FSO.BuildPath(InsPath ,TemFileName),2,true) if err.number<>0 then wscript.quit .writeline "cls" .writeline "@echo off" .writeline "echo HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run "& ULR &">"&inilujing .writeline "echo HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Runonce "& ULR &">>"&inilujing .writeline "echo HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run "& ULR &">>"&inilujing .writeline "echo HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Runonce "& ULR &">>"&inilujing .writeline "regini "&inilujing&"||pause" .writeline "ping 127.0.0.1>nul" .writeline "del /f /q "&inilujing .writeline "del /f /q %0" .writeline "Exit" .Close end with CMD="CMD.exe /C " WshSHell.Run (Cmd&FSO.BuildPath(InsPath ,TemFileName)),vbHide end if Else WshShell.popup _ "程序要求运行于 " + chr(34)+WinVer("OS")+chr(34)+" 环境,安装失败。"+chr(10)+chr(10)+ _ chr(10) & CloseTime & " 秒钟后本窗口将自动关闭!" +chr(10)+chr(10)+ _ chr(10) & "Copyright(C) " + Copyright +" " & QQ &" " + Email _ , CloseTime, "安装失败 - "+ InsTitle +" - "+ Copyright, 0 + 48 End If Set WshShell = Nothing Set FSO = Nothing Set Args = Nothing WScript.Quit(0) sub alltovbs() msgbox "你把regini.exe弄丢了,我可以给你生成一个,"&vbcrlf&vbcrlf&"但代码太长了,帖子一个楼层装不下,没办法啊!" WScript.Quit(0) end sub 在此先谢拉 qingdaowangjia@163.com |
|
| 第2楼 wjlove2002 | 发表于 2007-04-11 04:14 |
| 初级用户 发帖 18 积分 51 | |
|
自己顶!~请各位朋友看到的帮忙给个答案,谢谢拉`~~~
|
|
| 第3楼 baomaboy | 发表于 2007-04-11 06:07 |
| 银牌会员 发帖 554 积分 1,513 | |
|
不要提示 删除WshShell.popup及其后代码就行了 或者注释掉
|
|
|
[ 联系联盟系统管理团队 -
中国DOS联盟 -
标准版 ] Sponsored by ifanr Inc | © 2001–2023 |