running exe files from a c++ program

This is a discussion on running exe files from a c++ program within the C++ Programming forums, part of the General Programming Boards category; Does anyone know how I could do this? Here at school there are tons of restrictions on exes and we ...

  1. #1
    Unregistered Leeman_s's Avatar
    Join Date
    Oct 2001
    Posts
    753

    running exe files from a c++ program

    Does anyone know how I could do this? Here at school there are tons of restrictions on exes and we pretty much can't run anything. Last year, there was a bug where when we logged on the 'run' option was available at the start menu for a brief period but then disappeared because the restrictions kicked in. This year its fixed. Using the 'run' command from the start menu would let us run exes from there with no problem.

    1) I'm thinking there has to be a way to get the 'run' command dialogue box, or make something like it in c++ console mode. Anyone have a clue? (main goal is to get the command prompt up, we dont have access to that either)

    2) Is there a way to get the command prompt open from a c++ program? I mean the traditional start>prog files>accessories>command rather than the prompt that opens with a c++ console prog.

  2. #2
    S Sang-drax's Avatar
    Join Date
    May 2002
    Location
    Göteborg, Sweden
    Posts
    2,072
    To open command-line window:

    system("cmd");
    system("command");
    Last edited by Sang-drax : Tomorrow at 02:21 AM. Reason: Time travelling

  3. #3
    &TH of undefined behavior Fordy's Avatar
    Join Date
    Aug 2001
    Posts
    5,789
    :: cough FAQ ::

  4. #4
    mustang benny bennyandthejets's Avatar
    Join Date
    Jul 2002
    Posts
    1,401
    listen to fordy, he knows what he's coughing about. the FAQ explains the best ways to run exes (which is definately not with 'system').

    how do you plan to run this program from the computer, let alone get it there in the first place?
    benforbes@optusnet.com.au
    Microsoft Visual Studio .NET 2003 Enterprise Architect
    Windows XP Pro

    Code Tags
    Programming FAQ
    Tutorials

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 10
    Last Post: 04-07-2008, 09:14 AM
  2. Builder C++ large files support for simple C program
    By Murfury in forum C Programming
    Replies: 3
    Last Post: 11-23-2007, 02:47 PM
  3. Replies: 0
    Last Post: 04-27-2003, 02:04 AM
  4. Geophysics student needs help in running a C++ program
    By Unregistered in forum C++ Programming
    Replies: 6
    Last Post: 01-29-2002, 01:15 AM
  5. Running program on background?
    By Couhilin in forum A Brief History of Cprogramming.com
    Replies: 1
    Last Post: 11-03-2001, 06:50 AM

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