adding %cmdcmdline%, example how to use it echo %CMDCMDLINE%
Modified: trunk/reactos/subsys/system/cmd/cmd.c
_____
Modified: trunk/reactos/subsys/system/cmd/cmd.c
--- trunk/reactos/subsys/system/cmd/cmd.c 2005-07-07 18:44:08 UTC
(rev 16493)
+++ trunk/reactos/subsys/system/cmd/cmd.c 2005-07-07 19:16:46 UTC
(rev 16494)
@@ -1028,6 +1028,15 @@
cp = _stpcpy (cp, szRand);
}
+ /* %CMDCMDLINE% */
+ else if (_tcsicmp(ip,_T("cmdcmdline")) ==0)
+ {
+ TCHAR *pargv;
+ /* Get random number */
+ pargv = GetCommandLine();
+ cp = _stpcpy (cp, pargv);
+ }
+
/* %ERRORLEVEL% */
else if (_tcsicmp(ip,_T("errorlevel")) ==0)
@@ -1493,6 +1502,7 @@
argv = CommandLineToArgvW(GetCommandLineW(), &argc);
#endif
#endif
+
SetFileApisToOEM();
InputCodePage= 0;
@@ -1512,16 +1522,18 @@
InputCodePage= GetConsoleCP();
OutputCodePage = GetConsoleOutputCP();
CMD_ModuleHandle = GetModuleHandle(NULL);
-
+
/* check switches on command-line */
Initialize(argc, argv);
/* call prompt routine */
nExitCode = ProcessInput(FALSE);
+
/* do the cleanup */
Cleanup(argc, argv);
+
return(nExitCode);
}
Show replies by date