; ; AutoHotkey Version: 1.x ; Language: English ; Platform: Win9x/NT ; Author: A.N.Other ; ; Script Function: ; Template script (you can customize this template by editing "ShellNew\Template.ahk" in your Windows folder) ; if not A_IsAdmin { Run *RunAs "%A_ScriptFullPath%" ; Requires v1.0.92.01+ ExitApp } ;^!p:: #NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. SendMode Input ; Recommended for new scripts due to its superior speed and reliability. ;SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory. SetWorkingDir %A_WorkingDir% ;EnvGet, WORK_DIR, RUN_PATH ;******************************************:// ;//******************************************:// ;//OFFICE_2003CN******************************************:// VMWARE_TOOLS: ;Goto,VMWARE_TOOLS_X ;//******************************************:// global title, title2, include_txt, myvar, lang, timeout RegRead, lang, HKEY_LOCAL_MACHINE, SYSTEM\CurrentControlSet\Control\Nls\Language, Default if (lang = 0804) { title := "VMware Tools 安装程序" include_txt := "WixUI_Bmp_Dialog" }else if( lang = 0411 ) { title := "VMware Tools セットアップ" include_txt := "WixUI_Bmp_Dialog" }else if( lang = 0412 ) { title := "VMware Tools 설치" include_txt := "WixUI_Bmp_Dialog" } ;title= ;include_txt= IfWinExist,%title%,%include_txt% { }else{ RUN_VMWARE_TOOLS(title,include_txt) } WinWait ,%title%,%include_txt%, 1000 if ErrorLevel { Goto,VMWARE_TOOLS } Sleep,500 WinWaitAndClikButton(title,"Button1",include_txt) if (lang = 0804) { include_txt := "选择最符合您需求的安装类型" }else if( lang = 0412 ) { include_txt := "사용자의 요구 사항에 가장 적합한 설치 유형을 선택하십시오." }else if( lang = 0411 ) { include_txt := "目的に合わせてセットアップの種類を選択してください。" } ControlCheck(title,"Button2",include_txt) WinWaitAndClikButton(title,"Button6",include_txt) if (lang = 0804) { include_txt := "已准备好安装 VMware Tools" }else if( lang = 0412 ) { include_txt := "VMware Tools 설치 준비 완료" }else if( lang = 0411 ) { include_txt := "VMware Tools のインストール準備完了" } WinWaitAndClikButton(title,"Button1",include_txt) ;install timeout := 60 SetTimer, check_warning, 2000 RE_TRY_VMWARE_TOOLS: if (lang = 0804) { include_txt := "VMware Tools 安装向导已完成" }else if( lang = 0412 ) { include_txt := "VMware Tools 설치 마법사를 완료했습니다." }else if( lang = 0411 ) { include_txt := "VMware Tools セットアップ ウィザードが完了しました" } WinWait , %title%, %include_txt%, %timeout% if ErrorLevel { timeout := 2 Goto, RE_TRY_VMWARE_TOOLS } SetTimer, check_warning, Delete WinWaitAndClikButton(title,"Button1",include_txt) if (lang = 0804) { include_txt := "信息图标" }else if( lang = 0412 ) { include_txt := "정보 아이콘" }else if( lang = 0411 ) { include_txt := "情報アイコン" } WinWaitAndClikButton(title,"Button1",include_txt) VMWARE_TOOLS_END: exit 0 ;***************************************************** ;*************************************************** ;*************************************************** ;//-------------------------------------------------- RUN_VMWARE_TOOLS(WinTitle,WinText) { TRY_AGAIN: DriveGet, Cd_list, List,CDROM StringLen, cd_list_len , Cd_list ;MsgBox,%cd_list_len% GET_CDLETTER: StringRight,drive_letter,Cd_list, 1 DriveGet, cd_label,Label, %drive_letter%: ;MsgBox,%Label% if ( cd_label = "VMware Tools"){ sleep 20000 }else{ cd_list_len-- if( cd_list_len =0 ){ sleep,2000 Goto,TRY_AGAIN }else{ StringLeft, Cd_list, Cd_list,cd_list_len Goto,GET_CDLETTER } } ;MsgBox,%drive_letter%: ;return IfWinExist,%WinTitle%,%WinText% { }else{ Run,%drive_letter%:\setup.exe if (lang = 0804) { WinTitle := "VMware 产品安装" WinText := "另一个安装实例已在运行。正在退出..." }else if( lang = 0411 ) { WinTitle := "VMware 製品のインストール" WinText := "セットアップの別のインスタンスがすでに実行中です。終了しています..." }else if( lang = 0412 ) { WinTitle := "VMware 제품 설치" WinText := "설치 프로그램의 다른 인스턴스가 이미 실행되고 있습니다. 종료하는 중..." } WinWait ,%WinTitle%,%WinText%, 3 if ErrorLevel { Sleep,3000 }else{ WinWaitAndClikButton(WinTitle,"Button1",WinText) } } } ;***************************************************** ;*************************************************** ;*************************************************** ;//-------------------------------------------------- ;------------------------------------------------------------------------------------------------ ; Iterate through controls with the same class, find the one with ctrlID and return its handle ; Used for finding a specific control ; FindWindowExID(dlg, className, ctrlId, seqId) { local ctrl, id, seq seq :=0 ctrl := 0 Loop { seq++ ctrl := DllCall("FindWindowEx", "uint", dlg, "uint", ctrl, "str", className, "uint", 0 ) if ( seqId = 0 && ctrlId = 0) { ;MsgBox,FindWindowEx---%seqId% return ctrl } if ( seqId = seq && ctrlId = 0) { ;MsgBox,seqId---%seq% return ctrl } if ( ctrlId != 0 && ctrl != 0) { id := DllCall( "GetDlgCtrlID", "uint", ctrl ) ;MsgBox,ctrl---%ctrl% ;MsgBox,id---%id% if (id = ctrlId) return ctrl } } } check_warning: if (lang = 0804) { title2 := "没有找到数字签名" include_txt := "Microsoft 数字签名确认软件已在 Windows 上测试过,并且测试后未经更改。" }else if( lang = 0411 ) { title2 := "デジタル署名が見つかりませんでした" include_txt := "Microsoft デジタル署名によって、ソフトウェアが Windows 上でテストされ、その後変更されていないことが保証されます。" }else if( lang = 0412 ) { title2 := "디지털 서명을 찾을 수 없음" include_txt := "해당 소프트웨어는 Windows에서 테스트되었으며 테스트된 후 변경되지 않았습니다." } IfWinExist ,%title2%,%include_txt% { WinWaitAndClikButton(title2,"Button1",include_txt) sleep,15000 } return ;;#include RemoteBuf.ahk ;;#include RTV.ahk #include BUTTON_LIB.ahk