Docfxit Posted June 23, 2014 Share Posted June 23, 2014 (edited) I'm trying to make an automated install script for DriverMax. (Driver updater) I have the beginning code to get it started: expandcollapse popup#include <array.au3> Opt("TrayIconDebug", 1) ;0-off ; Set so that tray displays current line number _Au3RecordSetup() If @OSVersion = 'Win_7' Then $ProgramFiles = "C:\Programs\" Else $ProgramFiles = "C:\Program Files\" EndIf Run('D:\Dnload\drivermaxVer.7.32.exe') WinWait("Setup - DriverMax", "Welcome to the Drive") If Not WinActive("Setup - DriverMax", "Welcome to the Drive") Then WinActivate("Setup - DriverMax", "Welcome to the Drive") WinWaitActive("Setup - DriverMax", "Welcome to the Drive") Send("{ENTER}") _WinWaitActivate("Setup - DriverMax", " Innovative Solution") Send("{ENTER}") $title = WinGetTitle("Alert", "") WinActivate($title, "") $text = WinGetText("", "") $text = StringStripCR($text) $TextLine = StringSplit($text, @LF) If $title = "Alert" And $TextLine[2] = "Allow" Then WinWait("Alert", "Allow") If Not WinActive("Alert", "Allow") Then WinActivate("Alert", "Allow") WinWaitActive("Alert", "Allow") ControlFocus("Alert", "Allow", "Button6") ; ZoneAlarm Allow if Remember this setting is on the window ControlClick("Alert", "Allow", "Button6", "Left", 1) EndIf WinWait("Setup - DriverMax", " Innovative Solution") If Not WinActive("Setup - DriverMax", " Innovative Solution") Then WinActivate("Setup - DriverMax", " Innovative Solution") WinWaitActive("Setup - DriverMax", " Innovative Solution") Send($ProgramFiles & "DriverMax") Send("{ENTER}{ENTER}") Func _Au3RecordSetup() ;AutoIt_Debugger_Command:Disable_Debug Opt('WinWaitDelay', 100) Opt("WinTitleMatchMode", 4) Opt('WinDetectHiddenText', 1) Opt('MouseCoordMode', 0) ;AutoIt_Debugger_Command:Enable_Debug EndFunc ;==>_Au3RecordSetup Func _WinWaitActivate($title, $text, $timeout = 0) ;AutoIt_Debugger_Command:Disable_Debug WinWait($title, $text, $timeout) If Not WinActive($title, $text) Then WinActivate($title, $text) WinWaitActive($title, $text, $timeout) ;AutoIt_Debugger_Command:Enable_Debug EndFunc ;==>_WinWaitActivate Func IsVisible($handle) If BitAND(WinGetState($handle), 2) Then Return 1 Else Return 0 EndIf EndFunc ;==>IsVisible Note: the above two should be together in one script. I don't know how to combine them during an edit. It stops on this screen: I would like to select Custom installation and remove the check mark in Install Search Protect. The info summary shows this: expandcollapse popup>>>> Window <<<< Title: Setup - DriverMax Class: TWizardForm Position: 30, 160 Size: 503, 388 Style: 0x16CA0000 ExStyle: 0x00000100 Handle: 0x00080392 >>>> Control <<<< Class: ATL:63D0B400 Instance: 1 ClassnameNN: ATL:63D0B4001 Name: Advanced (Class): [CLASS:ATL:63D0B400; INSTANCE:1] ID: 6135808 Text: Position: 13, 71 Size: 470, 228 ControlClick Coords: 153, 117 Style: 0x56000000 ExStyle: 0x00000000 Handle: 0x000404E0 >>>> Mouse <<<< Position: 199, 373 Cursor ID: 0 Color: 0x979797 >>>> StatusBar <<<< >>>> ToolsBar <<<< >>>> Visible Text <<<< Innovative Solutions Install Entrusted Search Protect Recommended by DriverMax YES NO 303 303 SECOND YES SECOND NO 203 First YES First NO 103 107 207 307 < &Back &Next > Cancel >>>> Hidden Text <<<< Select the additional tasks you would like Setup to perform while installing DriverMax, then click Next. Setup will install DriverMax into the following folder. To continue, click Next. If you would like to select a different folder, click Browse. C:\Programs\DriverMax B&rowse... At least 16.6 MB of free disk space is required. Please read the following License Agreement. You must accept the terms of this agreement before continuing with the installation. A. LICENSE AGREEMENT - DRIVERMAX - 7.32 B. OPENCANDY END USER LICENSE AGREEMENT (EULA) A. LICENSE AGREEMENT - DRIVERMAX DriverMax can download and update drivers for: • Windows 8.1 32-bit and 64-bit - all service packs - all editions • Windows 8 32-bit and 64-bit - all service packs - all editions • Windows 7 32-bit and 64-bit - all service packs - all editions • Windows Vista 32-bit and 64-bit - all service packs - all editions • Windows XP 32-bit and 64-bit - all service packs - all editions This is a contract. Please read it carefully. By indicating your acceptance below, you accept all the terms and conditions of this agreement. If you do not agree with the terms and conditions of this agreement, decline where instructed, and you will not be able to use the software. The DriverMax software and the DriverMax web site is the property of Innovative Solutions or its licensers and is protected by copyright law. While Innovative Solutions continues to own the software and web site, you will have certain rights to use DriverMax after accepting this license. DriverMax is a tool able to check for driver updates automatically. It allows you to download and install driver updates from the DriverMax community web site. In exchange for these benefits, you must share with the DriverMax community the drivers already installed on your computer. Using the DriverMax helps you be a part of our large community of users, who always keep their drivers up to date and benefit from the latest advances in driver development. Everyone contributes to this large community. By accepting this agreement, you accept the fact that, in exchange for being able to download driver updates from the DriverMax web site, the DriverMax Agent will automatically upload a copy of your drivers to the DriverMax web site. DriverMax will never upload or transmit on the Internet any personal or private information; only a copy of your hardware drivers will be uploaded. If you don't accept this agreement, copies of your hardware drivers won't be uploaded to the DriverMax community web site, but you will not be able to download drivers using DriverMax, or check for updates automatically. The service provided by DriverMax consists in locating the right drivers for your hardware and installing them on your PC. Please note that all drivers are developed by other manufacturers and by installing them you agree to the End User License Agreement (EULA) of each driver. The PRO (paid) version of DriverMax is not charging you for the drivers, but for the services that we provide (locating the right drivers, notifying you about the updates and installing the drivers for you). You should only install a driver if you purchased the hardware device the driver was made for, and only after you have read the driver's EULA and agreed to it. DriverMax does not contain any spyware, adware or any other possible type of malware. DriverMax has been certified by Softpedia as “100% Clean” and by CNet Download.com as “Tested spyware free”. It has won 5 stars awards from CNet, Softpedia, NeoWin and other important download sites and computer magazines all over the world. Except as may be modified by a license addendum which accompanies this license, your rights and obligations with respect to the use of DriverMax are as follows: YOU MAY NOT: (1) sublicense, rent or lease any portion of DriverMax; (2) reverse engineer, decompile, disassemble, modify, translate, make any attempt to discover the source code of DriverMax or create derivative works from the Software; TERM: This Agreement is effective for as long as DriverMax will be installed on your computer unless you or Innovative Solutions terminate the Agreement earlier in accordance with the terms set forth herein. This Agreement will terminate automatically if you fail to comply with any of the limitations or other requirements described herein. Upon any termination or expiration of this Agreement, you must destroy all copies of DriverMax in your possession. You may terminate this Agreement at any point by destroying all copies of DriverMax. OWNERSHIP RIGHTS: DriverMax is protected by international copyright laws. Innovative Solutions or its licensers own and retain all right, title and interest in and DriverMax, including all copyrights, patents, trade secret rights, trademarks and other intellectual property rights therein. Your possession, installation, or use of DriverMax does not transfer to you any title to the intellectual property in DriverMax, and you will not acquire any rights to the Software except as expressly set forth in this Agreement. All copies of DriverMax made hereunder must contain the same proprietary notices that appear on and in the Software. WARRANTY DISCLAIMER: DriverMax IS PROVIDED "AS IS." TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, INNOVATIVE SOLUTIONS DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT WITH RESPECT TO THE SOFTWARE AND THE ACCOMPANYING DOCUMENTATION. YOU ASSUME RESPONSIBILITY FOR SELECTING THE SOFTWARE TO ACHIEVE YOUR INTENDED RESULTS, AND FOR THE INSTALLATION OF, USE OF, AND RESULTS OBTAINED FROM THE SOFTWARE. WITHOUT LIMITING THE FOREGOING PROVISIONS, INNOVATIVE SOLUTIONS MAKES NO WARRANTY THAT THE SOFTWARE WILL BE ERROR-FREE OR FREE FROM INTERRUPTIONS OR OTHER FAILURES OR THAT THE SOFTWARE WILL MEET YOUR REQUIREMENTS. SOME STATES AND JURISDICTIONS DO NOT ALLOW LIMITATIONS ON IMPLIED WARRANTIES, SO THE ABOVE LIMITATION MAY NOT APPLY TO YOU. The foregoing provisions shall be enforceable to the maximum extent permitted by applicable law. LIMITATION OF LIABILITY: UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER IN TORT, CONTRACT, OR OTHERWISE, SHALL INNOVATIVE SOLUTIONS OR ITS SUPPLIERS BE LIABLE TO YOU OR TO ANY OTHER PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR FOR ANY AND ALL OTHER DAMAGES OR LOSSES. IN NO EVENT WILL INNOVATIVE SOLUTIONS BE LIABLE FOR ANY DAMAGES IN EXCESS OF THE LIST PRICE INNOVATIVE SOLUTIONS CHARGES FOR A LICENSE TO THE SOFTWARE, EVEN IF INNOVATIVE SOLUTIONS SHALL HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY TO THE EXTENT THAT APPLICABLE LAW PROHIBITS SUCH LIMITATION. FURTHERMORE, SOME STATES AND JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS LIMITATION AND EXCLUSION MAY NOT APPLY TO YOU. The foregoing provisions shall be enforceable to the maximum extent permitted by applicable law. HIGH RISK ACTIVITIES: The Software is not fault-tolerant and is not designed or intended for use in hazardous environments requiring fail-safe performance, including without limitation, in the operation of nuclear facilities, aircraft navigation or communication systems, air traffic control, weapons systems, direct life- support machines, or any other application in which the failure of the Software could lead directly to death, personal injury, or severe physical or property damage (collectively, "High Risk Activities"). Innovative Solutions expressly disclaims any express or implied warranty of fitness for High Risk Activities. PERSONAL INFORMATION In order for the DriverMax software to provide some of the web-related services for the specific computer that it's installed on, the program can transmit information about the computer to the DriverMax.com web site (including: information about driver updates, information about unknown hardware, information about your computer's installed hardware). That information will be used to provide some of the functions of the DriverMax software program and web site, to compile statistics (including, but not limited to "most popular hardware" and "best hardware for Windows Vista") and may be used to perform other actions which benefit the DriverMax user community. This information is only sent for some of the web-related functions. You may also need to create a user account. The DriverMax program or the DriverMax Agent may show an ad window from time to time. No personal information is used or collected for displaying the ad. The same ads are shown to all DriverMax users. Accepting this EULA means that you agree to send this information to the DriverMax.com web site and give DriverMax.com permission to use this information, and that you agree to create an account on DriverMax.com. MISCELLANEOUS: This Agreement is governed by international laws. This Agreement sets forth all rights for the user of DriverMax and is the entire agreement between the parties. This Agreement supersedes any other communications with respect to DriverMax. This Agreement may not be modified except by a written addendum issued by a duly authorized representative of Innovative Solutions. No provision hereof shall be deemed waived unless such waiver shall be in writing and signed by Innovative Solutions or a duly authorized representative of Innovative Solutions. If any provision of this Agreement is held invalid, the remainder of this Agreement shall continue in full force and effect. The parties confirm that it is their wish that this Agreement has been written in the English language only. INNOVATIVE SOLUTIONS CUSTOMER CONTACT: E-mail: http://www.innovative-sol.com/contact Web : http://www.innovative-sol.com B. OPENCANDY END USER LICENSE AGREEMENT (EULA) Date of last revision: March 7, 2012 PLEASE READ THESE TERMS BEFORE PROCEEDING WITH THE INSTALLATION OF THE SOFTWARE. BY AGREEING TO THESE TERMS YOU ARE GRANTING US PERMISSION TO PROVIDE RECOMMENDATIONS OF THIRD PARTY SOFTWARE IN ACCORDANCE WITH THE FOLLOWING TERMS AND THE TERMS OF OUR PRIVACY POLICY. 1. What We Do The developer of the software ("Software") you are installing has chosen to use the OpenCandy Network ("We") to provide recommendations of other third party software. All third party software participating in the OpenCandy Network must adhere to strict policies that ensure only compliant software is recommended. In the event an OpenCandy recommendation is shown, the recommendations will only occur once during the installation of the Software. 2. How Our Recommendations Work As part of the installation process, a temporary file transmits anonymous, non-personally identifiable information about your computer system in order to help us determine what third party software would be appropriate to recommend. If a recommendation is shown and you choose to install such recommended third party software, then the third party software will be downloaded and installed. If a recommendation is not shown, or you choose not to install such recommended third party software, then no third party software will be downloaded or installed. Reasonable efforts are made to ensure any temporary files created are automatically removed after the installation process is completed, regardless of whether a recommendation is made, and regardless of whether you choose to install any software. Please note, however, that some files may not be able to remove themselves until the next system restart. 3. Recommended Third Party Software You are NEVER required to install any recommended third party software, and you will not be required to install any third party software as a condition to install the Software. We will never install any third party software without your express consent. Recommended third party software is also subject to its own separate license agreement(s). 4. How We Use Your Data We are strong advocates for consumer privacy, and we do NOT collect or store any personally identifiable information. Any information transmitted to our servers is anonymous and may be stored in the aggregate to help us improve our services. All information is collected and used in accordance with our Privacy Policy, available at: http://www.opencandy.com/privacy-policy. 5. DISCLAIMER; LIMITATION OF LIABILITY WE PROVIDE ALL RECOMMENDATIONS OR THIRD PARTY SOFTWARE "AS IS," "WITH ALL FAULTS," AND WITHOUT ANY WARRANTY WHATSOEVER, AND DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR ANY PARTICULAR PURPOSE, TITLE OR NON-INFRINGEMENT. WE ARE NOT LIABLE TO YOU OR ANY OTHER PERSON FOR ANY INCIDENTAL, CONSEQUENTIAL, SPECIAL, DIRECT, INDIRECT, PUNITIVE OR EXEMPLARY DAMAGES IN CONNECTION WITH ANY RECOMMENDATION OR THIRD PARTY SOFTWARE. 6. Miscellaneous These Terms are governed by and interpreted, construed and enforced in accordance with the laws of the State of California, United States of America, without respect to its choice of law provisions. Any action is subject to the exclusive jurisdiction of the state or federal courts in California, and you irrevocably submit to the personal jurisdiction in such courts. 7. Third Party Software Uninstallation We ensure that all OpenCandy recommended third party software which may be installed allows for simple uninstallation without harming your computer, and without leaving files or applications behind. I &accept the agreement I &do not accept the agreement Welcome to the DriverMax Setup Wizard This will install DriverMax 7 on your computer. It is recommended that you close all other applications before continuing. Click Next to continue, or Cancel to exit Setup. I'd like to know how I can select the button. Thanks, Docfxit Edited June 23, 2014 by Docfxit Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted June 23, 2014 Moderators Share Posted June 23, 2014 Personally, I consider that software to be one step above malware, but if you are going to install it via script why not use the command line parameters instead of trying to automate the GUI? If you do drivermax.exe /? you'll see it supports a whole host of command line switches to do a silent install. "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
Docfxit Posted June 23, 2014 Author Share Posted June 23, 2014 Thanks for the reply... When the software is installed with the default settings it installed something called Search Project which I consider malware. I don't want to install that software. I tried all the command line parameters and non of them seem to disable the install of Search Project software. It would be nice if it did. So I'm still looking for a way to select the option NOT to install Search Project. Thank you, Docfxit Link to comment Share on other sites More sharing options...
Zedna Posted June 23, 2014 Share Posted June 23, 2014 (edited) If it's standard checkbox then use function ControlCommand() with command "Check". If it's not standard checkbox then find what WM_COMMAND message it use and send that WM_COMMAND to that window by function _SendMessage(). See here for details: Edited June 23, 2014 by Zedna Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
Docfxit Posted June 23, 2014 Author Share Posted June 23, 2014 Thanks for the suggestion. I found and installed WinSpector ver. 1.0b build 37 How can I "Use WinSpector to observe what WM_COMMAND is generated by your button." ? Thank you, Docfxit Link to comment Share on other sites More sharing options...
Docfxit Posted June 25, 2014 Author Share Posted June 25, 2014 WinSpector isn't working for me. Either I don't have the latest version or I don't know how to use it. Could someone else please suggest another solution? Thank you, Docfxit Link to comment Share on other sites More sharing options...
Docfxit Posted June 25, 2014 Author Share Posted June 25, 2014 (edited) I'm getting myself in trouble because I don't know what I'm doing. I added: ; This will show the info in an IE window... Local $sHTML = _IEBodyReadHTML($oIE) $sHTML = $sHTML & "<p><font color=red size=+5>Big RED text!</font>" _IEBodyWriteHTML($oIE, $sHTML) If @error Then MsgBox(0,'Error - ' & @error, @extended) MsgBox(0, "$sHTML", $sHTML) Local $sHTML = _IEBodyReadHTML($oIE) $sHTML = StringReplace($sHTML, "Choose this option if you purchased the product ", "<FONT color=red>Choose this option if you purchased the product </FONT>") _IEBodyWriteHTML($oIE, $sHTML) Hoping the code would show me what to select. I can't get the code working. I'm getting an error: ==> Variable used without being declared On this line: Local $sHTML = _IEBodyReadHTML($oIE) I don't understand why I received this error because it's in ie.au3 I do have #include <IE.au3> at the beginning of my script. So I added; _IEErrorHandlerRegister() To the top of my script And this to the bottom of my script: Func _IEErrorHandlerRegister($s_functionName = "__IEInternalErrorHandler") $sIEUserErrorHandler = $s_functionName $oIEErrorHandler = "" $oIEErrorHandler = ObjEvent("AutoIt.Error", $s_functionName) If IsObj($oIEErrorHandler) Then Return SetError($_IEStatus_Success, 0, 1) Else __IEErrorNotify("Error", "_IEPropertySet", "$_IEStatus_GeneralError", _ "Error Handler Not Registered - Check existance of error function") Return SetError($_IEStatus_GeneralError, 1, 0) EndIf EndFunc ;==>_IEErrorHandlerRegister Now I'm getting: ==> Unknown function name. On this line: __IEErrorNotify("Error", "_IEPropertySet", "$_IEStatus_GeneralError", _ "Error Handler Not Registered - Check existance of error function") I don't know where to find __IEErrorNotify And I don't know if I'm going in the right direction. Any help would be appreciated. Thank you, Docfxit Edited June 25, 2014 by Docfxit Link to comment Share on other sites More sharing options...
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