Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hiden CMD Windows

Status
Not open for further replies.

ajtsystems

IS-IT--Management
Jan 15, 2009
80
GB
Hi,

I need to run a cmd invisible using VBScript, here is my code so far:

ipaddress ="212.58.228.30"
Set WshShell = WScript.CreateObject("WScript.Shell")

wshShell.run("telnet " & IPAddress & " 21"),1
WScript.Sleep 500
WshShell.AppActivate "telnet"
WScript.Sleep 500
wshShell.SendKeys "user username"
WScript.Sleep 500
wshShell.SendKeys "{Enter}"
wshShell.SendKeys "pass password"
wshShell.SendKeys "{Enter}"

I am using wshell.run as it can run hidden with ,1: wshShell.run("telnet " & IPAddress & " 21"),1.

The problem I have is that wshshell.appactive "telnet" requires wshShell.exec("telnet " & IPAddress & " 21") but cannot run invisible\hidden.

Can anyone see a way to run telnet in a hidden window for seurity reasons I cannot run it viewable...and I cant find anything in CMD help for it...?

Thanks
Any help really appreciated...
James
 
I have not used this product but it would seem by description that it would help you.




I hope that helps.

Regards,

Mark

Check out my scripting solutions at
Work SMARTER not HARDER. The Spider's Parlor's Admin Script Pack is a collection of Administrative scripts designed to make IT Administration easier! Save time, get more work done, get the Admin Script Pack.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top