mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 16:12:58 +00:00
[CMD] Add a ExecuteCommandWithEcho() helper and use it in Batch() and as the implementation of RunInstance() FOR-loop helper.
This commit is contained in:
parent
ce543fbb72
commit
240f6737e9
4 changed files with 34 additions and 26 deletions
|
@ -769,7 +769,8 @@ failed:
|
|||
}
|
||||
|
||||
INT
|
||||
ExecuteCommand(PARSED_COMMAND *Cmd)
|
||||
ExecuteCommand(
|
||||
IN PARSED_COMMAND *Cmd)
|
||||
{
|
||||
PARSED_COMMAND *Sub;
|
||||
LPTSTR First, Rest;
|
||||
|
@ -830,6 +831,24 @@ ExecuteCommand(PARSED_COMMAND *Cmd)
|
|||
return Ret;
|
||||
}
|
||||
|
||||
INT
|
||||
ExecuteCommandWithEcho(
|
||||
IN PARSED_COMMAND *Cmd)
|
||||
{
|
||||
/* Echo the reconstructed command line */
|
||||
if (bEcho && !bDisableBatchEcho && Cmd->Type != C_QUIET)
|
||||
{
|
||||
if (!bIgnoreEcho)
|
||||
ConOutChar(_T('\n'));
|
||||
PrintPrompt();
|
||||
EchoCommand(Cmd);
|
||||
ConOutChar(_T('\n'));
|
||||
}
|
||||
|
||||
/* Run the command */
|
||||
return ExecuteCommand(Cmd);
|
||||
}
|
||||
|
||||
LPTSTR
|
||||
GetEnvVar(LPCTSTR varName)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue