Компьютерный форум OSzone.net  

Компьютерный форум OSzone.net (http://forum.oszone.net/index.php)
-   AutoIt (http://forum.oszone.net/forumdisplay.php?f=103)
-   -   Скрытие окон инсталлятора (http://forum.oszone.net/showthread.php?t=199173)

murder 10-02-2011 22:48 1609744

Скрытие окон инсталлятора
 
Здравствуйте
Сделал скрипт автоматической установки Hex Editor Neo, но не получается скрыть окна инсталлятора

читать дальше »

Код:

#include <date.au3>
#include <process.au3>
#include <file.au3>
#NoTrayIcon

run ("hex-editor-neo.exe", "", @SW_HIDE)
WinWait                        ('HHD Software Hex Editor Neo 4.95 Setup','')
;WinSetState        ('HHD Software Hex Editor Neo 4.95 Setup','',@SW_HIDE)
ControlClick        ('HHD Software Hex Editor Neo 4.95 Setup','','Button2') ;Далее
ControlCommand('HHD Software Hex Editor Neo 4.95 Setup','License Agreement','I &accept the terms in the License Agreement','Check','') ;Соглашение с лицензией
ControlClick        ('HHD Software Hex Editor Neo 4.95 Setup','','Button2') ;Далее
ControlClick        ('HHD Software Hex Editor Neo 4.95 Setup','','Button2') ;Выбор компонентов. По умолчанию
ControlClick        ('HHD Software Hex Editor Neo 4.95 Setup','','Button6') ;Ярлыки для всех пользователей
ControlClick        ('HHD Software Hex Editor Neo 4.95 Setup','','Button2') ;Далее
ControlSend                ('HHD Software Hex Editor Neo 4.95 Setup','','[CLASS:Edit; INSTANCE:6]','{end}') ;Группа в меню Пуск
ControlSend                ('HHD Software Hex Editor Neo 4.95 Setup','','[CLASS:Edit; INSTANCE:6]','{backspace 35}')
ControlSend                ('HHD Software Hex Editor Neo 4.95 Setup','','[CLASS:Edit; INSTANCE:6]','Утилиты\HHD Hex Editor Neo')
Send('{ENTER}')
WinWait        ('HHD Software Hex Editor Neo 4.95 Setup','Completing the HHD Hex Editor Neo 4.95 Setup Wizard') ; Не запускать редактор после установки
ControlClick        ('HHD Software Hex Editor Neo 4.95 Setup','','Button12')
ControlClick        ('HHD Software Hex Editor Neo 4.95 Setup','','Button13')
ControlClick        ('HHD Software Hex Editor Neo 4.95 Setup','','Button2')


$var = ClipPut("date " & @MDAY & "." & @MON & "." & @YEAR) ; Установить дд.мм.гггг для регистрации
$var1 = ClipGet()                                                                        ; т.к. лицензия привязана к дате покупки
FileOpen("C:\date.txt", 2)
FileWrite("C:\date.txt", $var1)
_SetDate(**,**,****)

ShellExecute        ('license.hexlic') ; Регистрация ключём
WinWait        ('License Installation','') ; Здесь открывается окно программы с подтверждением лицензии
ControlClick        ('License Installation','','Button1')
Sleep (5000); Задержка для установки лицензии (запуска Hex Editor'а)


$var2 = FileReadline("C:\date.txt") ; Восстановить исходную дату
_RunDOS($var2)
FileClose("C:\date.txt")
_FileCreate("C:\date.txt")
Sleep (3000)
FileDelete("C:\date.txt")

Exit



Пробовал WinSetState, но окна не скрывались
Помогите, пожалуйста, разобраться


Время: 17:36.

Время: 17:36.
© OSzone.net 2001-