launching .exe in visual c++

By jlem
Jul 12, 2004
Post New Reply
  1. newbie programming question. I am trying to launch an exe in a program, anyone tell me what to use for that?
  2. MrGaribaldi

    MrGaribaldi TechSpot Ambassador Posts: 2,512

    Is it a complete program that you have compiled to a .exe?
    If so, just navigate to where the program is located with the command prompt and type in the name of the .exe and hit enter.

    you could also do it with the run prompt or explorer, but if you haven't created a GUI (or don't use any input or wait) it might close so fast you don't get to see anything.

    If you haven't got a complete program but still want to test it, I have no idea. Could be a button, or in a menu, but might also not be.

    What is the program you are trying to run?
    (Use [ code ] [ /code ] without the spaces if you're posting the source code, as it makes it much easier to read)
  3. jlem

    jlem TS Rookie Topic Starter Posts: 32

    I am just trying to make a program in c++ that has buttons for other programs that I need to launch. Kind like a menu program. In Visual C++ 2005 I creat the buttons but I need to tell it what to do, in this case open a program located in a dirctory like c:\alis\synchd.exe.

    Make sense?
  4. STK

    STK TS Rookie Posts: 102

    If I am not mistaken, I think it is: WinExec(program here) or ShellExecute(program here).

    Good Luck, hope it works.

Similar Topics

Add New Comment

You need to be a member to leave a comment. Join thousands of tech enthusiasts and participate.
TechSpot Account You may also...