Ycxw2008 发表于 2011-10-12 20:18:26

VMware-8.0.0-471780自动安装,注册,汉化,脚本

本帖最后由 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

wei999 发表于 2011-10-12 23:20:51

学习了,{:face (239):}

fangbaiyu 发表于 2011-10-24 10:13:55

好好学习天天向上
收藏学习下

qq37681184 发表于 2013-6-9 10:20:47

收藏学习下

wkdxz 发表于 2013-6-24 10:18:27

很实用的代码,省了我很多事,谢谢楼主

lvjun215 发表于 2013-6-26 21:45:56

呵呵 不错啊!

txen548 发表于 2013-8-17 15:39:39

收藏学习下

joyran 发表于 2014-3-2 18:29:29

收藏备用了

R8019 发表于 2014-3-31 13:35:46

收藏学习下

cqjia633 发表于 2014-4-16 18:25:34

不错不错,谢谢分享了。。

hfcc551zcy 发表于 2015-11-17 09:01:42

菜鸟的我还不能完全看懂,先收藏,以后研究{:face (427):}
页: [1]
查看完整版本: VMware-8.0.0-471780自动安装,注册,汉化,脚本