Greetings.
I use NT and in a default TC install shift-enter uses nopause.pif to pause the console window so it can be read.
While this works I would like to suggest that TC launch a batch file (NOPAUSE.BAT perhaps) which can be modified and customised for any Windows OS. In fact, nopause.pif could still be used to control the behavior of nopause.bat in the standard windows way.
This would allow NT users to use cmd.exe /c and Windows 9x/ME users can still use command.com /c and either camp can configure the behavior of shift enter to their hearts content.
For example, I like to use cmd /k instead of cmd /c which leaves the console window active after the command has executed, and then I use exit (in another e.bat) to close the dos window when I have finished with it.
I would like to suggest the following batch file for NOPAUSE.BAT
Comments appreciated.
@echo off
if [%1]==[] goto :end
set tccl=NT&
if not "%tccl%"=="NT" goto :PreNT
:: Windows NT/W2K/XP etc commands go here
"%windir%\system32\cmd.exe" /c %*
pause>nul
set tccl=
goto :EOF
:PreNT
:: Windows 9X/ME commands go here
"%windir%\command.com" /c %1 %2 %3 %4 %5 %6 %7 %8 %9
pause>nul
set tccl=
:end
Feature request: update for Shift Enter
Moderators: Hacker, petermad, Stefan2, white
I actually do have this there atm:
%windir%\NoClose2.bat
but there is another issue I didn't mention.
If you use the pif file and create %windir%\NoClose2.bat with this inside it
@echo off
echo "%0"-"%1"-"%2"-"%3"-"%4"
then launch
SET T
using shift enter
You will find that %1 is always set to /C such as this output shows.
"NOCLOSE2"-"/C"-"set"-"t"-""
While this isn't fatal, getting around it is sloppy.
I have a workable solution so I am not fussed if nothing changes - though I had thought launching a pif file would start a 16 bit process to handle the pif file, instead of a 32 bit process from the word go. But I am not certain of that...
%windir%\NoClose2.bat
but there is another issue I didn't mention.
If you use the pif file and create %windir%\NoClose2.bat with this inside it
@echo off
echo "%0"-"%1"-"%2"-"%3"-"%4"
then launch
SET T
using shift enter
You will find that %1 is always set to /C such as this output shows.
"NOCLOSE2"-"/C"-"set"-"t"-""
While this isn't fatal, getting around it is sloppy.
I have a workable solution so I am not fussed if nothing changes - though I had thought launching a pif file would start a 16 bit process to handle the pif file, instead of a 32 bit process from the word go. But I am not certain of that...
I can understand why you believe that, but test it for yourself. Copy and rename noclose.pif, make a batch file, and you will see that /C is not passed to the batch file./C is necessary: command /C .
It is evident that /C is being passed to the NOCLOSE.PIF file by TC, regardless of what command is being used in the PIF cmd line - either %comspec% or batch file.