Hello @Saeed Fazlollahzadeh ,
Welcome to Microsoft Q&A!
Here is a workaround, replace the current session with the console
.
- Execute
query session
to view the currently logged in session. - Execute
tscon rdp-tcp#0 /dest:console
.
rdp-tcp#0
is your RDP session.
After the two commands are executed, you will be disconnected, but the keyboard and mouse will work normally. In my test, SetCursorPos
returns Ture
normally.
Thank you.
Junjie
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.