Private Sub Command1_Click()
Dim RetVal
RetVal = Shell("cmd.exe", 1) ' Run Command window.
SendKeys "telnet ip{ENTER}" ' For pinging ip
SendKeys "login id{ENTER}" ' send login
SendKeys "password{ENTER}" ' send password
End Sub
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

Hi Friends,
this is my simple program for pinging to my system and then i want to enter in my system by giving my LOGIN and PASSWORD, but its not working, not giving any error but not take sendkeys every time and also working randomly at times..Pls. debug this or give me another idea to do so..

Actually i have observe that sendkeys do not working properly with cmd.exe otherwise its working fine with other applications.

Thnx.....

Hehe I'll try this, but I think you need to debug your English a bit first... Pls. deubg??? What does that mean?

O.K. Mr. i'll do that.....

But main thing is pls. debug this program.

Actually the problem is output of this program is very random like most of the times it opens more than one cmd.exe windows instead of one window and many times all the keys which i have send through sendkeys command were not going to cmd.exe window so i am not able to get my desired output.

anybody has any suggestion...pls....

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.