本帖最后由 xiaosu 于 2010-5-4 11:35 编辑
在重装系统后安装OFFICE07时还是要手动点。不能直接安装。。。不过在已经装过office的电脑上能直接安装。。。。。代码如下:
run("\\192.168.18.10\soft\办公软件\office2007pro.chs\setup.exe")
WinWaitActive("Microsoft Office Professional Plus 2007","NUIDocumentWindow")
ControlSetText("Microsoft Office Professional Plus 2007","",1,"DBXYD-TF477-46YM4-W74MH-6YDQ8")
send("!c")
WinWait("Microsoft Office Enterprise 2007","")
WinActivate("Microsoft Office Enterprise 2007","")
Send("!a") ;接受许可协议
Send("!c") ;下一步
WinWait("Microsoft Office Enterprise 2007","")
WinActivate("Microsoft Office Enterprise 2007","")
Send("!i") ;到这一步如果不需要自定义的话就可以直接安装了
WinWaitActive("Microsoft Office Professional Plus 2007","NUIDocumentWindow")
send("!i")
WinWait("Microsoft Office Enterprise 2007","")
WinActivate("Microsoft Office Enterprise 2007","")
Send("!c") ;安装完成,点击关闭按钮 |