Classic Computer Magazine Archive COMPUTE! ISSUE 160 / JANUARY 1994 / PAGE 6

Windows: better, faster, more; tips from three Windows aces that put the win back in Windows. (Microsoft Windows operating system) (Cover Story)
by Tony Roberts, Dan Gookin, Clifton Karnes

How can you make Windows more responsive and still enjoy the flexibility and power of the interface? Take control of icons, learn to make DOS windows more responsive, make memory do your bidding, optimize your interaction with your hard disk, and more. In this article you'll find tips that make Windows fly, tips that make Windows fun, and tips that make Windows phenomenal.

1 Reduce Font Load

If it seems as if your Window applications take forever to initialize, your system may be suffering from font overload. Cut back on the number of active fonts in your system, and applications will load faster.

Although Windows 3.1 allows you to have hundreds of fonts active, doing so slows down program loading and slows down your work as you wade through font lists. The solution is to install only the fonts you use often plus those you need for specific purposes.

Perhaps the best way to manage fonts is with FontMinder 1.1 (Ares Software, P.O. Box 4667, Foster City, California 94404-4667; $79.95). This utility lets you group fonts that you use for specific projects in font packs. When you go to work on the company newsletter, simply drag in the fonts for that project. Once the newsletter is published, just drag those fonts out.

If you work with hundreds of fonts, FontMinder is the one utility that can help keep you sane.

2 Create Icons for Control

Panel Selections

Control Panel contains a handy collection of utilities, but most people frequently use only one or two - maybe Printers or Desktop. To get where you're going faster, you can run your favorite Control Panel directly.

While in Program Manager, select File, Run. In the Command Line box, enter the command control printers. Control Panel will load and automatically start the Printers utility.

Better yet, create a special Program Manager icon to run any Control Panel utility directly. First, select File, New, Program Item; then click on OK. In the Command Line box, enter controlprinters. Next, select Change Icon, Browse. Then select the WINDOWS\SYSTEM subdirectory and in the File Name box enter main.cpl. Select the printer icon and click on OK. Select OK again to close the Program Properties dialog.

3 Start Screen Savers from

an Icon

Windows screen savers are great for covering up your work while you turn your attention elsewhere, but there's no apparent way to start a screen saver on demand - you have to wait until the time delay occurs.

Here's how to start a screen saver from an icon.

Using NotePad or SysEdit, open up your WIN.INI file. Locate the Programs=line and type scr at the end of it. Restart Windows so this change takes effect.

Now, create an icon for your saver by selecting File, New, Program Item. To see the filenames for screen savers on your system, select Browse and enter *.scr in the File Name box. Select one of the savers, and its name will appear in the Command Line box. Add a /s switch to the end of the command line, and click on OK.

Now you can start a screen saver immediately by double-clicking on its icon. If you want to change the screen saver's configuration, go through Control Panel as usual. If you want to start the saver with a hot key, edit the icon's properties to include a hot key.

4 Shift into High Gear

The Shift key is more powerful than it looks. Here are three Shift-key tricks. * Hold down the Shift key when starting an application. The program will run, but it will be minimized. * Hold down the Shift key when starting Windows to prevent the programs in your StartUp group from loading. * Hold down the Shift key as you double-click on the Control-menu box to save your Program Manager settings without exiting from Windows.

5 Assign a Hot Key to

Program Manager

How would you like a hot key that would get you back to Program Manager from wherever you are?

Open your StartUp group and select File, New, Program Item to create a new icon for Program Manager. Enter progman.exe in the Command Line box, and specify your preferred hot-key combination in the Shortcut Key box. Ctrl-Alt-shift-P is a possibility.

At this point, you can further personalize your desktop if you like by adding some custom text in the Description box. For example, try typing in Bob's Desktop or Tony's Analytical Engine.

Click on OK to close the Program Properties dialog and double-click on the newly created icon to install your changes and activate your hot key. Because the new icon is in the StartUp group, your changes will go into effect every time you start Windows. Don't be concerned that this tip will leave you with multiple copies of Program Manager floating around. Program Manager is a single-instance application. If the program is already running when you try to run it, it merely becomes active rather than starting up a second copy.

6 Eliminate Group Clutter

Almost every Windows application wants to create its own Program Manager group. Before long, you'll be swimming - or perhaps drowning - in groups.

Create a more efficient workspace by putting the icons for all of your most-used applications in one Master group. Close all other groups, and then select Window, Tile to make your Master group fill the screen. This will allow you to perform most of your work without opening and closing a lot of groups.

