Dress up your DOS prompt


Tip
"It's ugly but it gets you there." That line from the old Volkswagen ads applies to DOS as well. It's still the fastest way to make wildcard filename changes, automate your system with batch files, and handle other file management tasks. You also can customise the look of a DOS prompt running in Windows. Here's how:
Frame it. To make your DOS prompt run in a window instead of full screen, start the PIF Editor in Win 3.x. For Program Filename, type command.com. Then select Windowed under Display Usage. Choose File--Save and save the file as command.pif. In Windows 95, locate and right-click the MS-DOS Prompt icon in the Programs folder and choose Properties. Click the Screen tab and select Window under Usage. Check Restore settings on startup to preserve this setting. Then click OK.
Name it. If you're running your DOS prompt in a window, you can customise its title bar name. In Windows 3.x you can just change the icon name in Program Manager. Select the icon, press <Alt>-<Enter> to see its properties, edit the Description, and click OK. In Windows 95, open the DOS window's Properties sheet as described above. Click the Program tab and type your custom window title in the box at the top.
Kill the commercial. Each DOS session begins by announcing its maker at the top of the window or screen. To skip this commercial in Windows 3.x, start the PIF Editor and open the PIF you created above (or follow the directions there to make one). For Optional Parameters, type /k cls. The /k switch executes a command (in this case the cls, or clear screen, command) and then allows the DOS session to continue running. Save the file. To do this in Windows 95, open the DOS window's Properties sheet as previously described. Click the Program tab and edit the end of the Cmd line information so that it reads command.com /k cls. Then click OK.
Give yourself more room. You can make your DOS prompt display more than 25 lines. In Windows 3.x, choose File--Run in either Program Manager or File Manager. Type system.ini and click OK. Under the [NonWindowsApp] heading, look for a line that begins 'ScreenLines='. (If you don't see it, add this on a line by itself.) Change the number to the right of the equal sign to a higher number (up to 50). Then save the file and restart Windows. In Windows 95, open the DOS prompt's Properties sheet as previously explained and click the Screen tab. For Initial Size, select the number of lines you want. Make sure Restore settings on startup is checked. This setting applies to all DOS programs running in a window, but some applications may override it.
Skip the instructions. By default, Win 3.x always tells you how to exit and switch to and from a DOS window. To remove this notice, open system.ini in a text editor. Look under the [386Enh] heading for a line that begins 'DOSPromptExitInstruc=' and edit it to read DOSPromptExitInstruc=0 (add the line if necessary).
Own the prompt. To have a custom command prompt in either Win 3.x or 95, add a line like this to your autoexec.bat file: set winpmt=Type "exit" to return to Windows $p$g. Edit the text to the right of the equal sign as you like; $p$g shows the current directory and the greater than (>) symbol. If you want things colourful and don't mind using ANSI codes, load ansi.sys in your config.sys file by adding the line device=c:\windows\command\ansi.sys, adjusting the path as needed. Then enter the necessary codes in your 'set winpmt=' line. Or just adapt this: set winpmt=$e[41;1;33m Windows is still running! Type EXIT to end this DOS session. $e[0m$_%PROMPT%$e[40;0m. When you're finished, save the autoexec.bat file and restart your PC.

Give DOS a makeover with a custom title, added lines and other enhancements - and remove clutter like exit instructions

If you've got it, font it. You can customise the font used when your DOS prompt is running in a window (except if you have an old screen driver that doesn't allow this). In Windows 3.x, choose Fonts from the Control menu -- the one you get when you click the little control box that's in the upper-left corner of every window. Select a setting from the font list. To make this font your default, check Save Settings on Exit and click OK. In Windows 95, open the DOS prompt's Properties sheet from the control menu. Click the Font tab and select your font types and sizes. The Auto setting automatically adjusts the font's size as you resize your DOS prompt window. As before, you'll need to check Restore settings on startup in the Screen tab to keep this setting for future sessions.
- Scott Dunn


Category: Win95, Windows 3.x
Issue: Jun 1997
Pages: 159-160

These Web pages are produced by Australian PC World © 1997 IDG Communications