lakerguy5 Posted November 11, 2005 Share Posted November 11, 2005 i really need a way to automate the installation of 2 programs but both of the require a password, is there a way to run a script and have it ask for the password for each program upfront in a gui and insert them automatically when it comes to that part of the installation? i am a newbie to autoit and hope that you all can lend me a hand. thanks in advance Link to comment Share on other sites More sharing options...
SpookMeister Posted November 11, 2005 Share Posted November 11, 2005 (edited) Getting the passwords is the easy part. $pass1=InputBox("Password","Enter a password for program 1","","*") $pass2=InputBox("Password","Enter a password for program 2","","*") Making the rest of the installations work propperly is the tougher part. The help file has some great examples.. look for the part about installing WinZip it will show you the basic ideas. Edited November 11, 2005 by SpookMeister [u]Helpful tips:[/u]If you want better answers to your questions, take the time to reproduce your issue in a small "stand alone" example script whenever possible. Also, make sure you tell us 1) what you tried, 2) what you expected to happen, and 3) what happened instead.[u]Useful links:[/u]BrettF's update to LxP's "How to AutoIt" pdfValuater's Autoit 1-2-3 Download page for the latest versions of Autoit and SciTE[quote]<glyph> For example - if you came in here asking "how do I use a jackhammer" we might ask "why do you need to use a jackhammer"<glyph> If the answer to the latter question is "to knock my grandmother's head off to let out the evil spirits that gave her cancer", then maybe the problem is actually unrelated to jackhammers[/quote] Link to comment Share on other sites More sharing options...
MHz Posted November 11, 2005 Share Posted November 11, 2005 It is possible depending on the installer used. AutoIt has the builtin capabilties for general automation. Link to comment Share on other sites More sharing options...
lakerguy5 Posted November 11, 2005 Author Share Posted November 11, 2005 one of the programs is norton antivirus, after i get the password and start the install how can i have it auto insert the password and continue with the install? Link to comment Share on other sites More sharing options...
MHz Posted November 11, 2005 Share Posted November 11, 2005 Use WinWait() to wait for the window then use ControlSetText() or ControlSend() to insert your password into the windows edit controls. Use Au3Info to get the ClassnamesNN of the controls for creating the script.. Link to comment Share on other sites More sharing options...
lakerguy5 Posted November 11, 2005 Author Share Posted November 11, 2005 how do i take the data inputted at the begining and have it inserted when needed? Link to comment Share on other sites More sharing options...
Gene Posted November 11, 2005 Share Posted November 11, 2005 how do i take the data inputted at the begining and have it inserted when needed?You need to read or reread the Help file references for the suggestions you have already received. [font="Verdana"]Thanks for the response.Gene[/font]Yes, I know the punctuation is not right... Link to comment Share on other sites More sharing options...
lakerguy5 Posted November 11, 2005 Author Share Posted November 11, 2005 $pass1=InputBox("Password","Enter a password for program 1","","*") $pass2=InputBox("Password","Enter a password for program 2","","*") i have used this. the automation works up until it asks for the password that was typed in at the beginning of the script. i have read the help file numerous times and have been searching the forum for the better part of 4 hours and still cant get it to input the data Link to comment Share on other sites More sharing options...
lakerguy5 Posted November 11, 2005 Author Share Posted November 11, 2005 i am using $serial1=InputBox("Serial","Enter Serial for Norton Antivirus","","*") and then using Send($serial1) but still nothing can anyone think of what i could be doing wrong? Link to comment Share on other sites More sharing options...
MHz Posted November 11, 2005 Share Posted November 11, 2005 (edited) I have automated Norton before and was possible to do the serial. Here is a sample to show how the exchange of information happens. $result = InputBox('Enter Serial', 'XXXX-XXXX-XXXX-XXXX') Run('notepad') WinWait('Untitled') ControlSend('Untitled', '', 'Edit1', $result) If the controls are hidden then you may need to use Send(), and the window would need to be active with Send(). Edited November 11, 2005 by MHz Link to comment Share on other sites More sharing options...
lakerguy5 Posted November 11, 2005 Author Share Posted November 11, 2005 why would you run notepa after typing in the serial Link to comment Share on other sites More sharing options...
MHz Posted November 11, 2005 Share Posted November 11, 2005 It is a sample. I do not use Nortons AV now and do not have the latest version to even create a accurate solution. Notepad is a simple way to show you how I got data from the Input() to notepad. I am just showing the concept, you may need to type the script yourself to automate the registration of Nortons AV. Link to comment Share on other sites More sharing options...
lakerguy5 Posted November 11, 2005 Author Share Posted November 11, 2005 i can get the input to work using notepad and have it type in the user input but still a no go under norton. could it be something with the winwait ? i am clueless as to why it will work using notepad but not norton. Link to comment Share on other sites More sharing options...
MHz Posted November 11, 2005 Share Posted November 11, 2005 Au3Info will give you the information on the control. If the control is hidden (not from your eyes, but Au3Info says it is), then try Send(). You may have 5 or 6 edit controls and you may need to send to each separately. Link to comment Share on other sites More sharing options...
lakerguy5 Posted November 11, 2005 Author Share Posted November 11, 2005 i am kinda confused on the controls, i am just curious as to why it won't input the data, what am i missing? Link to comment Share on other sites More sharing options...
MHz Posted November 11, 2005 Share Posted November 11, 2005 Add this at the top of your script Opt('TrayIconDebug', 1) then pass your mouse over the autoIt system tray icon and see if your script is not blocked on another line. 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