在远程协助中输入文本

huangapple go评论59阅读模式
英文:

Type out text over Remote Assistance

问题

I am trying to type out a String over Windows Remote Assistance, but my PowerShell Script doesn't work.

It works in the normal editor and Teams Remote Control.

$text = "HI"
$wshell = New-Object -ComObject wscript.shell;

$wshell.SendKeys($text)

Does Remote Assistance block something like this for security reasons or is there just a better way?

It doesn't have to be in PowerShell, by the way. I also wrote a script with Python which had the same problem.

Thank you for your answers.

英文:

I am trying to type out a String over Windows Remoteassistanse, but my PowerShell Script doesn't work.

It works in the normal editor and Teams Remotecontrol.

$text = "HI"
$wshell = New-Object -ComObject wscript.shell;

$wshell.SendKeys($text)

Does Remote Assinstance block something like this for security reasons or is there just a better way?

It doesn't have to be in PowerShell by the way I also wrote the a script with Python which had the same problem.

Thank you for your answers

答案1

得分: 0

我找到了解决方法!

脚本没有运行是因为它无法访问窗口。
将脚本以管理员身份运行解决了我的问题。

英文:

I have found the solution!

The script didn't run because it couldn't access the window.
Running the script as administrator fixed the issue for me.

huangapple
  • 本文由 发表于 2023年5月22日 21:03:11
  • 转载请务必保留本文链接:https://go.coder-hub.com/76306495.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定