Solved

shell command.com

Posted on 2003-10-24
10
857 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
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 

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

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
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…

760 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