0

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.....

2
Contributors
3
Replies
5
Views
10 Years
Discussion Span
Last Post by chirag0310in
0

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

0

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.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.