Solved

shell command.com

Posted on 2003-10-24
10
859 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
Does Powershell have you tied up in knots?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

 

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

Is Your AD Toolbox Looking More Like a Toybox?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Excel VBA combine two working workbooks 8 55
passing parameter in sql procedure 9 63
Run code from text file in vb 1 65
Sub or Function is not defined 6 30
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
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.
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

809 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