shell command.com

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.
cmcgregorAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

dds110Commented:

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
bobbit31Commented:
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
cmcgregorAuthor Commented:
bobbit31 where do i put the password?
0
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

cmcgregorAuthor Commented:
shouldnt it be host, user, password since that is the order it asks you?
0
bobbit31Commented:
go to command prompt and type:

telnet /?

it will give you the options (i don't know if you can pass password)
0
cmcgregorAuthor Commented:
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
bobbit31Commented:
no, just try:

Shell "telnet 128.135.1.32"
0
cmcgregorAuthor Commented:
that works but the window is minimized. Any way to make it so it is open on the desktop?
0
bobbit31Commented:
oops,

Shell "telnet 128.135.1.32", vbNormalFocus
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
cmcgregorAuthor Commented:
Great thanks for your help
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.