Chimaera Posted September 30, 2010 Posted September 30, 2010 (edited) Im having a look at an install to sort of get my feet wet ;o) and i was wondering about the security warning that pops up at the start when you try and install the file. Is there a way inside autoit to disable it so it dosen't interfere with the install? EDITexpandcollapse popup#cs ---------------------------------------------------------------------------- AutoIt Version: 3.3.6.1 Author: Chimaera Purpose: AVG 2011 Silent Installer Script Function: Template AutoIt script. #ce ---------------------------------------------------------------------------- #NoTrayIcon Opt("SendKeyDownDelay", 50) ;AVG Setup --------- ; Run("avg_free_x64_all_2011_1120a3152.exe") ; ; Open File - Security Warning WinWaitActive("Open File - Security Warning", "&Run") Send("!r") ; ;welcome to avg and licence agreement WinWaitActive("AVG Installer", "&Accept") ;Send("{ENTER}") Send("!a") ; ;auto activate licence agreement WinWaitActive("AVG Installer", "&Next") Send("!n") ; ;conflicting product check ;WinWaitActive("AVG Installer", "&Exit") ;Send("!x") ; ;custom install selection WinWaitActive("AVG Installer", "&Next") ; choice only for experienced users Send("{TAB 2}") Send("{DOWN}") ; custom radio button selection Send("{TAB}") Send("{SPACE}") ; To disable 2011 gadget Send("!n") ; ;custom options WinWaitActive("AVG Installer", "&Next") Send("{TAB 5}") Send("{DOWN 3}") Send("{SPACE}") ; disables additional languages Send("{DOWN 24}") Send("{SPACE}") ; disables link scanner / search shield and surf shield Send("!n") ; ;security toolbar deactivation WinWaitActive("AVG Installer", "&Next") Send("{TAB 3}") Send("{SPACE}") ; disables yahoo default search engine Send("{TAB 4}") Send("{SPACE}") ; disables avg security toolbar Send("!n") ; ;install starts ; WinWaitActive("AVG Installer", "&Finish") Send("{TAB 6}") Send("{SPACE}") ; disables participation Send("!f") ; ;AVG setup finished ---------------------- This is what i have Is there any way to improve this? Thanks for any help. Chimaera Edited October 1, 2010 by Chimaera If Ive just helped you ... miracles do happen. Chimaera CopyRobo() * Hidden Admin Account Enabler * Software Location From Registry * Find Display Resolution * _ChangeServices()
Bert Posted September 30, 2010 Posted September 30, 2010 You will need a certificate if I remember right. http://www.instantssl.com/code-signing/code-signing-technical.html The Vollatran project My blog: http://www.vollysinterestingshit.com/
Chimaera Posted September 30, 2010 Author Posted September 30, 2010 (edited) Thanks for that ill have a look Another odd bit is i have got past the security warning by just mapping the button see below ; ; Open File - Security Warning WinWaitActive("Open File - Security Warning", "&Run") Send("!r") <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< This works and it starts the install ; ;welcome to avg and licence agreement WinWaitActive("AVG Installer", "&Accept") Send("!a") <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< This fails and it just sits there waiting for the accept button to be pressed What did i do wrong? I also tried a Send ({ENTER}) as well but no luck EDIT Ok more weirdness found I was rechecking the code and working through the installer check Alt instructions and using the finder tool, and i ran the exe whilst the autoit window was open and it banged through all the menus like a good un, and im like WTF. It wont do it as an exe or just double clicked without compile, yet it does it if you leave the code window open and run the exe?? Hope someone knows what causes this Thanks Edited October 1, 2010 by Chimaera If Ive just helped you ... miracles do happen. Chimaera CopyRobo() * Hidden Admin Account Enabler * Software Location From Registry * Find Display Resolution * _ChangeServices()
AlmarM Posted October 1, 2010 Posted October 1, 2010 Little tip, this could also be done: Send("{DOWN 20}"). Minesweeper A minesweeper game created in autoit, source available. _Mouse_UDF An UDF for registering functions to mouse events, made in pure autoit. 2D Hitbox Editor A 2D hitbox editor for quick creation of 2D sphere and rectangle hitboxes.
omikron48 Posted October 1, 2010 Posted October 1, 2010 Try sticking this at the start of your script: Opt("SendKeyDownDelay", 50)
Chimaera Posted October 1, 2010 Author Posted October 1, 2010 (edited) Thanks for the help ive tried the delay and no difference i went as far as 1250 just to check I rechecked using keys whether Alt A / Alt a / Enter work and they all work fine and move the installer onto the next page from the keyboard. But using the autoit either running it or exe still stops at the first window for the license Another odd thing i noticed was i had about 15 instances of the au3 file running in memory as though it dosent remove them when i quit the installer I had to go through task manager and remove them one by one Could this be a windows 7 issue or maybe the new version of avg has something twitchy in it to stop doing this kind of thing? thanks again for the help EDIT Reposted current script on first page Edited October 1, 2010 by Chimaera If Ive just helped you ... miracles do happen. Chimaera CopyRobo() * Hidden Admin Account Enabler * Software Location From Registry * Find Display Resolution * _ChangeServices()
Chimaera Posted October 2, 2010 Author Posted October 2, 2010 (edited) After some probing i think the 15 instances is just because im exit halfway through Is there some code i can put in the script so if the install finishes then it closes itself? I have the window e.g. "AVG Installer" so maybe something based against that would this work? If "AVG Installer"[0] = 0 Then Exit ;Or would i need to make a parameter like $AvgWindow = "AVG Installer" ;<<<<<<<<<<<< Or should it be tied to the install file instead? ; If $AvgWindow[0] = 0 Then Exit Are these parameters? $AvgWindow and is that how they work like in cmd?, where you set it and call the param as needed? because i see them all over scripts with unusual names so im assuming thats what they are. Thanks for any help Edited October 2, 2010 by Chimaera If Ive just helped you ... miracles do happen. Chimaera CopyRobo() * Hidden Admin Account Enabler * Software Location From Registry * Find Display Resolution * _ChangeServices()
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