Sign in to follow this  
Followers 0
lakerguy5

Is this Possible

16 posts in this topic

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

Share this post


Link to post
Share on other sites



#2 ·  Posted (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 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]

Share this post


Link to post
Share on other sites

It is possible depending on the installer used. AutoIt has the builtin capabilties for general automation.

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

how do i take the data inputted at the begining and have it inserted when needed?

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

$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

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

#10 ·  Posted (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 by MHz

Share this post


Link to post
Share on other sites

why would you run notepa after typing in the serial

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

i am kinda confused on the controls, i am just curious as to why it won't input the data, what am i missing?

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
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
Sign in to follow this  
Followers 0