Jump to content

[Req] Adobe Illustrator CS2


owikh84
 Share

Recommended Posts

Here's my AutoIt script for Adobe illustrator CS2:

; 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

Ah, Then maybe runwait? with an exit at the end?

EDIT::

I just realized, That wouldnt be a good idea, Lol.

Edited by AzKay
# MY LOVE FOR YOU... IS LIKE A TRUCK- #
Link to comment
Share on other sites

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

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

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 by owikh84
Link to comment
Share on other sites

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.

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", 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

Not working for me... Setup hung at the very first screen.

I'm using this script and it finally successfull!

; 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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...