Gui automation with key presses batch file?

141 Views Asked by At

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")
1

There are 1 best solutions below

4
Buzby On

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