Jump to content

Run setup.exe minimized or hidden


 Share

Recommended Posts

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

  • Moderators

@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.

"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

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.

Who lied and told you life would EVER be fair?

Link to comment
Share on other sites

  • Moderators

@youtuber if you read the OP he states very clearly that it is resistant to silent installs with parameters...

"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

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(....)

 

Link to comment
Share on other sites

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.

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...