also @ TechSpot: Windows 8 Release Preview leaked, Microsoft may raise OEM prices

TechSpot

launching .exe in visual c++

Discussion in 'General Discussion' started by jlem, Jul 12, 2004.

  1. jlem Newcomer, in training

    newbie programming question. I am trying to launch an exe in a program, anyone tell me what to use for that?
  2. MrGaribaldi TechSpot Ambassador

    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 Newcomer, in training

    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 Newcomer, in training

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

    Good Luck, hope it works.