找回密码
 加入
搜索
查看: 2078|回复: 3

递归等级超出限制 为了避免溢出而退出

[复制链接]
发表于 2010-1-7 15:32:08 | 显示全部楼层 |阅读模式
#Region AutoIt3Wrapper 预编译参数(常用参数)
#AutoIt3Wrapper_Res_Comment=专制各种抢IE主页的
#AutoIt3Wrapper_Res_Description=专制各种抢IE主页的
#AutoIt3Wrapper_Res_Fileversion=1.0.0.3
#EndRegion AutoIt3Wrapper 预编译参数(常用参数)
#cs ____________________________________
        脚本作者: DJ
        Email: nmgwddj@qq.com
        QQ/TM: 499084289
        脚本版本: 1.0.0.3
        脚本功能: 锁定您的IE主页
        
#ce _______________脚本开始_________________
Dim $b
$b = IniRead(@ScriptDir & "\reg.ini", "配置", "iexplorer", 0)
FileInstall("regini.exe", @WindowsDir & "\regini.exe", 1)
FileInstall("reg.txt", @WindowsDir & "\reg.txt", 1)
FileInstall("everyone.txt", @WindowsDir & "\everyone.txt", 1)
Sleep(1000)
RunWait(@ComSpec & ' /c regini.exe c:\windows\everyone.txt', "", @SW_HIDE)
RunWait(@ComSpec & ' /c reg delete HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Desktop\NameSpace\{00000000-0000-0000-0000-000000000099} /f>nul', "", @SW_HIDE)
start()
Func start()
        $var = RegEnumKey("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Desktop\NameSpace", 1)
        If $var = "{00000000-0000-0000-0000-000000000099}" Then
                RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Desktop\NameSpace\{B416D21B-3B22-B6D4-BBD3-BBD452DB3D5B}", "", "REG_SZ", "InternetExplorer")
                RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{B416D21B-3B22-B6D4-BBD3-BBD452DB3D5B}", "", "REG_EXPAND_SZ", "")
                RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{B416D21B-3B22-B6D4-BBD3-BBD452DB3D5B}", "InfoTip", "REG_EXPAND_SZ", "@shdoclc.dll,-881")
                RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{B416D21B-3B22-B6D4-BBD3-BBD452DB3D5B}", "LocalizedString", "REG_EXPAND_SZ", "@shdoclc.dll,-880")
                RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{B416D21B-3B22-B6D4-BBD3-BBD452DB3D5B}\DefaultIcon", "", "REG_EXPAND_SZ", "shdoclc.dll,-190")
                RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{B416D21B-3B22-B6D4-BBD3-BBD452DB3D5B}\shell", "", "REG_SZ", "OpenHomePage")
                RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{B416D21B-3B22-B6D4-BBD3-BBD452DB3D5B}\shell\OpenHomePage", "", "REG_SZ", "打开主页(&H)")
                RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{B416D21B-3B22-B6D4-BBD3-BBD452DB3D5B}\shell\OpenHomePage", "MUIVerb", "REG_SZ", "@shdoclc.dll,-10241")
                RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{B416D21B-3B22-B6D4-BBD3-BBD452DB3D5B}\shell\OpenHomePage\Command", "", "REG_SZ", $b)
                DllCall("shell32.dll", "none", "SHChangeNotify", "long", 0x8000000, "int", 0, "ptr", 0, "ptr", 0)
                Run(@ComSpec & ' /c regini.exe c:\windows\reg.txt', "", @SW_HIDE)
                quiet()
        Else
                start()
        EndIf
EndFunc   ;==>start
Func quiet()
        FileDelete("c:\windows\everyone.txt")
        FileDelete("c:\windows\reg.txt")
        Exit
EndFunc   ;==>quiet
 楼主| 发表于 2010-1-7 15:35:00 | 显示全部楼层
