| || |
close CMD window after done wiht WScript.Shell
This line opens the DOS looking cmd window.
set WshShell = WScript.CreateObject("WScript.Shell")
Then I do commands in the CMD window.
How do I close the CMD window when I don't need it any more?
Set WshShell = Nothing
I looked at the intellisence and do not see anything to close the window.
Kevin I think there is a param you can add to the shell.run stmt to close the window after use.
All I could find on my QTp memory stick is the following command to run Plink. I think it's the Exit or True command that closes the window:
shell.run "cmd /k CD"&Chr(32)&PlinkPath&Chr(32)&Chr(38)&Chr(32)&"pli nk.exe -v"&Chr(32)&ServerName&Chr(32)&" -l"&Chr(32)&UserName&Chr(32)&_
"-pw"&Chr(32)&Password&Chr(32)&" -ssh"&Chr(32)&CommandLine&Chr(32)&Chr(38)&"Exit",0, true