1. Let's say you want to stop the cursor from blinking:
Code: Select all
@echo off
setlocal enabledelayedexpansion
for /f %%e in ('echo prompt $E^|cmd') do set "\e=%%e"
echo Hi
echo %\e%[?12l
powershell /command "Get-Host | Select Version"
cmd /k echo Hi
2. Lets say you want to change the title and Run the script as Administrator:
Code: Select all
@echo off
setlocal enabledelayedexpansion
for /f %%e in ('echo prompt $E^|cmd') do set "\e=%%e"
for /f %%g in ('%__APPDIR__%forfiles.exe /p "%~dp0." /m "%~nx0" /c "cmd /c echo 0x07"') do set "bel=%%g"
echo %\e%]0;Test Title%BEL%
pause
powershell /command "Get-Host | Select Version"
Code: Select all
@echo off
setlocal enabledelayedexpansion
for /f %%e in ('echo prompt $E^|cmd') do set "\e=%%e"
for /f %%g in ('%__APPDIR__%forfiles.exe /p "%~dp0." /m "%~nx0" /c "cmd /c echo 0x07"') do set "bel=%%g"
echo %\e%]0;Test Title%BEL%
pause
cmd /k echo Hi
Is that expected behavior for a Operating System Command (OSC) sequence as opposed to a Control Sequence Introducer (CSI)?