FileInstall('msg8.exe',@TempDir & '\msg8.exe',1) ;把msn安装程序包进来..
;如果版本号相同,直接运行,目录好像是默认的,应该不用改
$ver=FileGetVersion('C:\Program Files\Windows Live\Messenger\msnmsgr.exe')
If $ver=='14.0.8089.726' Then
Run('C:\Program Files\Windows Live\Messenger\msnmsgr.exe')
Exit
EndIf
;关闭ie...不然安装会多一步..
$msg=MsgBox(1,'注意','MSN安装程序将在5秒内关闭ie浏览器,如不便请点 取消 退出程序',10)
If $msg=2 Then
Exit
EndIf
killie()
;开始安装
Run(@TempDir & '\msg8.exe')
BlockInput(1)
WinWaitActive('Windows Live','查看隐私声明')
Send('!a')
WinWaitActive('Windows Live','所需空间')
;点掉多余的项目,这些东西要下载半天..很郁闷...
ControlClick('Windows Live','所需空间','[CLASS:wlsplctl32;INSTANCE:1]','',1,11,38)
ControlClick('Windows Live','所需空间','[CLASS:wlsplctl32;INSTANCE:1]','',1,11,60)
ControlClick('Windows Live','所需空间','[CLASS:wlsplctl32;INSTANCE:1]','',1,11,82)
ControlClick('Windows Live','所需空间','[CLASS:wlsplctl32;INSTANCE:1]','',1,11,105)
ControlClick('Windows Live','所需空间','[CLASS:wlsplctl32;INSTANCE:1]','',1,11,154)
Send('!i')
WinWaitActive('Windows Live','设置为默认搜索提供程序')
Send('!c')
WinWaitActive('Windows Live','关闭')
Send('!c')
BlockInput(0)
Func killie() ;关掉ie 和 msn
Do
$killie=ProcessExists("IEXPLORE.EXE")
$killmsn=ProcessExists('msnmsgr.exe')
If ProcessExists("IEXPLORE.EXE") Then
ProcessClose("IEXPLORE.EXE.exe")
EndIf
If ProcessExists("msnmsgr.exe") Then
ProcessClose("msnmsgr")
EndIf
Until $killie+$killmsn=0
EndFunc