Автоматическая установка Delphi6 (AutoIt)

Ответить
Аватара пользователя
Konstantin_555

Автоматическая установка Delphi6 (AutoIt)

Сообщение Konstantin_555 »

Интересует автоматизация концовки установки Delphi 6 через AutoIt.

Вот мой код:



Код:

Код: Выделить всё

Func MySendCom($NameWindow,$TextWinControl,$command)
     WinWaitActive($NameWindow,$TextWinControl)
	 Send($command)
EndFunc
Run("setup.exe")
$a1="Borland Delphi 6 Enterprise Edition - Installation Wizard"
$a2="Welcome to Borland Delphi 6, Enterprise Edition"
MySendCom($a1,$a2,'!n')
$a2="Serial Number"
MySendCom($a1,$a2,'12345678901234')
MySendCom($a1,$a2,'{TAB}')
MySendCom($a1,$a2,'123456')
MySendCom($a1,$a2,'{TAB}')
MySendCom($a1,$a2,'{ENTER}')
$a2="License Agreement"
MySendCom($a1,$a2,'!a')
MySendCom($a1,$a2,'!n')
MySendCom($a1,'Important Installation Information','!n')
$a2="Setup Type"
MySendCom($a1,$a2,'!u')
MySendCom($a1,$a2,'!n')
$a2="Custom Setup"
MySendCom($a1,$a2,'{TAB 4}')
MySendCom($a1,$a2,'{ENTER}')
MySendCom($a1,'BDE SQL Driver Configuration','!n')
MySendCom($a1,'Choose VisiBroker','!n')
MySendCom($a1,'Microsoft Office Controls','!n')
MySendCom($a1,'Install Additional Components','!n')
MySendCom($a1,'Remote Dataset License Agreement','!a')
MySendCom($a1,'Remote Dataset License Agreement','!n')
MySendCom($a1,'Destination Folder','!n')
MySendCom($a1,'Save Installation Database','!n')
MySendCom($a1,'Ready to Install the Program','!i')
WinWaitActive("Borland Delphi 6 Installer Information");
$a=0;
while $a<45;
 sleep(50);
 Send("!i");
 $a=$a+1;
WEnd;
WinWaitActive("InterBase Client setup");
MySendCom('InterBase Client setup','','{TAB}')
MySendCom('InterBase Client setup','','{ENTER}')
MySendCom('Important installation information','','{ENTER}')
MySendCom('Software License Agreement','','{TAB}')
MySendCom('Software License Agreement','','{TAB}')
MySendCom('Software License Agreement','','{ENTER}')
MySendCom('InterBase component selection','','{TAB}')
MySendCom('InterBase component selection','','{TAB}')
MySendCom('InterBase component selection','','{TAB}')
MySendCom('InterBase component selection','','{TAB}')
MySendCom('InterBase component selection','','{ENTER}')
MySendCom('InterBase Client setup complete','','{ENTER}')
MySendCom('InterBase Client setup complete','','!f')

Код окончания установки:



Код:

Код: Выделить всё

$a1='Borland Delphi 6 Enterprise Edition - Installation Wizard'
Sleep(100)
WinActivate($a1)
Send("{SPACE}")
$a1='Borland Delphi 6 Installer Information'
Sleep(100)
WinActivate($a1)
Send("{TAB}")
Send("{SPACE}")
MsgBox(0,"ВНИМАНИЕ!","Не забудь перезагрузить компьютер!",5);

Если код завершения установки дописать к первому "главному" коду - он работать не будет... Остановиться на окне с кнопкой "Finish"



