Using .BAT Files Under Take Command

Print Topic  Return to Overview  Previous Topic  Next Topic 

In most cases under TCC your batch files will be stored as .CMD or .BTM files. However, you may also choose to use some .BAT files, especially if you are moving from Win98 to XP / 2003 / Vista / 2008. If you do, you need to be aware of the way  TCCexecutes .BAT files, which is slightly different from the method used by CMD.EXE.

 

CMD.EXE passes all .BAT files to Windows' DOS command processor, COMMAND.COM, for execution (yes, there is a skeletal DOS command processor in Windows). COMMAND.COM handles a few DOS-related commands, but passes most internal commands to a second copy of CMD.EXE so that they are executed in the Windows environment. This convoluted system allows you to load memory-resident DOS programs (TSRs), and run other programs which use them, all from the same .BAT file. However, it reduces performance for all .BAT  files in order to support those rare files which load DOS TSRs under Windows.

 

TCC does not use this system; it executes .BAT files directly, just like .CMD and .BTM files. This works better for most files, but may render DOS TSRs loaded from a .BAT file ineffective because other commands in the file are not executed in a DOS-based environment.

 

In most cases this difference will not affect your .BAT files, because you will not be loading DOS TSRs in Windows. If you do need to load TSRs from .BAT files, we recommend that you obtain a copy of our DOS command processor, 4DOS, start it from your Windows desktop, and run the .BAT files from  4DOS. You could also use CMD.EXE, but of course the .BAT files then cannot use 4DOS or TCC features. While we do not generally recommend using 4DOS under Windows 2000 / XP / 2003, it works well in this specific situation.

 

When invoking DOS programs from a TCC batch file, we recommend that you enable the CONFIG.NT command NTCMDPROMPT without which Windows tends to "forget" to return control to a calling 32-bit program (such as Take Command) and may leave you at an unexpected COMMAND.COM prompt. CONFIG.NT typically resides in the Windows SYSTEM32 directory. See your Windows documentation for additional information.

 

Topic "4ntbat.htm" last edited 1/26/2008. ©2008  JP Software, Inc.
Keywords: .BAT and 4NT,CONFIG.NT,NTCMDPROMPT,Batch Files