Is this possible?

Posted on 2006-04-14
Last Modified: 2010-04-23

I don't need to know how to do this, just if it is possible.  

This is what I would like to do:
Using VB.NET or C#.NET I would like to create a program that opens a Telnet session program that is already on the machine.  From there it will type keys that I will pre-set.  Then I want this program to execute a dts package, this can be done from a command prompt.  

Thanks a lot for your time.  The answer to this question is needed urgently.
Question by:jjrr007
    1 Comment
    LVL 85

    Accepted Solution

    Yes, it should be possible...

    Use Process.Start() to open the Telnet program and the command prompt application.

    Then use SendKeys.Send() to send the keys.
    You may need Win APIs such as keybd_event() to make it work properly though.
    Or even PostMessage() to send input directly to a control in the target app.

    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

    The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (…
    It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
    Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    731 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

    18 Experts available now in Live!

    Get 1:1 Help Now