Results 1 to 4 of 4

Thread: Run another exe and it's command?

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jul 2004
    Location
    cali
    Posts
    243

    Run another exe and it's command?

    How can I create another program from the primary/main program.
    Like press a button and write/export an already compiled exe stored in a resource file or something. Or some other way of doing it.

    Then run that .exe and use it's commands?
    Like use the first program to tell the second program to pop up a message box?

    ......

  2. #2
    "Digital Revolution"
    Join Date
    Mar 2005
    Posts
    4,471

    Re: Run another exe and it's command?

    You mean like this ?

  3. #3
    VB Addict Pradeep1210's Avatar
    Join Date
    Apr 2004
    Location
    Inside the CPU...
    Posts
    6,614

    Re: Run another exe and it's command?

    Check the ShellExecute API function. This API can be used to run another exe with various options.

    Pradeep
    Pradeep, Microsoft MVP (Visual Basic)
    Please appreciate posts that have helped you by clicking icon on the left of the post.
    "A problem well stated is a problem half solved." — Charles F. Kettering

    Read articles on My Blog101 LINQ SamplesJSON ValidatorXML Schema Validator"How Do I" videos on MSDNVB.NET and C# ComparisonGood Coding PracticesVBForums Reputation SaverString EnumSuper Simple Tetris Game


    (2010-2013)
    NB: I do not answer coding questions via PM. If you want my help, then make a post and PM me it's link. If I can help, trust me I will...

  4. #4

    Thread Starter
    Addicted Member
    Join Date
    Jul 2004
    Location
    cali
    Posts
    243

    Re: Run another exe and it's command?

    Thanks. I think that's what I need.


    How do I use the ShellExecute API? All I found was how to run a webbrowser (mostly).
    How do I use ShellExecute with a program that I've made?
    Like do what's in Command1_Click()?

    And would that execute the program each time I do it?
    I only want to run it once, then command/use it.
    ......

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width