Solved

shell command.com

Posted on 2003-10-24
10
858 Views
Last Modified: 2010-05-01
I have this under a command button in Access

Private Sub Command100_Click()
Shell ("Command.com")
End Sub

I would like to to open DOS then start telnet and input the login and password.
Is this possible. If not the login and password at least start telnet.

Thanks in advance.
0
Comment
Question by:cmcgregor
  • 5
  • 4
10 Comments
 
LVL 8

Expert Comment

by:dds110
ID: 9617119

Shell Environ$("COMSPEC")

will start Dos.  You'll have to pass the parameters to it for telnet.  I use this line for Net Send

Shell Environ$("COMSPEC") & " /c  NET SEND " & Me.lstUsers & " " & strMsg, 0

Hope this helps

0
 
LVL 18

Expert Comment

by:bobbit31
ID: 9617135
Shell "telnet -l <userName> <host>", vbNormalFocus

and if that doesn't work... to simply start telnet

Shell "telnet", vbNormalFocus

should work... at least it does on my machine (win xp pro)
0
 

Author Comment

by:cmcgregor
ID: 9617200
bobbit31 where do i put the password?
0
 

Author Comment

by:cmcgregor
ID: 9617208
shouldnt it be host, user, password since that is the order it asks you?
0
 
LVL 18

Expert Comment

by:bobbit31
ID: 9617217
go to command prompt and type:

telnet /?

it will give you the options (i don't know if you can pass password)
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

Author Comment

by:cmcgregor
ID: 9617257
I put

Shell "telnet -l <128.135.1.32>", vbNormalFocus

but it open dos puts a -l and then closes the dos window. Is this right?
0
 
LVL 18

Expert Comment

by:bobbit31
ID: 9617288
no, just try:

Shell "telnet 128.135.1.32"
0
 

Author Comment

by:cmcgregor
ID: 9617311
that works but the window is minimized. Any way to make it so it is open on the desktop?
0
 
LVL 18

Accepted Solution

by:
bobbit31 earned 25 total points
ID: 9617319
oops,

Shell "telnet 128.135.1.32", vbNormalFocus
0
 

Author Comment

by:cmcgregor
ID: 9617329
Great thanks for your help
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
DO Loop not working 4 72
Excel VBA combine two working workbooks 8 46
Convert VB6 MSXML2.ServerXMLHTTP process to C# 2 41
VB6 - Convert HH:MM into Decimal 8 51
There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now