Hey guyz. I'm trying to make something like insert automticly throught my program in VB6 to do a CMD script.
Thing is, I'm really noob, and i dunno how to save values.
Option Explicit
Private Sub Command1_Click()
Dim Username As String
Username = Text1.Text
End Sub
Private Sub Command2_Click()
Dim Password As String
Password = Text2.Text
End Sub
Private Sub Command3_Click()
Dim PCAddress As String
PCAddress = Text3.Text
End Sub
Private Sub Command4_Click()
Shell ("cmd.exe /k telnet 192.168.1.254")
Timeropentimer.Enabled = True
End Sub
Private Sub Timer1_Timer()
Shell ("cmd.exe /k" & "Username")
Timer2.Enabled = True
Me.Enabled = False
End Sub
Private Sub Timer2_Timer()
Shell ("cmd.exe /k" & "Password")
Timer3.Enabled = True
Me.Enabled = False
End Sub
Private Sub Timer3_Timer()
Shell ("cmd.exe /k wireless macacl add ssid_id=0 hwaddr= "PCAddress" permission=allow name=Test)
Timer4.Enabled = True
Me.Enabled = False
End Sub
Private Sub Timer4_Timer()
Shell ("cmd.exe /k saveall")
Me.Enabled = False
End Sub
Private Sub Timeropentimer_Timer()
Timer1.Enabled = True
Timeropentimer.Enabled = False
End Sub
1) How to make him execute the commands in the same cmd? How to make him react to the strings? How to make timers work properly?
Here are the prints:
First non-needed string command
http://localhostr.com/files/d2407b/telnet.PNG
Need Username string
http://localhostr.com/files/dc45fd/Admin.PNG
Need password string
http://localhostr.com/files/4eefb6/pwd.PNG
Need mac adress string
http://localhostr.com/files/99f090/permis.PNG
