Thread: Linking Program

  1. #1
    Registered User
    Join Date
    Sep 2004
    Posts
    8

    Linking Program

    I am working on a program for my job. It is starting off very simple right now but I will take it a whole lot further as time goes on. I have a very simple question right now though cause I can't seem to figure it out and I am sure that it is just something I am overlooking.

    My question is how do I open another program from the program I am making. I know how to modify text files and make scripts and all that. I have the path to the exe files, I just am not sure how to make it so that I can tell it to open "Program A.exe".

    In case anybody needs to know, I am using Visual C++ .Net.

    Thanks.

  2. #2
    Sweet
    Join Date
    Aug 2002
    Location
    Tucson, Arizona
    Posts
    1,820
    Well you could do system("path and name of exe"); or shellexecute()(I think )
    Woop?

  3. #3
    Registered User
    Join Date
    Sep 2004
    Posts
    8
    I will have to give it a try, thanks!

  4. #4
    pronounced 'fib' FillYourBrain's Avatar
    Join Date
    Aug 2002
    Posts
    2,297
    WinExec or CreateProcess if you're doing a windows app.

    The reason would be that system() causes a console window to pop up in a windows app. If you're already a console app, system() is better.
    "You are stupid! You are stupid! Oh, and don't forget, you are STUPID!" - Dexter

  5. #5
    Registered User
    Join Date
    Sep 2004
    Posts
    8
    That is good to know, the first version of my app is console. But all later versions after it will be Windows.

    Thanks for the info!

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 5
    Last Post: 09-14-2006, 09:47 PM
  2. MinGW Linking GUI Program
    By Tonto in forum Tech Board
    Replies: 19
    Last Post: 08-23-2006, 03:28 PM
  3. I need some help with my program please.
    By agentxx04 in forum C Programming
    Replies: 9
    Last Post: 09-26-2004, 07:51 AM
  4. Linking Fortran procedures with C program
    By gest in forum C Programming
    Replies: 5
    Last Post: 07-14-2003, 12:35 PM
  5. My program, anyhelp
    By @licomb in forum C Programming
    Replies: 14
    Last Post: 08-14-2001, 10:04 PM