Launch for c program

This is a discussion on Launch for c program within the C Programming forums, part of the General Programming Boards category; I have a shortcut on my windows desktop which when I open and look at the properties it shows Target ...

  1. #1
    Registered User
    Join Date
    Jul 2010
    Posts
    1

    Question Launch for c program

    I have a shortcut on my windows desktop which when I open and look at the properties it shows Target "C:\Program Files\NMT\nmt.exe" test.srl.

    I am trying to write code that will launch the above target.

    P.S the test.srl is important as my program modifies this script file prior to launch of the program to ge the program to behave in different ways.

    Any help most appreciated

    Forget to mention that when the target is launced i want the lauching program to continue to do other things. I think this means I want the target to launch as a seperate process. I have looked at the FAQ and cant make head nor tail can somebody give me a snippet to work with.

    thx
    Last edited by gashd1889; 07-02-2010 at 10:26 AM.

  2. #2
    {Jaxom,Imriel,Liam}'s Dad Kennedy's Avatar
    Join Date
    Aug 2006
    Location
    Alabama
    Posts
    1,065
    system() would be an option: probably not the best since I don't fully understand what you want to do exactly. It would allow you to lauch an app, then, after the app was done, it would return control to your program.

  3. #3
    CSharpener vart's Avatar
    Join Date
    Oct 2006
    Location
    Rishon LeZion, Israel
    Posts
    6,459
    CreateProcess function - you could specify the process to launch

    "C:\Program Files\NMT\nmt.exe"

    you can specify command line parameters for the process "test.srl"

    you can specify working folder

    the function will return immediatly as soon as process is creted providing you with the process handle you can use to check if the process is running, wait for process completion, retreive the proccess return code, or terminate process if it run too long...
    The first 90% of a project takes 90% of the time,
    the last 10% takes the other 90% of the time.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. How to execute other program within c program?
    By KoYoungSuk in forum C Programming
    Replies: 7
    Last Post: 06-07-2010, 05:08 AM
  2. BOOKKEEPING PROGRAM, need help!
    By yabud in forum C Programming
    Replies: 3
    Last Post: 11-16-2006, 10:17 PM
  3. launch program from website
    By Unregistered in forum C++ Programming
    Replies: 4
    Last Post: 01-20-2002, 06:41 PM
  4. My program, anyhelp
    By @licomb in forum C Programming
    Replies: 14
    Last Post: 08-14-2001, 10:04 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21