运行环境:win7专业版,
问题:运行后controlclick或send都对窗口无效,请问什么问题啊,高手给看看啊TrayTip("提示","开始安装ADOBE READER!",10,1)
$adminuser="administrator"
$admindomain="a.com"
$adminpass="a1!"
$var = "d:\Software\AdbeRdr940_zh_CN.exe"
_RunAsAdmin($var)
$title="Adobe Reader 9.4.0-安装"
Sleep(2000)
WinWaitActive($title,'单击"下一步"安装到此文件夹,或单击"更改"安装到不同的文件夹。')
;ControlClick($title,'单击"下一步"安装到此文件夹,或单击"更改"安装到不同的文件夹。',"Button1")
Send("{enter}")
WinWaitActive($title,'单击"安装"开始安装。')
Send("!i")
Func _RunAsAdmin($cmd)
RunAs($adminuser, $admindomain, $adminpass, 1, $cmd,"",@SW_HIDE)
EndFunc;==>_RunAsAdminTrayTip("提示","开始安装ADOBE READER!",10,1)
$adminuser="administrator"
$admindomain="a.com"
$adminpass="a1!"
$var = "d:\Software\AdbeRdr940_zh_CN.exe"
_RunAsAdmin($var)
$title="Adobe Reader 9.4.0-安装"
Sleep(2000)
WinWaitActive($title,'单击"下一步"安装到此文件夹,或单击"更改"安装到不同的文件夹。')
;ControlClick($title,'单击"下一步"安装到此文件夹,或单击"更改"安装到不同的文件夹。',"Button1")
Send("{enter}")
WinWaitActive($title,'单击"安装"开始安装。')
Send("!i")
Func _RunAsAdmin($cmd)
RunAs($adminuser, $admindomain, $adminpass, 1, $cmd,"",@SW_HIDE)
EndFunc;==>_RunAsAdmin
|