Jump to content
EddieR

Run setup.exe minimized or hidden

Recommended Posts

EddieR

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

Share this post


Link to post
Share on other sites
JLogan3o13

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

  • Like 1

√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites
benched42

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.

  • Like 1

Who lied and told you life would EVER be fair?

Share this post


Link to post
Share on other sites
JLogan3o13

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

  • Like 1

√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites
jguinch

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

 

  • Like 1

Share this post


Link to post
Share on other sites
benners

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.

  • Like 1

Share this post


Link to post
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

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.