Jump to content

Script to run an installation and answer a prompt


Go to solution Solved by slaney30,

Recommended Posts

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?

Link to comment
Share on other sites

  • Developers

 

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

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
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

Link to comment
Share on other sites

  • Solution

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.

Link to comment
Share on other sites

  • Developers

 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

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

Spoiler

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

GPO Tool - Export/Import Group policy settings.

MirrorDir - Synchronize/Backup/Mirror Folders

BeatsPlayer - Music player.

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

String Trigger - Triggers pasting text or applications or internet links on specific strings.

Inconspicuous - Hide files in plain sight, not fully encrypted.

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.

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

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

IUIAutomation - Topic with framework and examples

Au3Record.exe

Link to comment
Share on other sites

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
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...