Thread: 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 int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    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.

  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, 11: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, 10:26 AM