Further reduce the group clutter by moving similar programs from their native groups to groups created based on function. For example, put all of your telecommunications icons in a Telecommunications group.

7 Reorder the Group List

You can open a Program Manager group that's not visible by selecting Window and then clicking on the name of the group from the numerical list. However, if you have several groups, your most-used groups may not appear at the top of the list. You can change the settings in the PROGMAN.INI file to make sure the groups you want are at the top.

First, make a backup copy of PROGMAN.INI; then load PROGMAN.INI into a text editor such as Notepad. The file includes a Settings section and a Groups section. Groups lists all of the groups you have created and assigns each a group number.

In the Settings section is a line that begins Order= and then lists a series of group numbers. To change the position of a group on the Window menu, place the group's number in the desired position on the Order=line. Restart Windows for the change to take effect.

8 Can't See the DOS Error

Message?

Sometimes when you're trying to run a DOS application from Windows, all you see is one flash of the DOS screen before the DOS box exits and returns to Windows. There's an error message there, but your eyes aren't quick enough to see it.

To get a good look at the error message so you can figure out what to correct, you need to edit the PIF file that controls the DOS application. Run Pifedit and load the appropriate PIF file. if the application has no specific PIF file, load_DEFAULT.PIF.

Deselect the Close Window on Exit item, and save the modified PIF. This leaves a DOS window open so you can read any error message that may have been created. Rerun the problem program, and take whatever steps are necessary to correct the problem.

When everything is working smoothly, reopen the PIF file and select Close Window on Exit.

9 Icon Spacing

You can pack more icons into a smaller space by changing the spacing between them. To do this open Control Panel and select Desktop. In the Icons section, reduce the spacing setting to bring the icons closer together. A setting of 60 works well. While you're at it, make sure the Wrap Title option is selected so that long descriptions will be wrapped into two or three lines.

Now, go back to Program Manager and select Window, Arrange Icons. Your icons will be nestled a little closer together, but the vertical spacing between rows of icons will be unaffected. Unfortunately, you can't change that setting from Control Panel. You'll have to edit WIN.INI to make that change.

Open WIN.INI with SysEdit or Notepad and search for the [Desktop] section. Look for a line that begins IconVerticalSpacing=. Change the setting in that line to 75. If the line doesn't exist, go ahead add it.

Restart Windows for the change to take effect.

Keep DOS Applications

from Eating Up

Processor Time

Many Windows users like to run a DOS session and leave it minimized on the desktop so they'll have quick access to the command line to execute DOS commands.

Although you'll rarely attempt to multitask such a DOS session, Windows doesn't know that, so it spends some of its time checking to see if there's any background work that needs to be done in that session.

You can save Windows some effort and speed up your other applications by editing the PIF file that runs your DOS session (usually DOSPRMPT.PIF) to reduce background priority.

Run Pifedit and open the appropriate PIF file. Click on the Advanced button and change the background priority to 1 - the lowest possible setting. Save your changes.

Now you can keep your DOS icon minimized on your desktop, but Windows won't worry about checking in with the DOS session as often.

If you ever do need to increase the background priority for a specific reason, you can do it on the fly. If your DOS session is running full-screen, press Alt-space bar to make it a windowed session. Then select the Control-menu box in the upper left corner and choose Settings. Increase the background priority as needed to give the DOS session a greater share of the system's attention.

Always Use the Latest

Device Drivers and TSRs

Microsoft is constantly improving some of the core device drivers and TSRs used to make Windows a pleasant place. Three of the most important are HIMEM.SYS, EMM386.EXE, and SMARTDRV.EXE. These must always be up-to-date for you to get the most from Windows. The rub is that both DOS and Windows come with these files, so you should use whichever versions of the files have the latest date. If you've just upgraded DOS, then the DOS version of the files would probably be the most recent.

Manage Your Memory

Windows needs oodles of extended memory to run properly. You should configure your PC so that all of its excess memory is of the extended type. To do this and to get the most from Windows, you need to have a good memory manager installed. DOS 5 and 6 come with the programs to do this job, and third-party programs such as QEMM/386 and 386Max are more than up to the task.

With DOS 6, you prepare memory by running the MemMaker program. QEMM/386 uses the Optimize utility, and 386Max has a program called Maximize. These utilities will configure your PC's memory to work best with Windows by controlling extended memory and loading device drivers and TSRs into upper memory, thereby saving precious conventional memory for those programs that need it. This is all complex and heady stuff, but the memory configuration programs make it painless - and a chore you may need to do only once.

