Jump to content

adaware installer help


 Share

Recommended Posts

I have an installer that I can't figure out why it will not go to the next screen. It is an installer for Adaware 1.06 SE personal. I get it all the way until the last winwaitactive. It stops. You can see what I have tried and failed. I am at the end of my rope. I have looked around but was not able to find anything that would help. I wish that it had a silent install like spybot does. It would make this easy.

CODE
Global $titlet1 = "Ad-Aware SE Personal"

Global $titlet2 = "Ad-Aware SE"

Global $titlet3 = "Lavasoft Ad-Aware SE"

run ("aawsepersonal.exe")

sleep(4000) ;waits for 5seconds to check for a previous version

winwaitactive ($titlet1)

;send ("!n") ;does not work

send ("{ENTER}") ;Button1

winwaitactive ($titlet1,"License Agreement")

controlcommand ($titlet1,"I accept the license agreement","Button4","Check","")

;Control ID: 10, ClassNameNN: Button4, Text: I accept the license agreement

send ("!n") ;Button1 goes to the next screen

if winwaitactive ($titlet1,"Uninstall previous version of Ad-Aware") = 1 then

sleep (4000)

send ("!n") ;Button1

winwaitactive ($titlet1,"Uninstalling previous version of Ad-Aware")

sleep (2000)

send ("!n") ;Button1

endif

winwaitactive ($titlet1,"Destination Location")

;controlfocus ($titlet1,"&Next >","3")

;controlclick ($titlet1,"&Next >", "3","left")

;controlsend ("","&Next >",3,"{ENTER}")

;Control ID: 3, ClassNameNN: Button1, Text: &Next >

;send ("{ENTER}")

send ("!n")

RUN . . . Slide . . . TAG . . . Your out . . . PAINTBALL !!!

Link to comment
Share on other sites

I have an installer that I can't figure out why it will not go to the next screen. It is an installer for Adaware 1.06 SE personal. I get it all the way until the last winwaitactive. It stops. You can see what I have tried and failed. I am at the end of my rope. I have looked around but was not able to find anything that would help. I wish that it had a silent install like spybot does. It would make this easy.

CODE
Global $titlet1 = "Ad-Aware SE Personal"

Global $titlet2 = "Ad-Aware SE"

Global $titlet3 = "Lavasoft Ad-Aware SE"

run ("aawsepersonal.exe")

sleep(4000) ;waits for 5seconds to check for a previous version

winwaitactive ($titlet1)

;send ("!n") ;does not work

send ("{ENTER}") ;Button1

winwaitactive ($titlet1,"License Agreement")

controlcommand ($titlet1,"I accept the license agreement","Button4","Check","")

;Control ID: 10, ClassNameNN: Button4, Text: I accept the license agreement

send ("!n") ;Button1 goes to the next screen

if winwaitactive ($titlet1,"Uninstall previous version of Ad-Aware") = 1 then

sleep (4000)

send ("!n") ;Button1

winwaitactive ($titlet1,"Uninstalling previous version of Ad-Aware")

sleep (2000)

send ("!n") ;Button1

endif

winwaitactive ($titlet1,"Destination Location")

;controlfocus ($titlet1,"&Next >","3")

;controlclick ($titlet1,"&Next >", "3","left")

;controlsend ("","&Next >",3,"{ENTER}")

;Control ID: 3, ClassNameNN: Button1, Text: &Next >

;send ("{ENTER}")

send ("!n")

Have you tried using the AutoIt Active Window Info tool to confirm that the title and text of the window exactly matches your code? No extra spaces or anything.

Link to comment
Share on other sites

I have an installer that I can't figure out why it will not go to the next screen...

See how others have done it.

http://www.autoitscript.com/forum/index.ph...st&p=139190

It is a bit old, some of the buttons may have changed, but the coding method might help you out.

...hope this helps...

[size="1"][font="Arial"].[u].[/u][/font][/size]

Link to comment
Share on other sites

Have you tried using the AutoIt Active Window Info tool to confirm that the title and text of the window exactly matches your code? No extra spaces or anything.

Yes. I have confirmed several times to be sure that I have the correct info. I copied it directly from the Window Info Tool. I have made several other installers but I have not run into this problem before. Am I missing an Else or should I do the if statement differently? What else should I try?

RUN . . . Slide . . . TAG . . . Your out . . . PAINTBALL !!!

Link to comment
Share on other sites

See how others have done it.

http://www.autoitscript.com/forum/index.ph...st&p=139190

It is a bit old, some of the buttons may have changed, but the coding method might help you out.

...hope this helps...

