edwick Posted September 20, 2016 Share Posted September 20, 2016 I have a slightly odd, un-Google-able question on how to use AutoIt to install AutoIt. Background: we're setting up Windows Server 2012 virtual machines using Cloudify and want to have AutoIt in our toolbox to automate installing software packages that don't support a command-line/unattended install process. We can use Cloudify's script plugin to execute a PowerShell script, which can execute anything in a known location. Cloudify does not seem to support running an arbitrary .exe on a Windows machine directly. Someone at some point uploaded the AutoIt3 .exe to our software repos, so I can get it to a known location on our VMs during setup. The problem is that it's a software package that doesn't support a command-line/unattended install process. Trying to Google for "automating AutoIt install" turns up lots and lots of useful tutorials on writing AutoIt scripts to automate installers, but if there is anything in there about automating AutoIt's install itself it's getting drowned out in the false positives. Writing the AutoIt script to install AutoIt isn't the problem -- its button clicks look like they can be automated as well as anything else. The problem is how exactly to get that script to run if I'm using it to install AutoIt. The three alternatives I can think of: 1. Upload the AutoIt3 .zip file to our repos and use that instead, and just copy the AutoIt3.exe to somewhere in the PATH. Then any subsequent VM setup steps can use it to run .au3 scripts directly. 2. Same as alternative 1, but run the .exe against an .au3 script that automates the AutoIt install. 3. Compile the AutoIt script to an .exe (possibly including the AutoIt3 installer .exe), upload the .exe to our software repo, and then download/execute that big .exe from PowerShell. #1 is probably the easiest solution as long as the installer doesn't do any Windows Voodoo that will make running the .exe challenging; it also makes it relatively simple for others to add to new VM setups. It doesn't LOOK like there would be an issue with that, but I'd want to be sure. #2 is OK, but I'm not fond of the idea of installing the same .exe twice. #3 is probably the most self-contained solution and the least kludge-y, but it feels like there should be a more efficient way to do that. All 3 have the problem of process-related drag caused by getting something new uploaded to the repos, but I don't think there's any way around that. I tried some Windows Installer Ninja tricks to automate an executable installer, but none of them seemed to work on the AutoIt3 installer. So, is there a preferred "AutoIt"-y way to do this? Is there some command line switchery that will let me just run the installer .exe in an unattended mode? Or an alternative I'm not seeing? Or, if you happen to speak both Cloudify and AutoIt, a different way to accomplish installing AutoIt on a new VM? Link to comment Share on other sites More sharing options...
BrewManNH Posted September 20, 2016 Share Posted September 20, 2016 I use AutoIt on a thumb drive all the time, no need to install it if you don't want to. If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way! I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from. Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays. - ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script. - Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label. - _FileGetProperty - Retrieve the properties of a file - SciTE Toolbar - A toolbar demo for use with the SciTE editor - GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI. - Latin Square password generator Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted September 20, 2016 Moderators Share Posted September 20, 2016 What about packaging AutoIt to an MSI and then using the PS script to deploy that silently? That is what I typically do in a enterprise environment. "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
AdamUL Posted September 20, 2016 Share Posted September 20, 2016 Use "/S" to silently install AutoIt. The switch is case sensitive. The installer was created with NSIS (Nullsoft scriptable install system). Here are the command line switches. Adam Link to comment Share on other sites More sharing options...
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