Sign in to follow this  
Followers 0
slaney30

Script to run an installation and answer a prompt

8 posts in this topic

Hello all. I'm new to AutoIT and have never used it before.

I just have a simple question for you all and I hope someone has a fast answer as to what I need to do.

I need to have a script run an installation with paremeters, then when the installation prompts for an answer of yes or no, I need to have AutoIT select an answer so the installation can finish.

What is the best way to accomplish this?

Share this post


Link to post
Share on other sites



 

What is the best way to accomplish this?

Learn to script ... or .....give better and detailed info on what you want to do like which installer etc ...

Jos


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

Taking a stab at it with psuedocode

I need to have a script run an installation with paremeters, then when the installation prompts for an answer of yes or no, I need to have AutoIT select an answer so the installation can finish.

 

Run("path" & "/paramaters")
$hwndWindow = WinWait ("Window Title")
ControlClick($hwndWindow, "", "YesButton")
$hwndWindow = WinWait("Other Window Title")
ControlClick($hwndWindow, "", "NoButton")

 

Basically, you want to Run a program and then wait for the prompt windows and answer accordingly.

So ... review the help file for Run, WinWait, and ControlClick


Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache

Share this post


Link to post
Share on other sites

Taking a stab at it with psuedocode

Run("path" & "/paramaters")
$hwndWindow = WinWait ("Window Title")
ControlClick($hwndWindow, "", "YesButton")
$hwndWindow = WinWait("Other Window Title")
ControlClick($hwndWindow, "", "NoButton")

Basically, you want to Run a program and then wait for the prompt windows and answer accordingly.

So ... review the help file for Run, WinWait, and ControlClick

 

I will give this a shot, this looks promising. Thanks for giving me the format of what something like that would look like. Very helpful. 

 

Learn to script ... or .....give better and detailed info on what you want to do like which installer etc ...

Jos

The installer is an Inno Setup based installer. There is a installer.exe that i run silently, then prompts at the end for a yes or no button to be clicked. There is no way to automate it from a command line switch which is why it seems AutoIT might be an option.  As for your Learn to script comment. I am not familiar with AutoIT scripting which is why I am on here to see how others who are familiar with the program would go about trying to accomplish this. Sorry for any inconvenience I caused you.

Share this post


Link to post
Share on other sites

 Sorry for any inconvenience I caused you.

You didn't, just tried to make clear we need exact info if you want us to help you. It is strange though that one would make an Inno installer with silent option and still prompt.

Load the full version of SciTE4AutoIt3 to make you life easier and use au3info Ctrl+F6 to find out what the exact information is of the window you need to handle.

That together with the provided snippet should get you started.

Success

Jos


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)


Spoiler

Paster - Main function is to paste text, but has more functions.

OpenW - Open With... alternative, Open any file with any application, set it's icon, set application as default.

Renamer - Rename files and folders, remove portions of text from the filename etc.

BeatsPlayer - Music player.

Params Tool - Right click an exe to see it's parameters or execute them.

Regedit Control - Registry browsing history, quickly jump into any saved key.

Time4Shutdown - Write the time for shutdown in minutes.

Power Profiles Tool - Set a profile as active, delete, duplicate, export and import.

Firefox Profile Backup - Backup/restore previously saved profile.

Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes.

NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s.

 

Share this post


Link to post
Share on other sites

You guys are awesome! With both of your help I was able to write a basic script to accomplish this and make the installation silent. Thanks so much!

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

I've seen this, and the /Silent and /VerySilent work for the install.exe, however inside the install.exe is a script that requires prompting that ignores those switches. Its a poorly written installation.  Thanks for the help though!

Edited by slaney30

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