0

I have an MSI installer that won't start silently due to a EULA. How can I make a batch file that presses space bar and then return when the EULA pops up to tick the box and start installation?

I tried to make a bat in python pyautogui but can't make it work on the installer window specifically.

Basically

Import pyautogui
Pyautogui.press("space")
Pyautogui.press("enter")
ChrisMM
  • 8,448
  • 13
  • 29
  • 48
  • 1
    You should try to find out which options are available for your specific installer. [This duplicate question](https://stackoverflow.com/q/2366480), answers how you can do that. Once you've found the option for accepting the EULA in an automated manner, you will not need to bypass it by sending key presses. – Compo Feb 25 '20 at 16:55

1 Answers1

1

Would it not be better to install the MSI silently, that way it shouldn't prompt for a key press.

msiexec /i c:\location\payload.msi /quiet /qn
Buzby
  • 345
  • 1
  • 11
  • 1
    There are cases where bypassing the EULA is a violation of said EULA, thus a violation of your license to install or use the product. Don't be too cavalier about this sort of thing. – jwdonahue Feb 25 '20 at 22:22
  • @jwdonahue Very true. It's something to use when deploying across multiple PCs, but you always should do one manually first to look for any issues and warnings it throws up. – Buzby Feb 26 '20 at 07:50
  • Silent install won't work. Is it because it's an exe in an Msi wrapper? I just can't get any kind of silent install which is why I tried to make a bat file. My goal is to deploy the software on 40 machines by gpo – Joanna Jang Feb 26 '20 at 14:10
  • There may be options depending on the type of installer (eg InstallShield).Is there any way to get the msi from the company that created it? Some may have other options to download from their website. Another alternative is to extract the msi from the exe. It does come with warnings though. https://www.codetwo.com/kb/msi-from-exe/ – Buzby Feb 27 '20 at 07:54