Use SMARTDrive or a

Similar Disk-caching

Program

Next to the printer, your disk drives are probably the slowest things Windows has to contend with. Even though your hard drive may be slippery fast, it can be made to work even faster by installing a disk-caching program. DOS comes with such a program, SMARTDRV.EXE, the SMART-Drive disk cache. Third-party disk caches are also available.

The disk cache you use will improve disk operations by storing disk information in memory. Since most information on the disk is read repeatedly, the disk cache speeds up operations by having Windows read the information from memory instead of the relatively slower hard drive. This can improve Windows' performance drastically - especially on systems with ancient hard drives.

Avoid RAM Drives

RAM drives are handy tools for speeding up some DOS programs, and they make wonderful temporary storage areas. However, when you use Windows, the memory you sacrifice to a RAM drive is wasted.

Windows craves memory. It eats it all up and then wants more. Whatever memory you devote to a RAM drive is lost to Windows.

The only exception here is if you have a ton of RAM - 16MB or more. If so, then you can spare memory for a RAM drive. Even then, Windows would probably rather have all the memory for itself.

Avoid DOS Device

Drivers and TSRs

Some of the device drivers and memory-resident programs you load in CONFIG.SYS or AUTOEXEC.BAT may be unnecessary for Windows - hogging memory that Windows would rather have for itself.

For example, there is no need to load the ANSI.SYS device driver when you use Windows. The command line-editing program Doskey isn't needed. Windows comes with its own mouse driver, so any MOUSE.SYS or MOUSE.COM commands can be resected as well. And if you're using the SMARTDrive disk cache, you can dispense with the Fastopen command. Just edit these lines from your CONFIG.SYS or AUTOEXEC.BAT file, and Windows will gladly gobble the memory they took.

There is an exception to this rule. If you run a DOS program in Windows and it requires a TSR, such as the mouse driver, then you should load it before Windows starts. However, if DOS programs are a thing of the past for you, then definitely get rid of the excess baggage.

Create a Permanent

Swap File

Windows runs best in the enhanced mode, its preferred modus operandi for 386 and 486 PCs. And it runs better if you've created a permanent swap file, which Windows can use to boost your overall memory situation.

The permanent swap file is a large file on disk that Windows uses for storing information. You create it from the Control Panel; start the Control Panel and click on the 386 Enhanced icon and then the Virtual Memory button. If you have a permanent swap file already, statistics about it will appear on the screen. Otherwise, click on the Change button to create a permanent swap file for your system.

A good permanent swap file should be about 2MB in size. If you have a lot of memory in your PC (8MB or more) or you run complex graphics programs, consider a larger permanent swap file (say, 4MB).

Optimize Your Hard

Drive

Regularly optimizing or defragmenting the hard drive will improve any PC's performance, especially a Windows system. The idea is to check all the files on your hard drive and patch up any that are fragmented. Files get fragmented as DOS tries to make the best use of disk space; larger files are split into smaller pieces to fit on the disk. It means you can store more stuff, but the fragmented files take longer to save and load since DOS has to keep track of the pieces.

Optimizing your hard drive is done in two steps, both of which should be accomplished before you start Windows. The first is to run DOS's Chkdsk program. This checks for lost clusters on the hard drive. If Chkdsk finds any, run the command again, but specify the optional /f switch. Then delete all the FILE*.CHK files Chkdsk recovers. (You'll probably want to delete them. The odds against their containing useful data are astronomical. When in doubt, load them into a text editor before deleting them.) After that, run a defragmentation program, such as Norton's SpeedDisk, PC Tools'Compress, or DOS 6's Defrag.

It's important to note that optimization isn't voodoo. It doesn't automatically make your PC run faster. Before you optimize, check the percentage of fragmented files. If it's below 10 percent, optimization isn't necessary.

Avoid Starting Too

Many Applications

with Windows

A lot of Windows utilities may automatically start-themselves when Windows starts. When this happens, it takes you longer to get to work, since Windows spends a goodly amount of time running all those utilities and other programs. The way to stop this is either to remove some of the programs from the Program Manager's StartUp group or to edit the WIN.INI file and remove some of the files in the [Windows] section by the load= and run= prompts. The second method requires a little more Windows savvy, so you might want to consult with a guru before attempting it.

Note that some of the programs automatically loaded by Windows may be very necessary. For example, a screen saver or font manager is a good thing to have loaded. But starting the Clock or File Manager or other tools just slows down Windows.

