Jump to content

Kaspersky Internet Security 2009 - scripting problem w/ Config Wizard Page


SIMurq
 Share

Recommended Posts

I'm trying to write a script for unattended installation of Kaspersky Internet Security 2009 v8.0.506. It's almost ready and seems to work ok unless the Configuration Wizard page pops up. You can see it on the image attached.

As you can see, when the mouse is on the "Next" button, AutoIt Window Info does not show any button info to include with ControlClick command - the command I often used in the script. Therefore, I've decided to use SEND("!n") command instead (since the underlined letter for "Next" is "N") but to no avail either. The only valuable information I could get from AutoIt Window Info was that that particular window belongs to Class AVP.WizardTpl. To be honest, it doesn't sound anything to me but I've googled around to find out a similar scripting problem. There is, however, no indication whatsoever. :lmao:

My only guess is that the Configuration Wizard page is not related to the main executable except it's called by it after the installation of the program finishes so that the end-user could configure individual program settings. And therefore, AutoIt does not recognize the Configuration Wizard page (since it doesn't belong to installer) and, therefore, WinWaitActive command doesn't work. Sorry, if this sounds stupid & ridiculuous but I'm a newbie :)

I've attached the incomplete script so that everyone could test it and guide me in the right direction. My question is - what can be done to proceed with Conf. Wizard Page and configure individual program settings?!?

Thank you very much in advance!!!

KIS.au3

Link to comment
Share on other sites

Can't you find the window by its title ?

That's the problem! If you look at the image above, you can see that the title shows "Kaspersky ... Configuration Wizard" but I cannot see any other title for sub-pages to include in the flag parameter of WinWaitActive.

And insteaad of WinWaitActive use a sleep to see what will happen...

Thank you! I'll try that and will post the result.
Link to comment
Share on other sites

It's probably a dumb solution as it's much simpler than other solutions but you might want to play around with pixel and use MouseCoorMode 0 so when the window is active you can preform a mouse click which will be relative to the active window and no matter where it might be on the desktop. Put the window so it's left-top corner is quit close to the spot 0,0 of the desktop and use AutoIt Window Info to get the relative mouse coordinates and from here it should be pretty simple.

Edited by Authenticity
Link to comment
Share on other sites

Authenticity, thanks for help indeed!

Well, a similar idea came to my mind earlier but I used MouseClick function to replace ControlClick. This didn't do the trick, by the way. I'll try your recommendation as well. But as Inverted already mentioned, that seems to be a final resort indeed. Who knows, let's see... :)

Edited by SIMurq
Link to comment
Share on other sites

This is what I've been able to clarify for now:

I have slightly changed the code replacing Run with ShellExecute to launch the main MSI installer wrapped into the original EXE (I have extracted the MSI). As soon as it finishes installing (even though 3 instances of "msiexec.exe" running in the background, as far as I can see in the Task Manager), it launches AVP.exe which is the actual program. But the problem is that at its first launch the program opens the Configuration Wizard, and starts the program only if you pre-configure the basic parameters before the actual program starts. I.e., AVP.exe is mainly responsible for the start of the main program but at its 1st launch only the Configuration Wizard starts and then passes the command to the main program.

However, I still cannot enable the script to "catch" the Configuration Wizard window. No way... On the other hand, when I divide the code to two separate scripts - one responsible for MSI install, and the other one - to launch AVP.exe after the MSI install - the script works!!! I think the problem is with the passing of "rights" from MSI to AVP.exe. You can see it in the attached script.

So, what would be your suggestions in this case?

Thank you!

; ----------------------------------------------------------------------------
;
; Kaspersky Internet Security 2009 (8.0.506)
; Language: English
; Creator:  SIMurq
; Version:  1.0
; ----------------------------------------------------------------------------


;Setup start
ShellExecute("kis.en.msi")

;Actual installation
WinWaitActive("Kaspersky Internet Security 2009", "Welcome to Kaspersky Internet Security 2009 Setup Wizard")
ControlClick("Kaspersky Internet Security 2009", "", "Button1")

;License
WinWaitActive("Kaspersky Internet Security 2009", "Standard End User License Agreement")
ControlClick("Kaspersky Internet Security 2009", "", "Button2")
ControlClick("Kaspersky Internet Security 2009", "", "Button5")

;Install type selection
WinWaitActive("Kaspersky Internet Security 2009", "Installation type")
ControlClick("Kaspersky Internet Security 2009", "", "Button1")

;Start install
WinWaitActive("Kaspersky Internet Security 2009", "Ready to install")
ControlClick("Kaspersky Internet Security 2009", "", "Button3")

;---------------------------------------------------------------
;That's the funny part when MSI install stops and launches the installed AVP.exe (actual program).
;As soon as AVP.exe starts, it opens NOT the program but the Configuration Wizard to pre-configure some basic program parameters.
;The below script doesn't work, however, since it cannot "catch" the Conf. Wizard window!
;Also, when I make another script and input ShellExecute("avp.exe") and the following lines (see below), it works! But, as I said, the below lines
;don't work within one script. :(
;---------------------------------------------------------------

;Configuration Wizard Start Page
WinWaitActive("Kaspersky Internet Security 2009", "Welcome")
Send("{ENTER}")

;Wizard Start
WinWaitActive("Kaspersky Internet Security Configuration Wizard", "&Next")
Send("!n")

;Postponing Activation of Program
WinWaitActive("Kaspersky Internet Security Configuration Wizard", "Activate your copy of Kaspersky Internet Security")
Send("!l")

;Disabling Feedback/Network Participation
WinWaitActive("Kaspersky Internet Security Configuration Wizard", "Feedback")
Send("{TAB}")
Send("{TAB}")
Send("{SPACE}")
Send("!n")

;Stop Restart
WinWaitActive("Kaspersky Internet Security Configuration Wizard", "Restart")
Send("!r")
Send("!f")
Link to comment
Share on other sites

I didn't really got what is the specific case that may cause to not catch the parameters configuration window but you can change the main window's title after you're done with the first part of the script and then wait for the window with the title you've specified - "Kaspersky Internet Security Configuration Wizard" to be active. Not sure though.

Edited by Authenticity
Link to comment
Share on other sites

Thank you! But you can see above that I've already changed the window title to exactly "Kaspersky Internet Security Configuration Wizard" in the second part of the script :lmao: And it's the active window, btw!

Still trying to find a solution. :)

Edited by SIMurq
Link to comment
Share on other sites

  • 6 months later...

Hi SIMurq

Few months later...

Did you find any solution so far ?

I'm working on a Kaspersky Antivirus 2009 install automation script, those "flash" links during the setup are very bugging me...

it looks they've put those there intentionally >_<

Autoit3 Info tool:

the window: [CLASS: AVP.WizardTpl; TITLE: Assistant de configuration de Kaspersky Anti-Virus]

and a NEXT link invisible to the autoit tool...

I tried MouseClick / ControlClick ... with window relative coord on to the location of the link, without success.

anyway, do you have any hint about it ??? I'd gladly take em!

Thanks alot.

Here's a part of the code for example purpose..

$hwndWin = WinGetHandle("Assistant de configuration de Kaspersky Anti-Virus")
                opt("MouseCoordMode",0)
                Local $Array
                $array = WinGetPos($hwndWin)
                ;_arraydisplay($array)
                WinActivate("Assistant de configuration de Kaspersky Anti-Virus")
                ControlClick("","",$hwndWin,"left",1,$array[0] + 90, $array[1] + 366)
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...