I have a VBScript which Telnets into a Linux device and I would like to see the available memory. The following command produces an "Invalid procedure call or argument" error.
WshShell.SendKeys"df /mnt/cf | awk /mnt/{print$2} "
如果我用人工电话进入该装置,并使用同一指挥系统,该装置就可运行。 任何建议?
至今为止的法典:
Dim WshShell
Set WshShell = CreateObject("WScript.Shell")
WshShell.run"cmd"
*** open command window ***
WScript.Sleep 250 WshShell.SendKeys("{Enter}")
WshShell.SendKeys"telnet 10.13.2.2 -f VBSmemSize.txt"
WshShell.SendKeys("{Enter}")
WScript.Sleep 2000
WshShell.SendKeys"root"
WshShell.SendKeys("{Enter}")
WScript.Sleep 1500
WshShell.SendKeys"password"
WshShell.SendKeys("{Enter}")
WScript.Sleep 1500
WshShell.SendKeys"df /mnt/cf |awk /mnt/{print$2} "
WshShell.SendKeys("{Enter}")