0

I'm trying to use the createprocess function to start an xsession, but so far I've been unsuccessful. Here is the code I'm trying to use:

_tcscpy(tszCommandLine, _T("C:\\Program Files\\Hummingbird\\Connectivity\\12.00\\Exceed\\Xstart.exe C:\\Documents and Settings\\username\\Application Data\\Hummingbird\\Connectivity\\12.00\\Profile\\XSW3.xs"));
    CreateProcess(NULL, tszCommandLine, NULL, NULL, FALSE, NULL,
              NULL, NULL, &si, &pi);

If I try to make the XSW3.xs the only command line parameter, the program runs but nothing happens. I would appreciate any help.

Thanks,
Smed

2
Contributors
3
Replies
4
Views
8 Years
Discussion Span
Last Post by Smed
0

The argument to XStart.exe contains spaces, so you need to wrap double quotes around it. See red

_tcscpy(tszCommandLine, _T("C:\\Program Files\\Hummingbird\\Connectivity\\12.00\\Exceed\\Xstart.exe \"C:\\Documents and Settings\\username\\Application Data\\Hummingbird\\Connectivity\\12.00\\Profile\\XSW3.xs\""));
0

Is there a way that I could have something typed into the command line upon creation? For instance, have it type "cd folder1" as soon as the xsession window is created.

This topic has been dead for over six months. 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.