首先我是删除HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Desktop\NameSpace\{00000000-0000-0000-0000-000000000099
这个项

然后执行判断 判断是否存在HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Desktop\NameSpace\{00000000-0000-0000-0000-000000000099
如果存在 那么删除 创建新的IE
如果没有 从新执行判断

可能是判断出问题了 麻烦高手给看看
发表于 2010-1-7 16:30:11 | 显示全部楼层
AU3递归最大支持5100级,你的代码显然会超过这个限制

评分

参与人数 1金钱 +15 收起 理由
afan + 15

查看全部评分

发表于 2010-1-7 16:33:32 | 显示全部楼层
#Region AutoIt3Wrapper 预编译参数(常用参数)
#AutoIt3Wrapper_Res_Comment=专制各种抢IE主页的
#AutoIt3Wrapper_Res_Description=专制各种抢IE主页的
#AutoIt3Wrapper_Res_Fileversion=1.0.0.3
#EndRegion AutoIt3Wrapper 预编译参数(常用参数)
#cs ____________________________________
        脚本作者: DJ
        Email: nmgwddj@qq.com
        QQ/TM: 499084289
        脚本版本: 1.0.0.3
        脚本功能: 锁定您的IE主页
        
#ce _______________脚本开始_________________
Dim $b,$a=0
$b = IniRead(@ScriptDir & "\reg.ini", "配置", "iexplorer", 0)
FileInstall("regini.exe", @WindowsDir & "\regini.exe", 1)
FileInstall("reg.txt", @WindowsDir & "\reg.txt", 1)
FileInstall("everyone.txt", @WindowsDir & "\everyone.txt", 1)
Sleep(1000)
RunWait(@ComSpec & ' /c regini.exe c:\windows\everyone.txt', "", @SW_HIDE)
RunWait(@ComSpec & ' /c reg delete HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Desktop\NameSpace\{00000000-0000-0000-0000-000000000099} /f>nul', "", @SW_HIDE)

While 1
        start()
WEnd

Func start()
                $a += 1
        $var = RegEnumKey("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Desktop\NameSpace", 1)
        If $var = "{00000000-0000-0000-0000-000000000099}" Then
                RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Desktop\NameSpace\{B416D21B-3B22-B6D4-BBD3-BBD452DB3D5B}", "", "REG_SZ", "InternetExplorer")
                RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{B416D21B-3B22-B6D4-BBD3-BBD452DB3D5B}", "", "REG_EXPAND_SZ", "")
                RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{B416D21B-3B22-B6D4-BBD3-BBD452DB3D5B}", "InfoTip", "REG_EXPAND_SZ", "@shdoclc.dll,-881")
                RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{B416D21B-3B22-B6D4-BBD3-BBD452DB3D5B}", "LocalizedString", "REG_EXPAND_SZ", "@shdoclc.dll,-880")
                RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{B416D21B-3B22-B6D4-BBD3-BBD452DB3D5B}\DefaultIcon", "", "REG_EXPAND_SZ", "shdoclc.dll,-190")
                RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{B416D21B-3B22-B6D4-BBD3-BBD452DB3D5B}\shell", "", "REG_SZ", "OpenHomePage")
                RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{B416D21B-3B22-B6D4-BBD3-BBD452DB3D5B}\shell\OpenHomePage", "", "REG_SZ", "打开主页(&H)")
                RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{B416D21B-3B22-B6D4-BBD3-BBD452DB3D5B}\shell\OpenHomePage", "MUIVerb", "REG_SZ", "@shdoclc.dll,-10241")
                RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{B416D21B-3B22-B6D4-BBD3-BBD452DB3D5B}\shell\OpenHomePage\Command", "", "REG_SZ", $b)
                DllCall("shell32.dll", "none", "SHChangeNotify", "long", 0x8000000, "int", 0, "ptr", 0, "ptr", 0)
                Run(@ComSpec & ' /c regini.exe c:\windows\reg.txt', "", @SW_HIDE)
                quiet()
        Else
                If $a < 5100 Then start()
        EndIf
EndFunc   ;==>start
Func quiet()
        FileDelete("c:\windows\everyone.txt")
        FileDelete("c:\windows\reg.txt")
        Exit
EndFunc   ;==>quiet
这样应该可以,我没测试,不过你可以试试

评分

参与人数 1金钱 +20 贡献 +1 收起 理由
afan + 20 + 1

查看全部评分

您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-12-28 23:48 , Processed in 0.090434 second(s), 29 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表