pandy05 发表于 2012-3-13 18:06:30

版主在哪里啊?帮忙看看怎么不行啊

运行环境: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

netegg 发表于 2012-3-13 18:10:17

RunAs($adminuser, $admindomain, $adminpass, 1, $cmd,"",@SW_HIDE)

先不要隐藏,看看返回值对不对再说
页: [1]
查看完整版本: 版主在哪里啊?帮忙看看怎么不行啊