Click here to Skip to main content
15,903,362 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Overloading the << and >> operators CArchive Pin
Steve S3-Nov-03 22:55
Steve S3-Nov-03 22:55 
GeneralRe: Overloading the << and >> operators CArchive Pin
Alton Williams3-Nov-03 23:20
Alton Williams3-Nov-03 23:20 
GeneralRe: Overloading the << and >> operators CArchive Pin
Steve S4-Nov-03 0:58
Steve S4-Nov-03 0:58 
GeneralCDataGrid Pin
Alton Williams3-Nov-03 4:22
Alton Williams3-Nov-03 4:22 
QuestionHow to use UniCode Pin
Member 4580153-Nov-03 3:19
Member 4580153-Nov-03 3:19 
AnswerRe: How to use UniCode Pin
Joe Woodbury3-Nov-03 5:45
professionalJoe Woodbury3-Nov-03 5:45 
GeneralOpening Bookmarked HTML files Pin
John Ulvr3-Nov-03 3:11
John Ulvr3-Nov-03 3:11 
GeneralRunning CScript.exe via CreateProcess Pin
Gary Wheeler3-Nov-03 2:16
Gary Wheeler3-Nov-03 2:16 
I'm automating our product build process. I have a native Win32 application that does some UI setup and updates version resources, and then it runs the build script. The build script is a .wsf (Windows Script File) that I want to run using CScript, the console script host.

My problem is this: If I call CreateProcess with CScript.Exe as the file to execute, the process starts, creates a console window, and exits immediately:
STARTUPINFO startup_info = { 0 };
char        startup_title[128];
	
strcpy(startup_title,"Distribution build");
	
startup_info.cb      = sizeof(startup_info);
startup_info.lpTitle = startup_title;

PROCESS_INFORMATION process_info = { 0 };

CreateProcess("CSCRIPT.EXE",
              "//nologo DistributionBuild.wsf",
              NULL,NULL,FALSE,
              "C:\SC400.Build",
              &startup_info,
              &process_info);
However, if I start CScript.Exe via the command interpreter, it runs correctly:
CreateProcess("CMD.EXE",
              "CScript //nologo DistributionBuild.wsf",
              NULL,NULL,FALSE,
              "C:\SC400.Build",
              &startup_info,
              &process_info);
Anyone have any ideas why this might be the case?


Software Zen: delete this;
GeneralRe: Running CScript.exe via CreateProcess Pin
David Crow3-Nov-03 4:32
David Crow3-Nov-03 4:32 
GeneralRe: Running CScript.exe via CreateProcess Pin
Gary Wheeler3-Nov-03 5:08
Gary Wheeler3-Nov-03 5:08 
GeneralRe: Running CScript.exe via CreateProcess Pin
David Crow3-Nov-03 5:20
David Crow3-Nov-03 5:20 
GeneralRe: Running CScript.exe via CreateProcess Pin
Gary Wheeler3-Nov-03 7:10
Gary Wheeler3-Nov-03 7:10 
GeneralRe: Running CScript.exe via CreateProcess Pin
Michael Dunn3-Nov-03 5:39
sitebuilderMichael Dunn3-Nov-03 5:39 
GeneralRe: Running CScript.exe via CreateProcess Pin
Gary Wheeler3-Nov-03 7:07
Gary Wheeler3-Nov-03 7:07 
GeneralWinsock : Ip of broadcaster Pin
Ortie3-Nov-03 1:25
Ortie3-Nov-03 1:25 
GeneralRe: Winsock : Ip of broadcaster Pin
Ortie3-Nov-03 1:37
Ortie3-Nov-03 1:37 
Generaldebug error Pin
ranjjj3-Nov-03 0:25
ranjjj3-Nov-03 0:25 
GeneralRe: debug error Pin
Michael P Butler3-Nov-03 0:56
Michael P Butler3-Nov-03 0:56 
GeneralRe: debug error Pin
ranjjj3-Nov-03 4:02
ranjjj3-Nov-03 4:02 
GeneralRe: debug error Pin
David Crow3-Nov-03 4:36
David Crow3-Nov-03 4:36 
GeneralRe: debug error Pin
ranjjj3-Nov-03 17:06
ranjjj3-Nov-03 17:06 
GeneralRe: debug error Pin
David Crow4-Nov-03 2:31
David Crow4-Nov-03 2:31 
Generalmail server Pin
Ali7913-Nov-03 0:17
Ali7913-Nov-03 0:17 
GeneralRe: mail server Pin
melwyn3-Nov-03 1:44
melwyn3-Nov-03 1:44 
GeneralRe: mail server Pin
David Crow3-Nov-03 4:38
David Crow3-Nov-03 4:38 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.