0

i have been using CreatProcess in my program to initialize another program with two command line arguments as
C:\\Documents and Settings\\xyz.exe
and 2

so the code i am using is

CreateProcess ( "C:\\abc.exe", " C:\\Documents and Settings\\xyz.exe 2", NULL, NULL, FALSE, NORMAL_PRIORITY_CLASS,
                 NULL, NULL, &si, &pi );

but due to spaces b/w Documents and settings it is treating it as 3 arguments.....is there a way to pass arguments with spaces and still
treat them as a single argument???

2
Contributors
1
Reply
2
Views
8 Years
Discussion Span
Last Post by Salem
0
CreateProcess ( "C:\\abc.exe", " \"C:\\Documents and Settings\\xyz.exe\" 2", NULL, NULL, FALSE, NORMAL_PRIORITY_CLASS,
                 NULL, NULL, &si, &pi );

Some well-placed \" perhaps?

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.