owikh84 Posted October 16, 2006 Share Posted October 16, 2006 Here's my AutoIt script for Adobe illustrator CS2: expandcollapse popup; AutoIt Options. AutoItSetOption("TrayIconHide", 1) AutoItSetOption("WinTitleMatchMode", 4) Run('msiexec /i "' & @ScriptDir & '\Adobe Illustrator CS2.msi"') ; Welcome dialog. If WinWait("Adobe Illustrator CS2 - Setup", "The InstallShield(R) Wizard will install Adobe Illustrator CS2") Then ControlClick("Adobe Illustrator CS2 - Setup", "The InstallShield(R) Wizard will install Adobe Illustrator CS2", "Button1") EndIf ; License Agreement. If WinWait("Adobe Illustrator CS2 - License Agreement") Then ControlClick("Adobe Illustrator CS2 - License Agreement", "", "Button5") EndIf ; Customer Information. If WinWait("Adobe Illustrator CS2 - Setup", "The following information must be entered before installation") Then ControlClick("Adobe Illustrator CS2 - Setup", "The following information must be entered before installation", "Button2") EndIf ; Destination Folder. If WinWait("Adobe Illustrator CS2 - Setup", "Destination Folder") Then ControlClick("Adobe Illustrator CS2 - Setup", "Destination Folder", "Button1") EndIf ; Ready to Install the Program. If WinWait("Adobe Illustrator CS2 - Setup", "Ready to Install the Program") Then ControlClick("Adobe Illustrator CS2 - Setup", "Ready to Install the Program", "Button1") EndIf ; QuickTime 6 is required. If WinWait("Adobe Illustrator CS2 - Setup", "QuickTime 6 is required", 900) Then ControlClick("Adobe Illustrator CS2 - Setup", "QuickTime 6 is required", "Button1") EndIf ; InstallShield Wizard Completed. If WinWait("Adobe Illustrator CS2 - Setup", "InstallShield Wizard Completed") Then ControlClick("Adobe Illustrator CS2 - Setup", "InstallShield Wizard Completed", "Button3") EndIf EXIT ;eof However installation stops at the last screen which said InstallShield Wizard Completed, click finish to exit. When I press Ctrl+Alt+Del I still can see the script is running and msiexe as well didn't closed automatically. How to solve this? Link to comment Share on other sites More sharing options...
Valik Posted October 16, 2006 Share Posted October 16, 2006 How to solve this?Posting in the correct forum would be a good start. Moved to Support. Link to comment Share on other sites More sharing options...
AzKay Posted October 16, 2006 Share Posted October 16, 2006 Well, Maybe add ProcessClose("msiexe.exe") then add an Exit? ;eof ProcessClose("msiexe.exe") Exit # MY LOVE FOR YOU... IS LIKE A TRUCK- # Link to comment Share on other sites More sharing options...
Valik Posted October 16, 2006 Share Posted October 16, 2006 I really don't recommend that. It's not uncommon for msiexec to be running for a little while after an installation. Just blindly closing it could possibly lead to corrupting stuff. Link to comment Share on other sites More sharing options...
AzKay Posted October 16, 2006 Share Posted October 16, 2006 (edited) Ah, Then maybe runwait? with an exit at the end? EDIT:: I just realized, That wouldnt be a good idea, Lol. Edited October 16, 2006 by AzKay # MY LOVE FOR YOU... IS LIKE A TRUCK- # Link to comment Share on other sites More sharing options...
owikh84 Posted October 16, 2006 Author Share Posted October 16, 2006 Ah, Then maybe runwait? with an exit at the end? EDIT:: I just realized, That wouldnt be a good idea, Lol. There's an "Exit" in my script but it still didn't close. The setup hangs at ""Click "Finish" to complete setup"" and I assume that something wrong with the last string of my script. ; InstallShield Wizard Completed. If WinWait("Adobe Illustrator CS2 - Setup", "InstallShield Wizard Completed") Then ControlClick("Adobe Illustrator CS2 - Setup", "InstallShield Wizard Completed", "Button3") EndIf EXIT ;eof That means the "Button3" which is the "Finish" button won't auto click and the installation stops at there. Link to comment Share on other sites More sharing options...
AzKay Posted October 16, 2006 Share Posted October 16, 2006 Heres the format ControlClick($Title, $Text, $ControlID) So, Are you sure the $Text is right? Isnt it the Text of the control? So, Maybe try ControlClick("Adobe Illustrator CS2 - Setup", "&Finnish", "Button3") Or something. # MY LOVE FOR YOU... IS LIKE A TRUCK- # Link to comment Share on other sites More sharing options...
owikh84 Posted October 16, 2006 Author Share Posted October 16, 2006 (edited) Heres the format ControlClick($Title, $Text, $ControlID) So, Are you sure the $Text is right? Isnt it the Text of the control? So, Maybe try ControlClick("Adobe Illustrator CS2 - Setup", "&Finnish", "Button3") Or something. I've edited the script as you told: ; InstallShield Wizard Completed. If WinWait("Adobe Illustrator CS2 - Setup", "InstallShield Wizard Completed") Then ControlClick("Adobe Illustrator CS2 - Setup", "Finish", "Button3") EndIf Exit But It's still the same. Btw, here's the screenshot for you: http://i9.tinypic.com/29pw6qq.jpg Edited October 16, 2006 by owikh84 Link to comment Share on other sites More sharing options...
MHz Posted October 17, 2006 Share Posted October 17, 2006 I would guess that you may already have QuickTime Installed and that the window does not appear to inform that "QuickTime 6 is required". That would hang the installation. In that case, try this script that uses Adlib to check for the QuickTime window. expandcollapse popupRun('msiexec /i "' & @ScriptDir & '\Adobe Illustrator CS2.msi"') ; Welcome dialog. If WinWait("Adobe Illustrator CS2 - Setup", "The InstallShield(R) Wizard will install Adobe Illustrator CS2", 60) Then ControlClick("Adobe Illustrator CS2 - Setup", "The InstallShield(R) Wizard will install Adobe Illustrator CS2", "Button1") ; License Agreement. WinWait("Adobe Illustrator CS2 - License Agreement") ControlClick("Adobe Illustrator CS2 - License Agreement", "", "Button5") ; Customer Information. WinWait("Adobe Illustrator CS2 - Setup", "The following information must be entered before installation") ControlClick("Adobe Illustrator CS2 - Setup", "The following information must be entered before installation", "Button2") ; Destination Folder. WinWait("Adobe Illustrator CS2 - Setup", "Destination Folder") ControlClick("Adobe Illustrator CS2 - Setup", "Destination Folder", "Button1") ; Ready to Install the Program. WinWait("Adobe Illustrator CS2 - Setup", "Ready to Install the Program") ControlClick("Adobe Illustrator CS2 - Setup", "Ready to Install the Program", "Button1") Sleep(5000) AdlibEnable('_Adlib', 500) ; InstallShield Wizard Completed. WinWait("Adobe Illustrator CS2 - Setup", "InstallShield Wizard Completed") ControlClick("Adobe Illustrator CS2 - Setup", "InstallShield Wizard Completed", "Button3") AdlibDisable() EndIf Exit Func OnAutoItStart() ; Single script instance only If WinExists(@ScriptName & '_Interpreter') Then Exit AutoItWinSetTitle(@ScriptName & '_Interpreter') EndFunc Func _Adlib() ; QuickTime 6 is required. If WinExists("Adobe Illustrator CS2 - Setup", "QuickTime 6 is required") Then ControlClick("Adobe Illustrator CS2 - Setup", "QuickTime 6 is required", "Button1") EndIf EndFunc Link to comment Share on other sites More sharing options...
owikh84 Posted October 17, 2006 Author Share Posted October 17, 2006 Not working for me... Setup hung at the very first screen. I'm using this script and it finally successfull! expandcollapse popup; AutoIt Options. AutoItSetOption("TrayIconHide", 1) AutoItSetOption("WinTitleMatchMode", 4) Run('msiexec /i "' & @ScriptDir & '\Adobe_Illustrator_CS2.msi"') ; Welcome dialog. If WinWait("Adobe Illustrator CS2 - Setup", "The InstallShield(R) Wizard will install Adobe Illustrator CS2") Then ControlClick("Adobe Illustrator CS2 - Setup", "The InstallShield(R) Wizard will install Adobe Illustrator CS2", "Button1") EndIf ; License Agreement. If WinWait("Adobe Illustrator CS2 - License Agreement") Then ControlClick("Adobe Illustrator CS2 - License Agreement", "", "Button5") EndIf ; Customer Information. If WinWait("Adobe Illustrator CS2 - Setup", "The following information must be entered before installation") Then ControlClick("Adobe Illustrator CS2 - Setup", "The following information must be entered before installation", "Button2") EndIf ; Destination Folder. If WinWait("Adobe Illustrator CS2 - Setup", "Destination Folder") Then ControlClick("Adobe Illustrator CS2 - Setup", "Destination Folder", "Button1") EndIf ; Ready to Install the Program. If WinWait("Adobe Illustrator CS2 - Setup", "Ready to Install the Program") Then ControlClick("Adobe Illustrator CS2 - Setup", "Ready to Install the Program", "Button1") EndIf Sleep(5000) AdlibEnable('_Adlib', 500) ; InstallShield Wizard Completed. If WinWait("Adobe Illustrator CS2 - Setup", "InstallShield Wizard Completed") Then ControlClick("Adobe Illustrator CS2 - Setup", "InstallShield Wizard Completed", "Button1") EndIf AdlibDisable() Exit Func OnAutoItStart() ; Single script instance only If WinExists(@ScriptName & '_Interpreter') Then Exit AutoItWinSetTitle(@ScriptName & '_Interpreter') EndFunc Func _Adlib() ; QuickTime 6 is required. If WinExists("Adobe Illustrator CS2 - Setup", "QuickTime 6 is required") Then ControlClick("Adobe Illustrator CS2 - Setup", "QuickTime 6 is required", "Button1") EndIf EndFunc Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now