如何向 VBScript 添加文字字符 @?

问题描述 投票:0回答:1

我有一个 VBScript,我希望能够在 powershell 中运行,但由于某种原因 @ 不想被打印出来。它停在“ssh root”处,然后无法继续。不要介意 x 等密码。

Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.Run "powershell.exe"
WScript.Sleep 500
WshShell.SendKeys "ssh -y -l swupdate 169.254.x.xx -o HostkeyAlgorithms=ssh-rsa"
WshShell.SendKeys "{ENTER}"
WScript.Sleep 300
WshShell.SendKeys "something"
WshShell.SendKeys "{ENTER}"
WScript.Sleep 300
WshShell.SendKeys "ssh [email protected] -y"
WshShell.SendKeys "{ENTER}"
WScript.Sleep 1500
WshShell.SendKeys "something"
WshShell.SendKeys "{ENTER}"
powershell vbscript
1个回答
0
投票

@
括在
{}
中:

WshShell.SendKeys "ssh root{@}198.19.x.x -y"
© www.soinside.com 2019 - 2024. All rights reserved.