问题
Is it possible to get access to a GUI on a remote machine using PowerShell with for example WinRM?
I have an application which uses UI Automation framework to examine some GUI. This application should be run remotely on some machine.
Right now I am able to run application remotely but I can't see any UI elements (which is quite obvious).
What's the best approach for this.
回答1:
As far as I understand begining in Vista Microsoft block acces to the interactive desktop from a service. To make working on Seven, my services which were interacting with the user desktop in XP, I create a process working on the user Desktop that relay the service interaction. How can a Windows service execute a GUI application explain some other solution, but I'am not sure that they are working on Seven/2008R2.
PS : according to about_Remote_Troubleshooting Some native Windows programs, such as programs with a user interface, console applications that prompt for input, and console applications that use the Win32 console API, do not work correctly in the Windows PowerShell remote host.
来源:https://stackoverflow.com/questions/8343715/access-to-gui-on-remote-machine-using-powershell-and-winrm