Question: I am trying to automate an installation that starts out with an InstallShield setup.exe. That kicks off the installation of a MS Visual C++ redistributable. That leads to an error about Adobe Flash not being up to date. I have asked about how to deal with that here:

[Error during automated software install using pywinauto](https://stackoverflow.com/questions/64268631/error-during-automated-software-install-using-pywinauto)

Once I click OK for the Adobe dialog(have to use pyautogui.click() for this for now) I see that there is an .msi being extracted. I have followed the install and it puts it into a new Temp folder under my Users\AppData directory.

How do you get pywinauto to find this new application? I have tried using

```
adobe = Application().connect(title_re="MyInstaller",class_name="#32770", visible_only=True)

```

And then try to print\_control\_identifiers() but get this error:

AttributeError: Neither GUI element (wrapper) nor wrapper method 'print\_control\_identifiers' were found (typo?)

I have checked Spy++ and Inspect and AutoIT to find the class which I can. I can't use the procid as it will always change.

Any thoughts on how to attach to the .msi process so I can then connect() to it?

Edit:
Is there a way to regex pywinauto to point to a path if I know where MyProgram.msi is? It seems to be in C:\Users\me\AppData\Local\Temp{xxx}\MyProgram.msi as I found several copies there. Thanks!

Answer: 
Add `timeout=10` or whatever you need to connect() params. Current default timeout is zero, but it should be `timings.Timings.window_find_timeout` which is 5 sec by default.

Auto detection of spawned child process is planned for next major release (as well as default timeout fix).

For running an unpacked .msi file you need `msiexec` standard Windows command in method .start(). Play with it in cmd.exe manually first starting from `msiexec /?`.
Here is how I deal with the fact that InstallShield exe extracts to an .msi in (into my DownloadedInstallations folder). Yes, timeout is important, but also identifying the new msi window that opens is too. (Also, I found that wait\_for\_idle had to be FALSE but don't remember why. YMMV :) ).

```
exe = pywinauto.Application(backend="uia").start(exepath, wait_for_idle=False)

```

Now it's going to unzip the .exe into .msi installer and that could take a while, and since the .exe window might be named the same as the .msi window must be careful not to attach to the exe window too early and must wait for the .msi window to open!! So, add an appropriate timeout in seconds. The dialog window may not exist yet here, so it's CRITICAL to use class\_name of MsiDialogCloseClass especially if the title of the exe and msi are the same. This will identify the .msi window specifically, whenever it arrives.

```
title = "Enter Title of your App - InstallShield Wizard"
msi = pywinauto.Application(backend="uia").connect(title=title, 
class_name="MsiDialogCloseClass",timeout=120)

```

And for the final touch, in a line I always forget, must use the title again to get the dialog window (for reasons I don't yet understand)

```
dlg = msi[title]

```

EXTREMELY HELPFUL way to view all control identifiers at this point is:

```
print(dlg.print_control_identifiers())

```

This is what hours of trial and error yielded. To continue on, now you can click buttons, like this:

```
dlg.Next.wait("ready",timeout=2)
dlg.Next.click()

```

And to click on radio buttons, this works (there may be other ways that do, but I could never find how to get a handle on the buttons by name)

```
dlg['I &accept the terms in the License Agreement'].wait('enabled').click()

```

Then moving on

```
dlg.Next.click()
dlg.Install.wait("enabled",timeout=5)
dlg.Install.click()

```