Run Your Applications

Full-Screen

Windows is about, well, windows. Your applications run in their own windows on the screen. And while' it's fun to see both Excel and Ami Pro at the same time, it's more work for Windows to keep everything sane. You'll find your applications run better when they're maximized to fill the entire screen. (Another benefit of running your applications full-screen is that you see more of your work.) To do this, click on the Maximize button (the up-pointing triangle) in the upper right of every application window. Or drop down the Control menu (on the upper left of every application window) and select the Maximize item.

If You're Running

Only One Windows

Application, Run It in

Standard Mode

Quite a few Windows PCs are set aside to do only one thing. Some may be running just WinWord or another word processor. Others may be order entry workstations running a database. If so, you'll see an improvement in performance if you start Windows in standard mode; type win /s at the DOS prompt to select standard mode.

The advantage here is that Windows runs without loading the overhead it needs to work with multiple programs in enhanced mode.

Close Applications

You're Not Using

You don't have to quit a program to stop using it in Windows. If you tire of WinWord, you can minimize the program and switch over to your Games group for another two hours of Solitaire. Then you can easily switch back to WinWord when the boss lumbers by. While this is what multitasking is all about, having WinWord running drains power from Windows.

Some users will have a whole row of minimized applications lined up at the bottom of the desktop. Each of those applications draws on Windows' resources, impeding system performance. If you're truly going to stop work on a program, then exit it instead of switching away.

Use a Plain Desktop

Pattern

Falling leaves, interlocking Escher patterns, and comic-book heroes often provide the backdrop for Windows' desktop. But these graphics occupy memory and take time to paint on the screen. If you're willing to sacrifice beauty for performance, then use the Control Panel's Desktop item to give Windows a plain background. This uses less memory and makes Windows screen redraws faster.

Switch to Lower-Resolution

Graphics

Just because your SuperDooperVGA card can support a zillion-by-zillion graphics resolution doesn't mean you have to use it. The higher resolutions Windows supports use more system resources and take longer for Windows to manage. To recover some of your performance losses, switch Windows to a lower graphics resolution, which is probably supported by your video hardware. In fact, the boring old VGA resolution is the fastest of the lot. It's also easier to read a 640 x 480 or 800 x 600 screen than screens of higher resolution (particularly if your eyes are over 40).

Print to a Networked

Printer

The slowest part of any computer setup is the printer. No matter how fast the printer, data slows to a crawl as it's transferred to paper. One solution is to use the Print Manager to handle printing. But better than that is to print to a network printer. You'll see files virtually fly off the screen, seemingly printing in an instant. Don't get too excited, however. Your printout is just waiting elsewhere on another computer that's having to toil with printing. But in the meantime, you've wrested control of Windows and can get on with something else. (Needless to say, this trick doesn't work if you don't have a network or a network-designated printer.)

Reinstall Any Windows

Program Without

Running Setup

There are many times when you need to reinstall just one program, file, or group of files from the Windows distribution disk. You usually can't do this without reinstalling all of Windows again.

The solution is to decompress the files on the Windows distribution disks.

1. Find the EXPAND.EXE program on the Windows distribution disks. (It will probably be on disk 1 or 2.) 2. Copy EXPAND.EXE to your WINDOWS subdirectory. 3. You'll notice that most of the other files on the disk have extensions that end with an underscore (for example, WINHELP.EX_, MOUSE.DR_, and so on). These are compressed files. (Note that in early versions of Windows, the compressed files ended in EXE, but they were not executable.) 4. To decompress one of these file (for example, WINHELP.EX_), type expand a:winhelp.ex_c:\windows\winhelp.exe. C:\WINDOWS\WINHELP.EXE is the executable file you're creating.

Run a Specific

Recorder Macro

Many times, you want to run Recorder and have a specific macro execute. You won't use it often, but Recorder has a hot-key switch.

1. Make sure your macro specifies a hot key. 2. On the command line, put recorder -h hot key filename.ext, where filename.ext is the name of the Recorder macro and hot key is the key combination that normally runs the macro.

For the hot key, use the following symbols, plus the key name. Key Symbol Alt % Ctrl c Shift +

For example, if your hot key is Shift-F10 and your macro file is named MYMACROS.REC, you would type recorder -h+f10 mymacros.rec.

Create New Colors

Most people don't know the RGB values for colors, even the basic ones, and when you need to supply the RGB value for a color, you usually find yourself behind the eightball (RGB value 0, 0, 0). The solution is to use the color selector in Control Panel.

