#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2003
    Location
    london
    Posts
    21
    Rep Power
    0

    (C) createprocess command?


    ok im using this to run a batch file:
    Code:
    if(!CreateProcess(NULL,"CMD.exe /c ..\\bsutil\\parm.bat C:\bstmp",NULL, NULL, TRUE, 0, NULL, NULL, &SI, &PI))
        RETURN 2 //error
    but get this error on the console:
    '..\bsutil\parm.bat' is not recognized as an internal or extermal command, operable program or batch file.

    any ideas??

    regards
    Dal
    :confused:
  2. #2
  3. I'm Baaaaaaack!
    Devshed God 1st Plane (5500 - 5999 posts)

    Join Date
    Jul 2003
    Location
    Maryland
    Posts
    5,538
    Rep Power
    244
    Can you execute the command exactly as it is in your code from the command line?

    Try using a fully qualified path to the program and batch file.

    Have you read this?

    http://msdn.microsoft.com/library/de...ateprocess.asp

    My blog, The Fount of Useless Information http://sol-biotech.com/wordpress/
    Free code: http://sol-biotech.com/code/.
    Secure Programming: http://sol-biotech.com/code/SecProgFAQ.html.
    Performance Programming: http://sol-biotech.com/code/PerformanceProgramming.html.
    LinkedIn Profile: http://www.linkedin.com/in/keithoxenrider

    It is not that old programmers are any smarter or code better, it is just that they have made the same stupid mistake so many times that it is second nature to fix it.
    --Me, I just made it up

    The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man.
    --George Bernard Shaw

IMN logo majestic logo threadwatch logo seochat tools logo