Windows 3.x & 95

by M. L. Giggleman

Close Batch Files and Other Questions

A frequently asked question is: how to terminate a batch file run from Windows. Most batch files leave an open DOS window forcing the user to type EXIT to close.

The “trick” for Windows 3.x was to use this as the last line of the batch file: echo. | exit

This also works in DOS, except that it produces an extra carriage return.

However, it doesn’t work in Windows 95. To automatically close the DOS window after running a batch file, you will need to create a PIF file. To do this, right click on the batch file itself and select “properties”. Choose the

“program” tab. Check “Close on Exit” and the batch file will close and exit to Windows after running.

Win 3.X: Use Sound Recorder To Display Sound File Information

Sound Recorder by default is located in the Accessories group. Select a sound file by clicking on File, Open. Then click on Help, About Sound Recorder. Windows version and copyright information is displayed, followed by a line describing the sound file. For example, CHORD.WAV is shown as “Mono 22.050kHz, 8 bit”.

Win 3.X: Reconstruct The Main, Accessories And Games Groups

To restore the contents of the Main, Accessories and Games groups as originally installed, issue the following command in the File/Run command line box: setup /p

This reads the SETUP.INI file and constructs new group files based on information within SETUP.INI. Note that any modifications you made to these groups will be lost.

Win 3.X: Group Windows Missing

If Windows contains no groups upon opening, the PROGMAN.INI file is probably missing. If Windows cannot locate this file while loading, a new one is created containing only a [Settings] section with the name of the active display driver.

This is one reason why it is important to back up all Windows (and DOS) configuration files. Run a batch file from AUTOEXEC.BAT or Windows to automatically back up vital configuration files before each session.

Win 3.X: Add Comments To Help Topics

Did you know you can add your own comments to Windows Help? It is called an annotation and is used to add information to Help topics. For example, a list of printer settings added to printer help, document formatting notes in Write help, etc.

To create an annotation, first select the topic within Help that will be annotated. Next, select Annotate from Help’s Edit menu to open the Annotate dialog box. Type your comments in the large box. The text will wrap within the window or you can press th e Enter key to end a line before it wraps. Finally click on SAVE. The text is saved in a file in the Windows subdirectory.

Figure 1 shows text typed into the dialog box.

Figure 2 shows the help screen once the annotation is saved. Note the “paperclip” symbol to the left of the title line denoting an annotation exists for this topic.

To view the annotation, click on the “paperclip” symbol (or press the tab key until the “paperclip” is highlighted), then press the Enter key. Your text is displayed in the annotate dialog box as in Figure 1, along with the following commands:

SAVE Edit and then SAVE changes to the annotation

CANCEL EXIT the Annotate Dialog Box

DELETE REMOVE the annotation

COPY COPY the annotation to the Clipboard for pasting

PASTE PLACE Clipboard contents at cursor position

The COPY command may be used to copy a help topic to the Clipboard for pasting into another application.

To close the dialog box, select Cancel or Alt+F4 (hold down the Alt key and press F4).

Win 3.X: Find And Use “Hidden” Icons

Many Windows programs contain more than one icon. To view available icons for a program file, first click on the program icon to select. From the menu, select File, Properties. A keyboard shortcut is Alt+Enter (hold down the Alt key and press Enter). An other keyboard shortcut is to hold down the Alt key and double-click the program icon.

Click on the Change Icon box in the Program Item Properties dialog box and you may find more than one icon. File Manager actually contains four icons (Figure 4). The familiar “file cabinet” is the first icon and the default unless you change it. Use the Change Icon box to snoop and see if an application contains multiple icons.

Left-click the mouse or use an arrow key to select a new icon and press OK.

You can also select an icon from another program. First select the program item whose icon you want to change. Access the Properties Dialog Box by pressing Alt+Enter (hold down the Alt key and press Enter). Click on the Change Icon button. Manually type the file name in the File Name box or select Browse... to point and click.

Icon sources you probably have but might not know about:

Windows provides a small group of icons (46) in PROGMAN.EXE and a larger collection (106) in MORICONS.DLL. Both are located in the Windows subdirectory. There are additional icons located in the Control Panel files in the Windows System subdirectory (C:\ WINDOWS\SYSTEM). These files have a CPL extension. Windows 3.1 ships with four CPL files: CPWIN386.CPL, DRIVERS.CPL, MAIN.CPL and SND.CPL. Windows For Workgroups contains additional CPL files.

Advanced Tips

These tips are for advanced users. Please do not edit an .INI file without first making a backup. The smallest mistake or mistyped instruction could render Windows unusable. Although SYSEDIT automatically backs up the original files when changes are made (*.SYD), it is a good idea to back up important Windows files to a specific directory. For example, create a directory called SAVE and copy all .INI and *.GRP files to it:

MD C:\SAVE

XCOPY C:\WINDOWS\*.INI C:\SAVE

XCOPY C:\WINDOWS\*.GRP C:\SAVE

If you have a backup directory, remember to re-copy the files before editing.

Win 3.X: The System Editor

Under Windows 3.x, editable “system files” consist of DOS start-up files (CONFIG.SYS and AUTOEXEC.BAT) and Windows initialization files (SYSTEM.INI, WIN.INI, sometimes others as needed). These crucial files can be viewed or edited using the DOS Edit prog ram or in Windows using Notepad. However, Windows includes a system editor (SYSEDIT) specifically for this task. When run, it automatically loads SYSTEM.INI, WIN.INI, CONFIG.SYS and AUTOEXEC.BAT, plus other files as needed by a particular system configur ation. In Windows 3.1, SYSEDIT is copied to the C:\WINDOWS\SYSTEM subdirectory during installation. By default, Windows 3.1 does not create an icon for it. Windows for Workgroups installs SYSEDIT to the MAIN group.

Win 3.X: Speed DOS Apps In Windows

SYSTEM.INI

[386Enh]

FileSysChange=Off

The default setting is On. This causes File Manager to receive updates when files are added, modified or deleted by a DOS program. It can slow a system running programs in a DOS box. Changing it to Off can speed up DOS programs by not notifying File Mana ger of added, changed or deleted files.

Once the entry is changed to Off, you will need to choose Refresh from the File Manager Window menu to show changes to files and directories. The keyboard shortcut is the F5 key, which forces a refresh of the Windows display. The F5 key also may be used in most Windows apps. For example, pressing F5 in a web browser reloads the page. If reading files on disk in the A: drive, pressing F5 re-reads a changed disk.

Display More Lines On Screen In Dos Window

You can increase the number of screen lines displayed in a DOS session from the default 25 to 43 or 50 by editing or adding the following line:

SYSTEM.INI

[NonWindowsApp]

ScreenLines=50

Windows must exited and restarted to show the changes. Most DOS programs will run with 43 or 50 lines, except for programs that directly set the screen mode.

Use Another Group As Startup

The Windows Startup Group contains programs that are activated each time Windows starts. You are not limited to the Startup Group — any group may be activated on startup. Edit the following line in PROGMAN.INI:

PROGMAN.INI

[Settings]

Startup=Main

Speed Up Windows Apps

If you run only Windows applications in Win 3.x, try this:

SYSTEM.INI

[386Enh]

WinExclusive=yes

This allocates almost 100% of the CPU to Windows apps.

M. L. Giggleman, a HAL-PC member, is a PC Systems Specialist/ WAN Administrator working contract in the Dallas and Houston areas, who may be contacted at supgigg1@airmail.net.


E-mail me at webmaster@hal-pc.org with any comments you have and tell me what you want to see here.

Back to the Magazine Home Page