Chris55728 Posted October 1, 2005 Posted October 1, 2005 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
/dev/null Posted October 1, 2005 Posted October 1, 2005 $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}")CheersKurt __________________________________________________________(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 *
Chris55728 Posted October 1, 2005 Author Posted October 1, 2005 Kurt, Tried that and it works like a dream...simple really! Cheers Chris
Valuater Posted October 1, 2005 Posted October 1, 2005 just an idea....but you might want to add this FileSelectFolder ( "dialog text", "root dir" [, flag [, "initial dir"]] ) 8)
jefhal Posted October 1, 2005 Posted October 1, 2005 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
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