让我的.wsf看不见

时间:2016-02-18 06:46:12

标签: windows cmd telnet qnx

这是我的代码

<job>
<script language="VBScript">
Option Explicit
On Error Resume Next
Dim WshShell
set WshShell=CreateObject("WScript.Shell")
WshShell.run "cmd.exe"
WScript.Sleep 50
'Send commands to the window as needed - IP and commands need to be customized
'Step 1 - Telnet to remote IP'
WshShell.SendKeys "telnet 192.168.0.1 23"
WshShell.SendKeys ("{Enter}")
WScript.Sleep 50
WshShell.SendKeys ("root{Enter}")
WScript.Sleep 50
WshShell.SendKeys ("testpassword{Enter}")
WScript.Sleep 50
WshShell.SendKeys ("cd /work/Tools{Enter}")
WScript.Sleep 50
WshShell.SendKeys ("control_videosignal.sh -fbas 1{Enter}")
WScript.Sleep 50
WshShell.SendKeys ("exit{Enter}")
WScript.Sleep 50
WshShell.SendKeys ("exit{Enter}")
WScript.Sleep 50
WScript.Quit 
</script>
</job>

我希望Cmd窗口在后台,在运行时不可见,并且要杀死cmd窗口。

我需要的是。

1。使其隐藏或在后台

2。在脚本完成时关闭Cmd窗口。

客户端是QNX设备,我正在运行Windows 7企业版。

0 个答案:

没有答案