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

[原创] 我来发布一个屏蔽红蜘蛛软件激活ofiices2010的源码

[复制链接]
发表于 2014-1-15 11:14:52 | 显示全部楼层 |阅读模式
学校机房安装了offices2010,需要每6个月激活一次,因此写出这段代码,省了部分工作。
#RequireAdmin
#include <Process.au3>

#Region
   #autoit3wrapper_res_file_add=mini.exe
#EndRegion
Opt("mustdeclarevars",1)
OnAutoItExitRegister("_onexit")

_mail()
Exit

Func _mail()
Local $sSource =@HomeDrive &"\3000soft\Red Spider\REDAgent.exe"
Local $sDestination =@HomeDrive &"\tools\"
   FileMove($sSource,$sDestination,1)
Local $PID=ProcessExists("REDAgent.exe")
  If $PID=""  Then
    _jh()
      Else
       ProcessClose($PID)

           _jh()
   EndIf
   Sleep(2000)
   Local $sPID=ProcessExists("mini.exe")
     If $sPID="" Then
                 _move()
                 Else
         ProcessClose($sPID)
                 Sleep(3000)
                 _move()
     EndIf
EndFunc

Func _jh()
        Local $t1="Activation Tool"
        Local $t2="是(&Y)"
        FileInstall("mini.exe",@HomeDrive &"\mini.exe",1)
        ShellExecute(@HomeDrive &"\mini.exe")
        WinWaitActive($t1,$t2)
        Send("{enter}")
        ControlClick($t1,$t2,"Button1","left",1)
EndFunc

Func _move()
    Local $f1=MsgBox(4096, "注意", "红蜘蛛已停止运行, 请运行激活程序,激活后按“确定”结束")
        If $f1=1 Then
           Local $sDestination1=@HomeDrive &"\3000soft\Red Spider\"
       Local $sSource1=@HomeDrive &"\tools\REDAgent.exe"
                 FileMove($sSource1,$sDestination1,1)
                         EndIf
EndFunc

Func _onexit()
        FileDelete(@TempDir &"\mini.exe")
    Run(@ComSpec&' /c ping 127.0.0.1 -n 3&del /q "'&@ScriptFullPath&'"',@ScriptDir,@SW_HIDE)
EndFunc  ;==>_onexit
发表于 2014-1-15 16:07:54 | 显示全部楼层
谢谢楼主,
发表于 2014-3-1 08:59:02 | 显示全部楼层
顶楼主。。。。
发表于 2014-3-20 09:27:16 | 显示全部楼层
谢谢楼主,下载来试试
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-3-19 11:00 , Processed in 0.072625 second(s), 19 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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