Sign in to follow this  
Followers 0
niceguy75

Is something wrong with this scrips?

3 posts in this topic

Hi guys,

I am trying to write a script so install winzip9 with the help of this tutorial: http://dundats.mvps.org/help/html/tutorials/winzip/winzip.htm

I have made this script but when I run that script it is pausing on the first setup screen, see this screenshot:

Posted Image

and on the tray an icon of Autoit appears when I right click that icons I see the message "pause script".

Here is the entire script please see this script and tell me where I am wrong????????

Run ("winzip90sr1.exe")

WinWaitActive("Open File - Security Warning")

Send("!r")

WinWaitActive("WinZip® 9.0 SR-1 Setup", "&Setup")

Send("!s")

WinWaitActive("WinZip Setup")

Send("Enter")

WinWaitActive("WinZip Setup")

Send("Enter")

WinWaitActive("License Agreement and Warranty Disclaimer")

Send("!Y")

WinWaitActive("WinZip Setup")

Send("!N")

WinWaitActive("WinZip Setup")

Send("!N")

WinWaitActive("WinZip Setup")

Send("!N")

WinWaitActive("WinZip Setup")

Send("!N")

WinWaitActive("WinZip Setup")

Send("Enter")

and this the application I am trying to install: http://www.brothersoft.com/winzip-download-73383.html

Please help me guys.

Share this post


Link to post
Share on other sites



a little more info is needed i guess:

To where it comes, what goes wrong?

what do you think that is wrong?

This is like saying "My pc isn't working"

so others can guess what isn't working :(


-jaenster

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

I grabbed the whole script from the complete script link (much like yours) and did minor modifications and added your Security Warning window handling but with using Adlib*(). Notice the comments at bottom of script for changes. Usually best to force activation of windows for automated installed requiring Send() and Mouse*() so you do need to be there in case they do not activate and leave the script stalled. As the page says, Control*() functions are better but you will get there I am sure in your own time.

The script I would try

; Systray icon shows current line executing
Opt('TrayIconDebug', True)

; Run the winzip installer
Run("winzip90.exe")

; Scan for security warning window but allow script to continue while doing so.
AdlibRegister('_Security_Warning')

; Initial Setup Screen
_WinWaitActive("WinZip® 9.0 SR-1 Setup", "&Setup")
Send("!s")

; Turn off scan for security warning window
AdlibUnRegister('_Security_Warning')

; Install location
_WinWaitActive("WinZip Setup", "into the following folder")
Send("{ENTER}")

; Features overview
_WinWaitActive("WinZip Setup", "WinZip features include")
Send("!n")

; License agreement
_WinWaitActive("License Agreement")
Send("!y")

; Quick start
_WinWaitActive("WinZip Setup", "Quick Start Guide")
Send("!n")

; Choose interface
_WinWaitActive("WinZip Setup", "switch between the two interfaces")
Send("!c")
Send("!n")

; Installation type (custom/express)
_WinWaitActive("WinZip Setup", "&Express setup (recommended)")
Send("!e")
Send("!n")

; Select file associations
_WinWaitActive("WinZip Setup", "WinZip needs to associate itself with your archives")
Send("!n")

; Completed installation screen
_WinWaitActive("WinZip Setup", "Thank you for installing this evaluation version")
Send("{ENTER}")

; Wait for winzip to load then close it
_WinWaitActive("WinZip (Evaluation Version)")
WinClose("WinZip (Evaluation Version)")

Exit

Func _Security_Warning()
    If WinActive("Open File - Security Warning") Then
        Send("!r")
    EndIf
EndFunc

Func _WinWaitActive($title, $text = '')
    WinWait($title, $text)
    WinActivate($title, $text)
    WinWaitActive($title, $text)
EndFunc

#cs - Changes made by MHz
    1. WinWaitActive() changed to _WinWaitActive() to use 3 builtin functions
    in the UDF to wait, activate, and wait for the window to be active.

    2. Added Adlib*() to handle probable window of Security Warning.
#ce

:(

Edit:

Added Opt('TrayIconDebug', True) which tells you current line of code. If it stalls, then check which line is the issue and fix as needed. Good to use for automated install scripts.

Edited by MHz

Share this post


Link to post
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
Sign in to follow this  
Followers 0