Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

shell command.com

Posted on 2003-10-24
10
860 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
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 

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
 

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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

792 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