It is best to configure auto-logon and put, for example, TightVNC. He saves the active desktop, even if switched off. The choice of the library/language depends on the GUI framework on which the application is made. If it's native application (MFC, WTL) and love Python, you can use
pywinauto (you can even stack some action to do ie and zamochennoy Windows, but need to know what). If this is WPF or WinForms for them in pywinauto is backend="uia" (technology MS UI Automation under the hood).