Jump to content

Accepting checkbox in installer not working


Recommended Posts

Hello everyone, I hope this is the correct place to ask such a question. I am currently trying to automate the installation of an AntiVirus (Kaspersky: https://www.kaspersky.com/downloads/thank-you/antivirus-free-trial). Reason for that is that I want to install it in a VM try out some virus detection and revert the VM and install it again afterwards.

 

For that I wrote following script:

Opt("SendKeyDownDelay", 1000)
Sleep(1000)
WinActivate("Kaspersky Anti-Virus")
Sleep(1000)
Send("{TAB}")
Send("{ENTER}")
Send("{TAB}")   
Send("{SPACE}")
Send("{TAB}")
Send("{SPACE}")
Send("{TAB}")       
Send("{TAB}")
Send("{TAB}")
Send("{TAB}")
Send("{ENTER}")
Send("{TAB}")
Send("{TAB}")
Send("{TAB}")
Send("{TAB}")
Send("{ENTER}")
Send("{TAB}")
Send("{ENTER}")
Send("{TAB}")
Send("{TAB}")
Send("{TAB}")
Send("{TAB}")
Send("{ENTER}")
Send("{TAB}")
Send("{ENTER}")
Send("{TAB}")
Send("{TAB}")
Send("{SPACE}")
Send("{TAB}")
Send("{TAB}")
Send("{ENTER}")
Exit

 

This should simply click through the installer and install the application. However, the checkboxes (for example which indicate that I agree with the ToS) do not work. Sometimes none gets ticked by the "SPACE" command, and sometimes only one.

 

Does anybody know a possible solution?

I also tried to search for the checkboxes / buttons with Au3Info, but since the installer is a process of type "Internet Explorer_Server" I am not able to see any text of the buttons.

 

Thanks in advance!

Link to comment
Share on other sites

I‘m sure Kaspersky supports silent installation. 
Search the web for „kaspersky antivirus silent install“

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

19 minutes ago, water said:

I‘m sure Kaspersky supports silent installation. 
Search the web for „kaspersky antivirus silent install“

I did, but unfortunately I did not manage to make it work for the trial installation. I think they only support it for the non-free version

Link to comment
Share on other sites

https://support.kaspersky.com/12965#block2

Maybe this answers your question?

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

24 minutes ago, water said:

https://support.kaspersky.com/12965#block2

Maybe this answers your question?

 

Well as I said if I run "kav20.0.14.1085abcdefgde_19837.exe /s /mybirthdate=1990-01-01 /len-us /t C:\Program Files\KasperskyLab /pALLOWREBOOT=1 /pSKIPPRODUCTCHECK=1" nothing happens.

 

I guess they removed it for the Kaspersky Antivirus 30-Day trial.

Link to comment
Share on other sites

Could you remove the space after /t and try again?

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

Another idea: set the path for /t in quotes as it contains a space. 

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

7 minutes ago, water said:

Another idea: set the path for /t in quotes as it contains a space. 

kav20.0.14.1085abcdefgde_19837.exe /s /mybirthdate=1990-01-01 /len-us /t"C:\Program Files\KasperskyLab" /pALLOWREBOOT=1 /pSKIPPRODUCTCHECK=1 /pAGREETOEULA=1

 

Unfortunately with the same result 😕

Link to comment
Share on other sites

Do you get any error messages?

Do you run the command prompt as administrator?

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

Also tried this piece of code:

Opt("SendKeyDownDelay", 1000)
Opt("SendKeyUpDelay", 1000)
Sleep(1000)
WinActivate("Kaspersky Anti-Virus")
Sleep(1000)
Send("{TAB}")
Sleep(1000)
Send("{ENTER}")
Sleep(1000)
Send("{TAB}")
Sleep(1000)
Send("{SPACE}")
Sleep(1000)
Exit

I just wanted to check the first checkbox. I does not even accept the TAB now to mark the checkbox. Something is quite buggy?

Link to comment
Share on other sites

SendKeyDownDelay

Alters the length of time a key is held down before being released during a keystroke. For applications that take a while to register keypresses you may need to raise this value from the default. A value of 0 removes the delay completely.
Time in milliseconds to pause (default=5).

Not exactly, it is like if you were holding the key for 1 sec and then releasing it.  IDK how your application reacts to it.  You should try to reduce the delay to a normal value like 50 and add some Sleep...who knows might work ;)

