找回密码
 加入
搜索
查看: 3854|回复: 2

[原创] UG 4自动安装脚本,带破解

[复制链接]
发表于 2010-10-29 10:43:36 | 显示全部楼层 |阅读模式
#cs ----------------------------------------------------------------------------

 AutoIt Version: 1.0
 Author:         胡红雨
 QQ:1459656465
 Script Function:
        UGNX4自动安装程序,带破解操作。

#ce ----------------------------------------------------------------------------

; Script Start

;修改UGNX4.lic文件,替换SERVER this_host ANY 27000为SERVER @ComputerName ANY 27000
#include <Constants.au3>
Local Const $sFile = "ugnx4.lic"
Local $hFile = FileOpen($sFile, 1)
; 检查文件是否已打开
If $hFile = -1 Then
   MsgBox(0, "错误", "无法打开文件.")
   Exit
EndIf
; 设置当前文件坐标.
Local $n = FileSetPos($hFile, 80, $FILE_BEGIN)
; 向文件当中加入当前计算机名
FileWrite($hFile, @ComputerName)
; 保存该文本文件内存缓冲区数据到磁盘.相等于保存操作.
FileFlush($hFile)
; 关闭此前已打开的文件.
FileClose($hFile)
;复制文件至临时文件夹
FileCopy ( "ugnx4.lic","C:\Documents and Settings\胡红雨\Local Settings\Temp" ,9)

;运行Launch.exe
Run("Launch.exe")
WinWaitActive("NX 4 Product Installation")
MouseClick("left",307,356)
WinWaitActive("选择安装程序的语言")
MouseClick("left",464,437)
WinWaitActive("UGS NX 4.0 FLEXlm InstallShield Wizard","InstallShield(R) Wizard 将要在您的计算机中安装 UGS NX 4.0 FLEXlm 。")
Send("!n")
WinWaitActive("UGS NX 4.0 FLEXlm InstallShield Wizard","单击“下一步”安装到此文件夹,或单击“更改”安装到不同的文件夹。")
Send("!n")
WinWaitActive("UGS NX 4.0 FLEXlm InstallShield Wizard","单击“下一步”使用此许可证文件,或者单击“更改”选择另一个许可证文件。")
Send("!n")
WinWaitActive("UGS NX 4.0 FLEXlm InstallShield Wizard","向导准备开始安装。")
Send("!i")
WinWaitActive("UGS NX 4.0 FLEXlm InstallShield Wizard","InstallShield Wizard 成功地安装了 UGS NX 4.0 FLEXlm 。")
Send("!f")
WinActivate("NX 4 Product Installation")
WinWaitActive("NX 4 Product Installation")
MouseClick("left",271,396)
WinWaitActive("选择安装程序的语言")
MouseClick("",450,439)
WinWaitActive("UGS NX 4.0 InstallShield Wizard","InstallShield(R) Wizard 将要在您的计算机中安装 UGS NX 4.0 。")
Send("!n")
WinWaitActive("UGS NX 4.0 InstallShield Wizard","选择最适合自己需要的安装类型。")
Send("!n")
WinWaitActive("UGS NX 4.0 InstallShield Wizard","单击“下一步”安装到此文件夹,或单击“更改”安装到不同的文件夹。")
Send("!n")
WinWaitActive("UGS NX 4.0 InstallShield Wizard","输入许可证服务器。")
Send("!n")
WinWaitActive("UGS NX 4.0 InstallShield Wizard","选择要在运行 NX 时使用的语言")
MouseClick("left",539,372)
Send("!n")
WinWaitActive("UGS NX 4.0 InstallShield Wizard","向导准备开始安装。")
Send("!i")
发表于 2010-12-12 22:01:49 | 显示全部楼层
路过支持下
发表于 2011-1-20 01:29:06 | 显示全部楼层
好哦谢谢看过了
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-11-22 00:06 , Processed in 0.100726 second(s), 20 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表