Thanks, but I have this one and it did not help me. It is confusing to me. I haven't progressed to that point. I try and search the forums here before I post. That is how I was able to fix some of my other problems. It is a learning process for me.

RUN . . . Slide . . . TAG . . . Your out . . . PAINTBALL !!!

Link to comment
Share on other sites

Thanks, but I have this one and it did not help me. It is confusing to me. I haven't progressed to that point. I try and search the forums here before I post. That is how I was able to fix some of my other problems. It is a learning process for me.

I wrote a script for AdAware SE Personal 1.06r1, here's the code if it helps:

;===============================================================================
;
; Description:      Ad-Aware SE Personal 1.06 Installer
; Syntax:           AdAware_Personal.au3
; Parameter(s):     none
; Requirement(s):   AutoIT
; Return Value(s):  Logfile
; Author(s):        Joshua Morris
; Note(s):          This script installs AdAware SE Personal
; Last Modified:    11/30/06
;
;===============================================================================

#include "include\file.au3"
#include "include\mousefix.au3"

$TMPDIR = EnvGet ( "TEMP")
$ALLUSERSPROFILE = EnvGet ( "ALLUSERSPROFILE")
$PATH = EnvGet ("PATH")
$LogFile = $TMPDIR & "\wksAutoITscript_logfile.txt"

$AppName = "Ad-Aware SE Personal"
;The binary file whose version we will check.
$AppBinFile = "C:\Program Files\Lavasoft\Ad-Aware SE Personal\Ad-Aware.exe"
;The expected file version.
$AppBinFileVersion = "6.2.0.236"
;The installation source directory
$SourceDir = "\\lavasoft adaware\"

;Check for the existence of the correct version.
_FileWriteLog($LogFile, "Now checking for " & $AppName & "...")
$CurrentVer = FileGetVersion ( $AppBinFile )
_FileWriteLog($LogFile, "The current version is: " & $CurrentVer)

If $CurrentVer < $AppBinFileVersion Then

    _FileWriteLog($LogFile, $AppName & " needs to be installed or upgraded.")
    _FileWriteLog($LogFile, "Launching Setup now...")

    ;Download the files to a temp directory and start the setup.
    DirCreate ( $TMPDIR & "\" & $AppName )
    DirCopy ( $SourceDir, $TMPDIR & "\" & $AppName, 1 )
    Run ( $TMPDIR & "\" & $AppName & "\" & "aawsepersonal.exe",@WindowsDir )
    
    WinWait("Ad-Aware SE Personal","Welcome")
    ControlClick("Ad-Aware SE Personal","Welcome","&Next >")
    
    WinWait("Ad-Aware SE Personal","License")
    ControlClick("Ad-Aware SE Personal","License","&Next >")
    
    WinWait("Ad-Aware SE Personal","Destination")
    ControlClick("Ad-Aware SE Personal","Destination","&Next >")
    
    WinWait("Ad-Aware SE Personal","Install")
    ControlClick("Ad-Aware SE Personal","Install","&Next >")
    
    WinWait("Ad-Aware SE Personal","Start")
    ControlClick("Ad-Aware SE Personal","Start","&Next >")
    
    WinWait("Ad-Aware SE Personal","Press the Finish")
    ControlCommand("Ad-Aware SE Personal","Press the Finish","Button7","UnCheck","")
    ControlCommand("Ad-Aware SE Personal","Press the Finish","Button8","UnCheck","")
    ControlClick("Ad-Aware SE Personal","Press the Finish","&Finish >")
    
    ;wait for defs to download
    Sleep(11000)
    
    WinClose("Ad-Aware SE Personal","")
                    
    ;Re-check the version after install.
    $CurrentVer = FileGetVersion ( $AppBinFile )
    _FileWriteLog($LogFile, "The current version is: " & $CurrentVer)
    _FileWriteLog($LogFile, $AppName & " setup is now finished.")

Else
    ;The correct version must be installed.
    _FileWriteLog($LogFile, $AppName & " is the correct version. Nothing to install.")
EndIf
Link to comment
Share on other sites

I wrote a script for AdAware SE Personal 1.06r1, here's the code if it helps:

Thanks for the help. You got me thinking about a different way of doing it. I a going to do a check at the start to uninstall the previous version before I do the new install. That will streme line the program and give me better control over the program. Thanks.

RUN . . . Slide . . . TAG . . . Your out . . . PAINTBALL !!!

Link to comment
Share on other sites

  • 6 months later...

Thanks for the help. You got me thinking about a different way of doing it. I a going to do a check at the start to uninstall the previous version before I do the new install. That will streme line the program and give me better control over the program. Thanks.

Why not just run "aawsepersonal.exe /quiet" ?
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...