找回密码
 加入
搜索
查看: 3523|回复: 5

[AU3基础] 谁能这段代码帮我优化一下

[复制链接]
发表于 2011-6-9 18:01:28 | 显示全部楼层 |阅读模式
谁能这段代码帮我优化一下,此代码可以执行好像执行注册表那段不是很好用,怎么改一下,能判断注册表那段执行完毕。
#NoTrayIcon ;===>不显示托盘图标
sleep (17000)
RunWait(@ComSpec & ' /c ' &  ' TASKKILL /F /IM eyuscore.exe', '', 0)
RegWrite ( "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Toolbar", "LinksFolderName", "REG_SZ", "链接" )
RegWrite ( "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Toolbar", "Locked", "REG_DWORD", 0x00000000 )
RegWrite ( "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Toolbar\WebBrowser", "{01E04581-4EEE-11D0-BFE9-00AA005B4383}", "REG_BINARY", "8145e001ee4ed011bfe900aa005b4383100000000000000001e032f401000000" )
RegWrite ( "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Toolbar\WebBrowser", "{0E5CBF21-D15F-11D0-8301-00AA005B4383}", "REG_BINARY", "21bf5c0e5fd1d011830100aa005b438322001c000800000006000000010000000000000000000000000000004c0000000114020000000000c0000000000000468100000010000000dcbac00dd5f8ca01761fd47ca622cc01761fd47ca622cc010000000000000000010000000000000000000000000000005b0114001f50e04fd020ea3a6910a2d808002b30309d19002f433a5c000000000000000000000000000000000000005c00310000000000b53c42581000444f43554d457e310000440003000400efbeb53cfd55b53c42581400000044006f00630075006d0065006e0074007300200061006e0064002000530065007400740069006e0067007300000018004a00310000000000903e771d100041444d494e497e310000320003000400efbeb53c4258903e771d14000000410064006d0069006e006900730074007200610074006f007200000018005600310000000000b53c495811004641564f52497e3100003e0003000400efbeb53c4258b53c4958140028004600610076006f00720069007400650073000000407368656c6c33322e646c6c2c2d31323639330018003000350000000000c43e72571000fe94a56300001c0003000400efbeb53c4458c43e725714000000fe94a56300001400000060000000030000a0580000000000000067616d6530323800000000000000000056cfb9717c37144bb05bac328df94e5ab69ab85b4765df119ca8000c29704bb856cfb9717c37144bb05bac328df94e5ab69ab85b4765df119ca8000c29704bb800000000" )
RegWrite ( "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Toolbar\WebBrowser", "ITBarLayout", "REG_BINARY", "110000005c00000000000000340000001b0000005200000001000000a0060000a00f000005000000620400002600000002000000a1060000a00f000004000000a1000000a00f000003000000a902000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" )
RegWrite ( "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\TypedURLs", "url1", "REG_SZ", "http://www5.1616.net/23786/" )
RegWrite ( "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\URLSearchHooks", "{CFBFAE00-17A6-11D0-99CB-00C04FD64497}", "REG_SZ", "" )
RegWrite ( "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\URLSearchHooks", "url1", "REG_SZ", "http://www5.1616.net/23786/" )
RegWrite ( "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\URLSearchHooks", "{CFBFAE00-17A6-11D0-99CB-00C04FD64497}", "REG_SZ", "" )
RegWrite ( "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\URLSearchHooks", "url1", "REG_SZ", "http://www5.1616.net/23786/" )
RunWait(@ComSpec & ' /c ' &  ' regsvr32.exe /s /u "C:\Program Files\E-yoo\ShowIEBand.dll"', '', 0)
RunWait(@ComSpec & ' /c ' &  ' regsvr32.exe /s /u "C:\Program Files\E-yoo\ShowIEBand.dll"', '', 0)
RunWait(@ComSpec & ' /c ' &  ' regsvr32.exe /s /u "C:\Program Files\E-yoo\EYIEToolBar.dll"', '', 0)
RunWait(@ComSpec & ' /c ' &  ' regsvr32.exe /s /u "C:\TEMP\STCTRWatcher.dll"', '', 0)
RunWait(@ComSpec & ' /c ' &  ' ren  "C:\Program Files\E-yoo\eyuscore.exe" eyuscore1.exe', '', 0)
RunWait(@ComSpec & ' /c ' &  ' TASKKILL /F /IM pcl3.exe', '', 0)
RunWait(@ComSpec & ' /c ' &  ' TASKKILL /F /IM pcl9.exe', '', 0)
RunWait(@ComSpec & ' /c ' &  ' TASKKILL /F /IM pcl6.exe', '', 0)
RunWait(@ComSpec & ' /c ' &  ' TASKKILL /F /IM pcl5.exe', '', 0)
RunWait(@ComSpec & ' /c ' &  ' TASKKILL /F /IM pcl4.exe', '', 0)
RunWait(@ComSpec & ' /c ' &  ' TASKKILL /F /IM pcl7.exe', '', 0)
RunWait(@ComSpec & ' /c ' &  ' TASKKILL /F /IM pcl8.exe', '', 0)
RunWait(@ComSpec & ' /c ' &  ' TASKKILL /F /IM pclA.exe', '', 0)
RunWait(@ComSpec & ' /c ' &  ' TASKKILL /F /IM pclB.exe', '', 0)
 楼主| 发表于 2011-6-9 18:21:18 | 显示全部楼层
怎么让上面的PC后面的数字或者随机关闭   就是要关闭PC后面随机出现的全部关闭 只是在开机的时候关闭
发表于 2011-6-9 19:05:55 | 显示全部楼层
你的意思是之只在开机的时候跑一次吗?
这样相仿的进程名应该类名称一样,
枚举进程,判断进程类名称;ProcessClose
发表于 2011-6-9 20:47:18 | 显示全部楼层
本帖最后由 annybaby 于 2011-6-9 20:48 编辑

回复 2# fuchusheng


$prolist=ProcessList()
For $i=1 To $prolist[0][0]
        If StringRegExp($prolist[$i][0],'pc\w+',0) Then
                ProcessClose($prolist[$i][1])
        EndIf
Next
 楼主| 发表于 2011-6-10 10:44:29 | 显示全部楼层
谢谢大家的帮忙  是的就是在开机执行一次就够了 ,因为后期会有软件的进程加入就不在执行了。


                为什么注册表的那段有时候有效果 ,有时候没有效果呢 ,手动点击绝对是有效果的。这是为什么呢?
发表于 2011-6-10 11:31:04 | 显示全部楼层
回复 4# annybaby

正则能省不少事
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-11-15 01:33 , Processed in 0.078900 second(s), 23 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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