Jump to content

Passing user input back to an installation


Recommended Posts

Forgive this (probably obvious) noobie post but I have spent a while searching for answers to my question to no avail.

I want to use AutoIt to automate the installation of some programs that I use. Doing the basics and going with the defaults are relatively simple (I've used ScriptIt before) but what I'd like to be able to do is to interrupt the script to ask the user to either put in their preferred installation directory or a specfic serial number, etc. and then pass this back to the installation. (I can worry about error checking later)

I'm a bit confused as to how you would achieve this. Below is my very basic installation script. Obviouslt $directory is going to be a directory but I need to plug that back into install somehow.

run("D:\Applications\AutoIt3\322g_setup.exe")

winwaitactive("EnCase Version 3","&Next >")

Send("!n")

winwaitactive("License Agreement","I &Agree")

Send("!a""{TAB}""{TAB}""{ENTER}")

winwaitactive("Complete Installation","Finish")

$directory = InputBox("Select Installation Directory", "Please type in the installation directory.")

*pass back $directory to the installation so that the program installs to a new directory as defined by the user.

Send("{ENTER}")

Winwaitactive("Installation Complete","OK")

Send("{ENTER}")

winwaitactive("Reboot Windows","&No")

Send("!n")

Apologies if this has already been answered elsewhere.

Cheers in advance.

Chris

Link to comment
Share on other sites

$directory = InputBox("Select Installation Directory", "Please type in the installation directory.")

*pass back $directory to the installation so that the program installs to a new directory as defined by the user.

Send("{ENTER}")

if the application is waiting for the directory:

send($directory)
send("{ENTER}")

Cheers

Kurt

__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

Link to comment
Share on other sites

and, of course: $directory = FileSelectFolder ( "dialog text", "root dir" [, flag [, "initial dir"]] ) to pump the returned directory into your script.

...by the way, it's pronounced: "JIF"... Bob Berry --- inventor of the GIF format
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...