|
本帖最后由 Ycxw2008 于 2011-10-14 21:34 编辑
不需要安装的时候再上网找注册码了,不需要结束进程再安装汉化了,脚本都有了
说老实话 自己没什么autoit底子 就学人家做自动安装脚本,勉勉强强做了一套自己的一套软件,唯独就差这1个VMware,折腾的我想哭,至少安装,卸载,没有80次 也有50次 {:Q17:} 最后还是出来了:)
win7 + xp 都没有问题,
汉化包的话我是做成自解压安装包
直接打开就解压到了"C:\program files\VMware\VMware WorkStation"
在关键的几个地方用了坐标颜色来识别(感谢autoit论坛里的zhangchongzhi兄弟赐教)
,其他的就用了Send("key"),
也希望高手可以帮我看看哪些地方可以更简单的做到,
希望赐教
基于"VMware-workstation-full-8.0.0-471780.exe" <自行去官网下>
"静默自解压汉化包" 没有汉化的去 Dbank#Region ;**** 参数创建于 ACNWrapper_GUI ****
#AutoIt3Wrapper_icon="VMware-workstation-full-8.0.0-471780.exe|-1"
#AutoIt3Wrapper_Outfile="VMware-workstation-full-8[_ZD.exe"
#AutoIt3Wrapper_Res_Description=自动安装脚本, au3版本:3.3.7.1
#EndRegion ;**** 参数创建于 ACNWrapper_GUI ****
AutoItSetOption("pixelcoordmode",2)
AutoItSetOption("mousecoordmode",2)
Run("VMware-workstation-full-8.0.0-471780.exe")
TrayTip("提示", "最好关闭安全软件,以免影响自动安装效果"&@CRLF&"自动安装期间,请勿动键盘鼠标", 3, 1)
$title="VMware Workstation Setup"
WinWaitActive($title,"")
$handle = WinGetHandle($title,"")
While 1
Sleep(3000)
$color = PixelGetColor(204,262,$handle)
If $color = 16777215 Then
ExitLoop
EndIf
WEnd
Sleep(1000)
Send("!n")
WinWaitActive($title,"")
Send("!c")
WinWaitActive($title,"")
Send("!n")
WinWaitActive($title,"")
Send("!n")
WinWaitActive($title,"")
Send("{Tab}{Tab}{Tab}{Space}!n")
WinWaitActive($title,"")
Send("{Tab}{Tab}{Tab}{Space}!n")
WinWaitActive($title,"")
Send("{Tab}{Tab}{Tab}{Tab}{Space}!n")
WinWaitActive($title,"")
Send("!c")
Sleep(30000)
WinWaitActive($title,"")
$handle = WinGetHandle($title,"")
While 1
Sleep(1000)
$color = PixelGetColor(250, 116,$handle)
If $color = 16777215 Then
ExitLoop
EndIf
WEnd
Sleep(3000)
WinWaitActive($title,"")
Send("!lHA6EA-6HL1Q-LZYF0-2225K-3CVNM!e")
Sleep(5000)
ProcessWait ("vmnetdhcp.exe")
Do
If ProcessExists("vmnetdhcp.exe") Then ProcessClose("vmnetdhcp.exe")
If ProcessExists("vmware-usbarbitrator.exe") Then ProcessClose("vmware-usbarbitrator.exe")
If ProcessExists("vmware-authd.exe") Then ProcessClose("vmware-authd.exe")
If ProcessExists("vmnat.exe") Then ProcessClose("vmnat.exe")
If ProcessExists("vmware-hostd.exe") Then ProcessClose("vmware-hostd.exe")
If ProcessExists("WmiprvSE.exe") Then ProcessClose("WmiprvSE.exe")
Until ProcessExists ("WmiprvSE.exe") =0
Sleep(1000)
Run("VmWare_CN")
If WinExists($title,"") Then
WinActivate($title,"")
Send("!f")
Endif
TrayTip("提示", "已经安装完成", 3, 1)
Sleep(3000)
Exit
|
|