Obviously, you can set a header containing standard cmd separators, but with the TITLE
command you cannot set a header starting with a separator.
You can create a new CMD instance with this name:
start "==" cmd.exe
but not possible for the same instance.
It is also possible with the .NET and Console.Title
property, but when it is called from a batch file, the tile lasts until the compiled exe is executed:
@if (@X)==(@Y) @end /* JScript comment @echo off setlocal for /f "tokens=* delims=" %%v in ('dir /b /s /a:-d /o:-n "%SystemRoot%\Microsoft.NET\Framework\*jsc.exe"') do ( set "jsc=%%v" ) if not defined jsc ( echo !!! Installation of .NET framework needed !!! pause exit /b 3 ) rem echo %jsc% ::if not exist "%~n0.exe" ( del /q /f %~n0.exe call "%jsc%" /nologo /out:"%~n0.exe" "%~dpsfnx0" ::) call %~n0.exe %* endlocal & exit /b %errorlevel% */ import System; var arguments:String[] = Environment.GetCommandLineArgs(); //Console.WriteLine(Console.Title); if (arguments.length>0){ Console.Title=arguments[1]; } //Console.WriteLine(Console.Title);
(Perhaps this is possible when entering the code)
Is there a windows native way?
source share