Thread: executing programmes

  1. #1
    yes, I'm registered!!! algi's Avatar
    Join Date
    Nov 2004
    Location
    Ipswich
    Posts
    161

    executing programmes

    i can execute a programme using the system() function but is there another way because this black console box comes up in the process.
    I started out with nothing and I still have most of it left.

  2. #2
    Software Developer jverkoey's Avatar
    Join Date
    Feb 2003
    Location
    New York
    Posts
    1,905
    Code:
    STARTUPINFO startInfo;
    PROCESS_INFORMATION procInfo;
    ZeroMemory(&procInfo,sizeof(PROCESS_INFORMATION));
    ZeroMemory(&startInfo,sizeof(STARTUPINFO));
    char Buff[2048]="C:\\program.exe";
    
    CreateProcess(NULL, Buff, NULL, NULL, NULL, NULL, NULL, NULL, &startInfo, &procInfo);
    Change Buff to suit your needs.

  3. #3
    yes, I'm registered!!! algi's Avatar
    Join Date
    Nov 2004
    Location
    Ipswich
    Posts
    161
    thanks.
    I started out with nothing and I still have most of it left.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Executing an external shell command
    By g4j31a5 in forum C++ Programming
    Replies: 2
    Last Post: 06-20-2007, 07:47 PM
  2. Giving instruction to an executing C code
    By darkwalk in forum C Programming
    Replies: 2
    Last Post: 10-24-2006, 12:01 PM
  3. Replies: 40
    Last Post: 09-01-2006, 12:09 AM
  4. Executing a program
    By trancedeejay in forum C Programming
    Replies: 7
    Last Post: 03-06-2006, 08:55 AM
  5. Problem executing sample program:
    By mrabiu in forum C++ Programming
    Replies: 4
    Last Post: 03-13-2004, 06:44 PM