; 全自动静默安装 FastCopy ver 4.2.0 简体中文汉化版-2022年8月12日
; 全自动静默安装 FastCopy ver 4.2.0 简体中文汉化版-2022年8月12日
; 全自动静默安装 FastCopy ver 4.2.0 简体中文汉化版
; 请使用系统总裁出品的:
; 7z压缩包自解压制作工具Fc - SysCeo.Com 来
; 打包FastCopy汉化安装文件和此脚本编译后的exe文件
; 系统总裁网址 https://www.sysceo.com/
DetectHiddenWindows,On
SetTitleMatchMode,2
; 000-使用loop循环代码结构
; 当因为目标窗口创建和显示缓慢造成对控件的操作错过机会时可以让脚本重新再操作
loop
{
;010-当没有运行安装程序则运行
Process,Exist,fcsetup.exe
if (not (ErrorLevel))
{
IfWinNotExist,FastCopy Setup ver4.2
{
Run,"%A_ScriptDir%\fcsetup.exe"
}
}
; 020-处理第1个窗口,安装路径选择
; 当安装已经完成时不对此窗口操作
IfWinNotExist,安装 ahk_exe fcsetup.exe,安装已完成
{
; 当存在子窗口时不能对主窗口操作
IfWinNotExist,Install ahk_exe fcsetup.exe, 开始
{
WinActivate,FastCopy Setup ver4.2.0 (x64) (Admin) ahk_exe fcsetup.exe, 详情
WinWaitActive,FastCopy Setup ver4.2.0 (x64) (Admin) ahk_exe fcsetup.exe, 详情,3
ControlClick, Button1, FastCopy Setup ver4.2.0 (x64) (Admin) ahk_exe fcsetup.exe, 详情
}
}
; 030-处理第2个窗口,安装路径选择窗口的安装确认子窗口
; 当安装已经完成时不对此窗口操作
IfWinNotExist,安装 ahk_exe fcsetup.exe,安装已完成
{
WinActivate,Install ahk_exe fcsetup.exe, 开始
WinWaitActive,Install ahk_exe fcsetup.exe, 开始,3
ControlClick, Button1, Install ahk_exe fcsetup.exe, 开始
WinWaitActive, 安装 ahk_exe fcsetup.exe,安装已完成,3
}
; 040-处理第3个窗口,安装已完成窗口
IfWinExist,安装 ahk_exe fcsetup.exe,安装已完成
{
WinActivate, 安装 ahk_exe fcsetup.exe,安装已完成
WinWaitActive, 安装 ahk_exe fcsetup.exe,安装已完成,9
ControlClick, Button1, 安装 ahk_exe fcsetup.exe,安装已完成
break
}
}
; 050-添加文件和文件夹快捷操作的鼠标右键菜单
WinWaitActive,FastCopy ver4.2.0 ahk_exe FastCopy.exe, 缓冲区,9
Sleep,100
IfWinActive,FastCopy ver4.2.0 ahk_exe FastCopy.exe, 缓冲区
{
Sleep,100
Send,!om{End}{Up}{Up}
Sleep,100
Control, Check, , Button73, 主要设置 ahk_exe FastCopy.exe, 外壳扩展
Sleep,100
ControlClick, Button2, 主要设置 ahk_class #32770 ahk_exe FastCopy.exe, 杂项设置
Sleep,100
ControlClick, Button1, 主要设置 ahk_class #32770 ahk_exe FastCopy.exe, 杂项设置
Sleep,100
ControlClick, Button1, 主要设置 ahk_class #32770 ahk_exe FastCopy.exe, 杂项设置
Sleep,100
WinClose,FastCopy ver4.2.0 ahk_exe FastCopy.exe, 缓冲区
Sleep,100
WinClose,FastCopy ver4.2.0 ahk_exe FastCopy.exe, 缓冲区
Sleep,100
MsgBox,,,FastCopy 安装已完成,2
}
; 060-删除FastCopy安装包临时文件
FileRemoveDir,C:\AS-FastCopy\doc,1
FileRemoveDir,C:\AS-FastCopy\Log,1
FileDelete,C:\AS-FastCopy\FastCopy.log
FileDelete,C:\AS-FastCopy\fcp.exe
FileDelete,C:\AS-FastCopy\FastCopy.exe
FileDelete,C:\AS-FastCopy\fcsetup.exe
FileDelete,C:\AS-FastCopy\setup.exe
FileDelete,C:\AS-FastCopy\FcHash.exe
FileDelete,C:\AS-FastCopy\FastEx64.dll.1
FileDelete,C:\AS-FastCopy\FastEx64.dll
FileDelete,C:\AS-FastCopy\FastExt1.dll.1
FileDelete,C:\AS-FastCopy\FastExt.dll
FileDelete,C:\AS-FastCopy\FastExt1.dll
FileDelete,C:\AS-FastCopy\AS-FastCopy.txt
FileDelete,C:\AS-FastCopy\FastCopy过滤器-包括-.doc;.docx;.xls;.xlsx.txt
FileDelete,C:\AS-FastCopy\窗口测试.ahk
FileDelete,C:\AS-FastCopy\FastCopy2.ini
FileDelete,C:\AS-FastCopy\AS-FastCopy.ahk
FileCopy,C:\AS-FastCopy\DeleteSelf.bat,C:\
Run,C:\DeleteSelf.bat
; @echo off
; 注意:此批处理脚本的编码是ANSI
; timeout /nobreak /t 3
; del C:\AS-FastCopy\AS-FastCopy.exe /F /Q
; del C:\AS-FastCopy\DeleteSelf.bat /F /Q
; rd C:\AS-FastCopy\
; del %0
www.cnblogs.com/delphixx

浙公网安备 33010602011771号