ZeRoXX Posted March 17, 2020 Posted March 17, 2020 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!
water Posted March 17, 2020 Posted March 17, 2020 I‘m sure Kaspersky supports silent installation. Search the web for „kaspersky antivirus silent install“ My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.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 (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
ZeRoXX Posted March 17, 2020 Author Posted March 17, 2020 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
water Posted March 17, 2020 Posted March 17, 2020 https://support.kaspersky.com/12965#block2 Maybe this answers your question? My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.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 (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
ZeRoXX Posted March 17, 2020 Author Posted March 17, 2020 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.
water Posted March 17, 2020 Posted March 17, 2020 Could you remove the space after /t and try again? My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.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 (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
water Posted March 17, 2020 Posted March 17, 2020 Another idea: set the path for /t in quotes as it contains a space. My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.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 (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
ZeRoXX Posted March 17, 2020 Author Posted March 17, 2020 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 😕
water Posted March 17, 2020 Posted March 17, 2020 Do you get any error messages? Do you run the command prompt as administrator? My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.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 (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
ZeRoXX Posted March 17, 2020 Author Posted March 17, 2020 8 minutes ago, water said: Do you get any error messages? Do you run the command prompt as administrator? Nope I do not get any error messages and yes I run it as an administrator.
Nine Posted March 17, 2020 Posted March 17, 2020 You didn't put any sleep between Send, you should try to add some especially before and after the check boxes... “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Debug Messages Monitor UDF Screen Scraping Round Corner GUI UDF Multi-Threading Made Easy Interface Object based on Tag
ZeRoXX Posted March 17, 2020 Author Posted March 17, 2020 1 minute ago, Nine said: You didn't put any sleep between Send, you should try to add some especially before and after the check boxes... Isn't that what SendKeyDownDelay is used for?
ZeRoXX Posted March 17, 2020 Author Posted March 17, 2020 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?
Nine Posted March 17, 2020 Posted March 17, 2020 (edited) 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 March 17, 2020 by Nine “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Debug Messages Monitor UDF Screen Scraping Round Corner GUI UDF Multi-Threading Made Easy Interface Object based on Tag
ZeRoXX Posted March 17, 2020 Author Posted March 17, 2020 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
Nine Posted March 17, 2020 Posted March 17, 2020 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). “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Debug Messages Monitor UDF Screen Scraping Round Corner GUI UDF Multi-Threading Made Easy Interface Object based on Tag
Developers Jos Posted March 17, 2020 Developers Posted March 17, 2020 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.
ZeRoXX Posted March 17, 2020 Author Posted March 17, 2020 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.
Nine Posted March 17, 2020 Posted March 17, 2020 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 ? “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Debug Messages Monitor UDF Screen Scraping Round Corner GUI UDF Multi-Threading Made Easy Interface Object based on Tag
ZeRoXX Posted March 17, 2020 Author Posted March 17, 2020 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
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now