send strings to NT console or DOD prompt

How can I send a string (to run some console app) through VB?
edvedAsked:
Who is Participating?
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.

edvedAuthor Commented:
Sorry, I cut my question a bit short. To clarify: I want send a string to the DOS prompt as if I were typing it in the standard way. Specifically, I am trying to use the "Net Send" feature but need to hard code this to a particular user or machine on the LAN.
0
mcriderCommented:
Once a VB app is started, microsoft disconnects it from the console, and you no longer have access to it.

You can run a command several ways...

Using the shell statement, you will open a new console window:

   Shell "command",vbNormalFocus

If you want to execute a command in an existing console window, you can do this:

   AppActivate "console window title"
   SendKeys "command~"



Cheers!


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
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.