How do i execute a .exe during runtime?

This is a discussion on How do i execute a .exe during runtime? within the C Programming forums, part of the General Programming Boards category; How do i execute a .exe during runtime?...

  1. #1
    Registered Trademark
    Join Date
    Apr 2005
    Posts
    19

    How do i execute a .exe during runtime?

    How do i execute a .exe during runtime?
    pardon the double post. My browser didn't react quickly for DSL and i thought i didn't click the button properly

  2. #2
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,496
    Oh, lemme guess - you've read the FAQ but lost the link to it
    http://faq.cprogramming.com/cgi-bin/...&id=1043284392
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  3. #3
    Registered Trademark
    Join Date
    Apr 2005
    Posts
    19
    this is more than likely found on the faq too, but how can i use arguments as a password ?

    for instance-
    i'd like to use a few args as a password for my project:

    cmdline>programInC password anotherOne aFieForSomething

    i tried accessing them through an if statement:
    Code:
    if (args[1] == "somePassWordIMightUse") { allowThis() }
    but it skipped the if and did nothing or just ran right into the brackets if the password was right or wrong
    pardon the double post. My browser didn't react quickly for DSL and i thought i didn't click the button properly

  4. #4
    Registered User
    Join Date
    Aug 2001
    Posts
    244
    strcmp(args[1], "somePassWordIMightUse")

    == wont work here
    signature under construction

  5. #5
    Registered Trademark
    Join Date
    Apr 2005
    Posts
    19
    do i put that in the if statement?
    pardon the double post. My browser didn't react quickly for DSL and i thought i didn't click the button properly

  6. #6
    ---
    Join Date
    May 2004
    Posts
    1,379
    Yes.
    http://www.acm.uiuc.edu/webmonkeys/b...14.html#strcmp
    Returns zero if the first n bytes (or null terminated length) of str1 and str2 are equal. Returns less than zero or greater than zero if str1 is less than or greater than str2 respectively.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 13
    Last Post: 12-09-2008, 10:09 AM
  2. Runtime formation and execution at runtime
    By Soham in forum C Programming
    Replies: 17
    Last Post: 08-27-2008, 08:45 AM
  3. Execute prog as other user
    By groorj in forum C Programming
    Replies: 2
    Last Post: 05-04-2005, 12:28 PM
  4. FILES in WinAPI
    By Garfield in forum Windows Programming
    Replies: 46
    Last Post: 10-02-2003, 06:51 PM
  5. Load and run machine code at runtime
    By ninebit in forum C++ Programming
    Replies: 8
    Last Post: 02-27-2002, 09:26 AM

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