EddieR Posted January 3, 2018 Share Posted January 3, 2018 I am trying to use AutoIt to automate some program installations from software vendors who refuse to provide MSI files and who also refuse to get into the 21st century with installers that have switches that allowed automated installs. I would prefer to have the installers work without the employee having the chance of interfering. (Unlikely given how fast it executes with the ControlClick calls I am using.) So I can launch Notepad either minimized or hidden without any issue, but when I launch the setup.exe program it still comes up in the foreground. Is there an option I am overlooking or just unlucky. Run("notepad.exe", "", @SW_MINIMIZE ) ; works Run("notepad.exe", "", @SW_HIDE ) ; works Run("setup.exe", "", @SW_MINIMIZE ) ; does not work...program launches, but in the foreground Run("setup.exe", "", @SW_HIDE ) ; does not work...program launches, but in the foreground Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted January 4, 2018 Moderators Share Posted January 4, 2018 @EddieR welcome to the forum. We have a number of people on the forum with experience repackaging and automating deployments of applications (some of us longer than we can remember). If you can share the application, we can probably do more to assist. With nothing more than "Setup.exe", though, it is a bit difficult. Earthshine 1 "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...
benched42 Posted January 4, 2018 Share Posted January 4, 2018 It all depends upon how the "Setup.exe" was created. Was it created using the Wise installer? Inno Setup? NSIS setup? Once you know this you can easily set the proper command line switches to make the program install silently. The software itself likely has documentation on how to do this. In my experience, the macros within AutoIt seldom work when running another programs installation package. Earthshine 1 Who lied and told you life would EVER be fair? Link to comment Share on other sites More sharing options...
youtuber Posted January 4, 2018 Share Posted January 4, 2018 He probably wants something like this ShellExecuteWait(@ScriptDir & "\setup.exe", "/quiet") or ShellExecuteWait(@ScriptDir & "\setup.exe", "/q") or ShellExecuteWait(@ScriptDir & "\setup.exe", "/S") Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted January 4, 2018 Moderators Share Posted January 4, 2018 @youtuber if you read the OP he states very clearly that it is resistant to silent installs with parameters... Earthshine 1 "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...
jguinch Posted January 5, 2018 Share Posted January 5, 2018 Unlikely given how fast it executes with the ControlClick calls I am using I'm not sure you can use ControlClick if the window is minimized or hidden, I think the window must me visible. One way is to use that kind of method : Run("setup.exe") Local $hSetupWindow = WinWait("title of the installation window") WinSetTrans($hSetupWindow, 1) ControlClick(....) Earthshine 1 Spoiler Network configuration UDF, _DirGetSizeByExtension, _UninstallList Firefox ConfigurationArray multi-dimensions, Printer Management UDF Link to comment Share on other sites More sharing options...
benners Posted January 5, 2018 Share Posted January 5, 2018 Methods I have tried\used in the past are: Disable mouse and keyboard using BlockInput Move the window off the desktop area so it can't be seen. Obviously there can be issues with unexpected prompts which you can't see, thus pausing the setup. Another is to repackage the installer, if it isn't a big one with tons of reg entries. Some are pretty simple I have tried to minimise installers or hide windows, but some have spawned another process during install that showed a window anyway. Earthshine 1 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