Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tasklist /fo CSV | findstr RDP returns nothing #1376

Open
322029 opened this issue Feb 11, 2024 · 0 comments
Open

tasklist /fo CSV | findstr RDP returns nothing #1376

322029 opened this issue Feb 11, 2024 · 0 comments

Comments

@322029
Copy link

322029 commented Feb 11, 2024

I tried to reproduce what you illustrate here: Remote Execution Guide and find_elements found nothing (remotely from Ansible, using WinRM) #401
Probably, I do not understand remote desktop well, so failed to obtain RDP process ID by $session = tasklist /fo CSV | findstr RDP ; $session = $session.Split(",")[3] ; $session.Split('"')[1]. tasklist did not include the session whose name is RDP.
Below is what I did.

Steps to Reproduce the Problem

  1. 'Enable Remote Desktop' in Windows setting, or Enable-PSRemoting in PowerShell
  2. psexec -u [user name] -p [password] \\192.168.xx test.bat (test.bat contains python my_script.py)

As for the second step, is it different from psexec -s -i [process ID] test.bat?

Short Example of Code to Demonstrate the Problem

dlg.Edit.click_input(), and dlg.Edit.type_keys() returns error.
The error messages are pywintypes.error: (5, 'SetCursorPos', 'access denied') or RuntimeError: SendInput() inserted only 0 out of 2 keyboard events.

I would really appreciate it if you would tell me the steps to introduce RDP.

Specifications

  • Pywinauto version:0.6.8
  • Python version and bitness:3.9.13, 64-bit
  • Platform and OS: Windows 10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant