英文:
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.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论