Если же выполнить отдельно "главный" код, а потом (не закрывая при этом последнее окно), выполнить код автоматизации завершения установки - всё будет гуд (окно "Borland Delphi 6 Enterprise Edition - Installation Wizard" закроется, автоматически нажмётся кнопка Нет (на запрос - нужно ли перезагружать ПК?) и появится сообщение в течении 5 секунд про необходимость перезагрузки компьютера.







Отсюда и вопрос - как правильным образом дописать код завершения установки к главному коду?..



Заранее, спасибо!
Аватара пользователя
Konstantin_555

Re: Автоматическая установка Delphi6 (AutoIt)

Сообщение Konstantin_555 »

Если есть другой способ тихой установки Delphi 6 - подскажите, плиз!
Аватара пользователя
Konstantin_555

Re: Автоматическая установка Delphi6 (AutoIt)

Сообщение Konstantin_555 »

Delphi 7 - автоустановка
- ставил так 7-ю версию. На 6-й тоже должно прокатить. И никакого AutoIT Изображение
Аватара пользователя
projectsoft

Re: Автоматическая установка Delphi6 (AutoIt)

Сообщение projectsoft »

Я юзаю Delphi 7

вот мой код:



Код:

Код: Выделить всё

Run("setup.exe")
WinWaitActive('Borland Delphi 7 Enterprise Edition - Installation Wizard','Welcome to Borland Delphi 7, Enterprise Edition')
ControlClick('Borland Delphi 7 Enterprise Edition - Installation Wizard','','Button1')
WinWaitActive('Borland Delphi 7 Enterprise Edition - Installation Wizard','Serial Number')
Sleep(500) ; Обязательно нужна задержка!
ControlClick('Borland Delphi 7 Enterprise Edition - Installation Wizard','','Button1')
WinWaitActive('Borland Delphi 7 Enterprise Edition - Installation Wizard','License Agreement')
ControlClick('Borland Delphi 7 Enterprise Edition - Installation Wizard','','Button3')
ControlClick('Borland Delphi 7 Enterprise Edition - Installation Wizard','','Button5')
WinWaitActive('Borland Delphi 7 Enterprise Edition - Installation Wizard','Important Installation Information')
ControlClick('Borland Delphi 7 Enterprise Edition - Installation Wizard','','Button1')
WinWaitActive('Borland Delphi 7 Enterprise Edition - Installation Wizard','Setup Type')
ControlClick('Borland Delphi 7 Enterprise Edition - Installation Wizard','','Button1')
WinWaitActive('Borland Delphi 7 Enterprise Edition - Installation Wizard','Choose VisiBroker')
ControlClick('Borland Delphi 7 Enterprise Edition - Installation Wizard','','Button4')
ControlClick('Borland Delphi 7 Enterprise Edition - Installation Wizard','','Button1')
WinWaitActive('Borland Delphi 7 Enterprise Edition - Installation Wizard','Microsoft Office Controls')
ControlClick('Borland Delphi 7 Enterprise Edition - Installation Wizard','','Button1')
WinWaitActive('Borland Delphi 7 Enterprise Edition - Installation Wizard','Install Additional Components')
ControlClick('Borland Delphi 7 Enterprise Edition - Installation Wizard','','Button3')
ControlClick('Borland Delphi 7 Enterprise Edition - Installation Wizard','','Button1')
WinWaitActive('Borland Delphi 7 Enterprise Edition - Installation Wizard','Destination Folder')
ControlClick('Borland Delphi 7 Enterprise Edition - Installation Wizard','','Button1')
WinWaitActive('Borland Delphi 7 Enterprise Edition - Installation Wizard','Save Installation Database')
ControlClick('Borland Delphi 7 Enterprise Edition - Installation Wizard','','Button1')
WinWaitActive('Borland Delphi 7 Enterprise Edition - Installation Wizard','Ready to Install the Program')
ControlClick('Borland Delphi 7 Enterprise Edition - Installation Wizard','','Button1')
WinWaitActive('Borland Delphi 7 Enterprise Edition - Installation Wizard','Installation Wizard Completed')
ControlClick('Borland Delphi 7 Enterprise Edition - Installation Wizard','','Button1')

А в Setup.ini делаю вот такие изменения в секции [startup]:





Код:

Код: Выделить всё

[Startup]
CmdLine= PRODUCT_ID=6AKD-PD29Q9-RDF?JQ-X65Z AUTH_KEY=QX8-EEC

Я просто не пользуюсь InterBase и VisiBroker, поэтому в своей установке я их не устанавливаю.
Ответить

Вернуться в «Автоматическая установка приложений»