ps. sendkeyupdelay is not an accepted value

Edited by Nine
Link to comment
Share on other sites

9 minutes ago, Nine said:
SendKeyDownDelay

Alters the length of time a key is held down before being released during a keystroke. For applications that take a while to register keypresses you may need to raise this value from the default. A value of 0 removes the delay completely.
Time in milliseconds to pause (default=5).

Not exactly, it is like if you were holding the key for 1 sec and then releasing it.  IDK how your application reacts to it.  You should try to reduce the delay to a normal value like 50 and add some Sleep...who knows might work ;)

ps. sendkeyupdelay is not an accepted value

Ah thanks :)

Doesn't change anything though 😕

The weird thing is if I send TAB and ENTER for the first screen in a separate exe and TAB, SPACE, TAB, SPACE in another exe it works?!

But combining these steps into one exe it does not work...even though the window does not lose focus

s1.png

s2.png

Link to comment
Share on other sites

Link to comment
Share on other sites

  • Developers

Are you sure you don't need administrator level with #RequireAdmin for your script for it to be able to do things to the running installer, which presumably also just asked for Elevated rights?

 

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

4 minutes ago, Nine said:

Could you use Au3Info.exe tool over those checkboxes, see if we can get something there (don't forget to unfreeze the tool if you are to hover them).

Unfortunately, as I said, this installer is some iexplorer wrapper? Because of that I do not see any button text:

Quote

>>>> Window <<<<
Title:    Kaspersky Anti-Virus
Class:    KasperskyShadow
Position:    717, 184
Size:    578, 529
Style:    0x96CA08C4
ExStyle:    0x00070101
Handle:    0x00000000004405E2

>>>> Control <<<<
Class:    Internet Explorer_Server
Instance:    1
ClassnameNN:    Internet Explorer_Server1
Name:    
Advanced (Class):    [CLASS:Internet Explorer_Server; INSTANCE:1]
ID:    
Text:    
Position:    0, 0
Size:    572, 500
ControlClick Coords:    10, 327
Style:    0x56000000
ExStyle:    0x00000000
Handle:    0x00000000000407F6

>>>> Mouse <<<<
Position:    730, 537
Cursor ID:    2
Color:    0xF6F6F6

>>>> StatusBar <<<<

>>>> ToolsBar <<<<

>>>> Visible Text <<<<


>>>> Hidden Text <<<<
 

 

Quote

Are you sure you don't need administrator level with #RequireAdmin for your script for it to be able to do things to the running installer, which presumably also just asked for Elevated rights?

I start both (the installer and the script-exe) as the Administrator user.

Link to comment
Share on other sites

1 minute ago, ZeRoXX said:

I start both (the installer and the script-exe) as the Administrator user.

Have you tried to specifically put #RequireAdmin at the beginning of the script ?

Link to comment
Share on other sites

Just now, Nine said:

Have you tried to specifically put #RequireAdmin at the beginning of the script ?

Yes, I did. Does not change anything:

#RequireAdmin
Sleep(2000)
WinActivate("Kaspersky Anti-Virus")
Sleep(2000)
Send("{TAB}")
Sleep(2000)
Send("{ENTER}")
Sleep(2000)
Send("{TAB}")
Sleep(2000)
Send("{SPACE}")
Sleep(2000)
Send("{TAB}")
Sleep(2000)
Send("{SPACE}")
Sleep(2000)
Exit

 

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...