找回密码
 加入
搜索
查看: 12041|回复: 11

[原创] 禁止篡改IE首页、默认页安装“雨林木风 Windows一键还原1.2 正式版”

 火.. [复制链接]
发表于 2010-10-8 11:00:18 | 显示全部楼层 |阅读模式
自动安装:
#NoTrayIcon
#RequireAdmin
#Region ;**** 参数创建于 ACNWrapper_GUI ****
#AutoIt3Wrapper_icon=..\..\..\软件\Software\WGho\ico.ico
#AutoIt3Wrapper_Res_Comment=Windows 一键还原自动安装
#AutoIt3Wrapper_Res_Description=WGho_Setup自动安装
#AutoIt3Wrapper_Res_Fileversion=1.2.9.15
#EndRegion ;**** 参数创建于 ACNWrapper_GUI ****
; Windows 一键还原安装程序会篡改IE首页、默认页,预先读取
$reg1 = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\MAIN", "Start Page")
$reg2 = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\MAIN", "Default_Page_URL")
$reg3 = RegRead("HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main", "Start Page")
;自定义文件名
Dim $wjm = IniRead("WGho_Setup.ini", "自定义文件名", "WGho_Setup", "WGho_Setup.exe")
If $wjm = "" Then
        Exit
        EndIf
;安装
Run($wjm)
WinWait("Windows 一键还原 v1.2 安装程序", "")
WinActivate("Windows 一键还原 v1.2 安装程序", "")
ControlClick("Windows 一键还原 v1.2 安装程序", "", "Button3")
WinWait("Windows 一键还原 安装程序","许可协议")
WinActivate("Windows 一键还原 安装程序","许可协议")
ControlClick("Windows 一键还原 安装程序","许可协议", "Button1")
WinWait("Windows 一键还原 安装程序", "< 返回(&B)")
WinActivate("Windows 一键还原 安装程序", "< 返回(&B)")
ControlClick("Windows 一键还原 安装程序", "< 返回(&B)", "Button1")
WinWait("Windows 一键还原 安装程序", "完成(&F)")
WinActivate("Windows 一键还原 安装程序", "完成(&F)")
ControlClick("Windows 一键还原 安装程序", "完成(&F)", "Button1")
;恢复IE首页、默认页
RegWrite ('HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\MAIN',"Default_Page_URL","REG_SZ",$reg2)
RegWrite ('HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\MAIN',"Start Page","REG_SZ",$reg1)
RegWrite ('HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main',"Start Page","REG_SZ",$reg3)
;清理
FileDelete(@DesktopDir & "\Windows 一键还原.lnk")
FileDelete(@StartMenuDir & "\程序\Windows 一键还原\访问论坛.*")
;FileDelete(@StartMenuDir & "\程序\Windows 一键还原\信息反馈.lnk")
;FileDelete(@StartMenuDir & "\程序\Windows 一键还原\卸载 Windows 一键还原.*")
Exit

手动安装:

#NoTrayIcon
#RequireAdmin
#Region ;**** 参数创建于 ACNWrapper_GUI ****
#AutoIt3Wrapper_icon=..\..\..\软件\Software\WGho\ico.ico
#AutoIt3Wrapper_Res_Comment=Windows 一键还原手动安装(禁止篡改IE)
#AutoIt3Wrapper_Res_Description=手动安装(禁止篡改IE)
#AutoIt3Wrapper_Res_Fileversion=1.2.9.15
#AutoIt3Wrapper_Res_LegalCopyright=winner(l)
#EndRegion ;**** 参数创建于 ACNWrapper_GUI ****
;自定义文件名
Dim $wjm = IniRead("WGho_Setup.ini", "自定义文件名", "WGho_Setup", "WGho_Setup.exe")
If $wjm = "" Then
        Exit
        EndIf
; Windows 一键还原安装程序会篡改IE首页、默认页,预先读取
$reg1 = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\MAIN", "Start Page")
$reg2 = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\MAIN", "Default_Page_URL")
$reg3 = RegRead("HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main", "Start Page")
;安装
RunWait($wjm)
;恢复IE首页、默认页
RegWrite ('HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\MAIN',"Default_Page_URL","REG_SZ",$reg2)
RegWrite ('HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\MAIN',"Start Page","REG_SZ",$reg1)
RegWrite ('HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main',"Start Page","REG_SZ",$reg3)
;清理
FileDelete(@DesktopDir & "\Windows 一键还原.lnk")
FileDelete(@StartMenuDir & "\程序\Windows 一键还原\访问论坛.*")
;FileDelete(@StartMenuDir & "\程序\Windows 一键还原\信息反馈.lnk")
;FileDelete(@StartMenuDir & "\程序\Windows 一键还原\卸载 Windows 一键还原.*")
Exit
发表于 2010-10-11 22:39:23 | 显示全部楼层
怎么用的???
发表于 2010-10-12 12:39:45 | 显示全部楼层
FileDelete(@StartMenuDir & "\程序\Windows 一键还原\访问论坛.*")

这个没删掉
发表于 2010-10-13 12:49:50 | 显示全部楼层
很好 很强大
发表于 2011-9-21 12:02:38 | 显示全部楼层
不错,好东西,学习了,收起
发表于 2011-10-10 19:03:11 | 显示全部楼层
对装机人员很有帮助!
发表于 2011-10-15 06:20:41 | 显示全部楼层
谢谢分享,很不错的源码
发表于 2011-10-18 16:24:38 | 显示全部楼层
新手学习了....
发表于 2011-10-18 18:53:04 | 显示全部楼层
雨林木风那个一键还原确实那样子,这个脚本不错可以避免改首页!
发表于 2011-12-2 17:22:50 | 显示全部楼层
谢谢了,试试
发表于 2012-9-23 20:43:51 | 显示全部楼层
不错,好东西,学习了,收起
发表于 2012-10-10 00:08:35 | 显示全部楼层
看看,自己不会,学习学习了
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-4-26 14:01 , Processed in 0.075407 second(s), 20 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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