svn path=/trunk/; revision=73478
BOOL bUnicodeOutput = FALSE;
BOOL bDisableBatchEcho = FALSE;
BOOL bDelayedExpansion = FALSE;
BOOL bUnicodeOutput = FALSE;
BOOL bDisableBatchEcho = FALSE;
BOOL bDelayedExpansion = FALSE;
DWORD dwChildProcessId = 0;
HANDLE hIn;
HANDLE hOut;
DWORD dwChildProcessId = 0;
HANDLE hIn;
HANDLE hOut;
{
TCHAR szFullName[MAX_PATH];
TCHAR *first, *rest, *dot;
{
TCHAR szFullName[MAX_PATH];
TCHAR *first, *rest, *dot;
- TCHAR szWindowTitle[MAX_PATH];
+ TCHAR szWindowTitle[MAX_PATH], szNewTitle[MAX_PATH*2];
DWORD dwExitCode = 0;
TCHAR *FirstEnd;
TCHAR szFullCmdLine [CMDLINE_LENGTH];
DWORD dwExitCode = 0;
TCHAR *FirstEnd;
TCHAR szFullCmdLine [CMDLINE_LENGTH];
- GetConsoleTitle (szWindowTitle, MAX_PATH);
+ GetConsoleTitle(szWindowTitle, ARRAYSIZE(szWindowTitle));
+ bTitleSet = FALSE;
+ _stprintf(szNewTitle, _T("%s - %s%s"), szWindowTitle, First, Rest);
+ SetConsoleTitle(szNewTitle);
/* check if this is a .BAT or .CMD file */
dot = _tcsrchr (szFullName, _T('.'));
/* check if this is a .BAT or .CMD file */
dot = _tcsrchr (szFullName, _T('.'));
/* Get code page if it has been changed */
InputCodePage= GetConsoleCP();
OutputCodePage = GetConsoleOutputCP();
/* Get code page if it has been changed */
InputCodePage= GetConsoleCP();
OutputCodePage = GetConsoleOutputCP();
- SetConsoleTitle(szWindowTitle);
+ if (!bTitleSet)
+ SetConsoleTitle(szWindowTitle);
INT cmd_title (LPTSTR param)
{
INT cmd_title (LPTSTR param)
{
return SetConsoleTitle (param);
}
return SetConsoleTitle (param);
}