1. Run Control Panel and double-click on the Color icon. 2. Press the Color Palette button and press the Define Custom Colors button. 3. In the Custom Color Selector dialog box, you'll see a matrix of all of the available system colors. You can select one with the mouse and see its RGB values in the three text boxes on the right side of the dialog box. When you find the color you want, simply write down its RGB value. 4. When you're finished using the Custom Color Selector, click on Close and Cancel.

You can use these RGB values to specify colors in Windows Paintbrush, for example. Double-click on a color in the palette and enter the RGB values in the dialog box that appears.

Delete Unnecessary

Files

Windows requires a large investment in disk space, which you may not be able to afford. You can ease this problem by deleting unnecessary files.

1. Run File Manager and move to your WINDOWS subdirectory. 2. You can safely delete any of the following files, provided you don't need the applications.

*.BMP (These are bitmap files - probably wallpaper.) *.SCR (These are screen saver files.) CALC.EXE, CALC.HLP (Calculator and its help file) CALENDAR.EXE, CALENDAR.HLP (Calendar and its help file) CARDFILE.EXE, CARDFILE.HLP (Cardfile and its help file) CLOCK.EXE (Clock) MSDOS.EXE (the MS-DOS executive) PBRUSH.EXE, PBRUSH.DLL, PBRUSH.HLP (Paintbrush, its DLL, and its help file) RECORDER.EXE, RECORDER.DLL, RECORDER.HLP (Recorder, its DLL, and its help file) REVERSI.EXE, REVERSI.HLP (Reversi game with its help file in Windows 3.0) WINMINE.EXE, WINMINE.HLP (Minesweeper game with its help file in Windows 3.1) SOL.EXE, SOL.HLP (Solitaire game with its help file) TERMINAL.EXE, TERMINAL.HLP (Terminal and its help file) WRITE.EXE, WRITE.HLP (Write and its help file)

Edit PROGMAN.INI

Here's the scenario: Windows boots, and one or all of your groups are lost. You can fix problems like this if you know how to edit PROGMAN.INI.

1. Run Notepad and load PROGMAN.INI (you'll find it in your WINDOWS subdirectory). 2. The file has two sections, [Settings] and [Groups], with the following form.

[Settings] Window=.4 0 801 528 1 SaveSettings=1

[Groups] Order= 7 1 5 4 3 2 8 Group1=C:\WINDOWS\MAIN.GRP GROUP2=C:\WINDOWS\ACCESSOR.GRP GROUP3=C:\WINDOWS\GAMES.GRP GROUP4=C:\WINDOWS\STARTUP.GRP GROUP7=C:\WINDOWS\UTILITIE.GRP GROUP5=C:\WINDOWS\QCWIN.GRP GROUP8=C:\WINDOWS\APPS.GRP GROUP9=C:\WINDOWS\WPW51US.GRP

3. If your groups are still in your WINDOWS subdirectory but they don't appear in PROGMAN.INI, simply add them, following the form Groupn=C:- \WINDOWS\GROUPNAME.GRP, where n is the number of the group.

Re-create Windows

Default Program

Groups and Icons

It's often necessary to know the default arrangement Windows used when it installed your groups and icons. The solution: Run Setup with the /p parameter.

1. From Program Manager, choose File, Run, and type setup/p. 2. Click on OK.

Running Setup/p will re-create your default groups and icons, but if there are just a few items out of place, you may want to do it yourself. Here are the groups and icons Windows 3.1 installs. Main MAIN.GRP

File Manager WINFILE.EXE Control Panel CONTROL.EXE Print Manager PRINTMAN.EXE Clipboard CLIPBRD.EXE MS-DOS Prompt DOSPRMPT.PIF Windows Setup SETUP.EXE PIF Editor PIFEDIT.EXE Read Me README.WRI

Accessories ACCESSOR.GRP

Write WRITE.EXE Paintbrush PBRUSH.EXE Terminal TERMINAL.EXE Notepad NOTEPAD.EXE Recorder RECORDER.EXE Cardfile CARDFILE.EXE Calendar CALENDAR.EXE Calculator CALC.EXE Clock CLOCK.EXE Object Packager PACKAGER.EXE Character Map CHARMAP.EXE Media Player MPLAYER.EXE Sound Recorder SOUNDREC.EXE

Games GAMES.GRP

Solitaire SOL.EXE Minesweeper WINMINE.EXE

Startup ISTARTUP.GRP

Initially, there are no files in the StartUp group.