In the meantime, I resorted to using this little snippet as a workaround for this limitation.
This may be useful to others who may use earlier versions of TCC which which may be affected by this bug.
It also has the advantage(for me) that the input history is available with CMD's
SET /P
, whereas TCC does not provide this functionality with
SET /P
and
INPUT
(or maybe I don't know how to activate it).
Code:
setlocal
setdos /x0-45678
unset userInput
set "savedTitle=%_WINTITLE"
(echos Prompt text goes here)
setdos /x+5678
REM The CMD's title command outputs the help message if the title matches this regex pattern "/\s*[?]"
REM So it should be redirected to nul to be safe
for /F "delims=" %%I in ('@"%_WINSYSDIR\cmd" /e:on /v:on /d /c title !savedTitle!^^^>nul^^^&set /p "userInput="^^^&if defined userInput echo(!userInput!') do (
setdos /x-5678
set "userInput=%%I"
)
endlocal userInput
SideNote:
I had to omit the
.exe
extension from
cmd
because apparently the forum software does permit the post to contain
cmd
.exe
. This does not occur with other names like
TCC.exe
. Strange!