Pywinauto - Unable to connect to office documents using UIA firewall

Recently, I had an unusual problem: when I open some kind of excel / word document and try to connect to it with -

app = pywinauto.Application(backend="uia").connect(process=19812) 

This does not seem to work, which means that app.is_process_running () returns False, and the top_window () method throws a RuntimeError exception (no windows for this process).

But if I run the actual executable program (Winword.exe or Excel.exe, and not some * .xls file), it works fine and everything works fine.

I checked IAA compatibility with exam.exe on the docs and everything seems fine.

What could be the problem?

+7
python pywinauto
source share
1 answer

Running a python script with administrator privileges resolved the problem: \

+1
source share

All Articles