This section describes how to optimize access to applications by configuring elements of the Active Desktop. It also discusses how to associate specific file types with applications and how to optimize the performance of MS-DOS-based applications.
To open an application when you double-click a related file, the file’s type must be defined in the registry. If the file type is defined in the registry, it appears in a list of file types that you can associate with applications.
For any standard Windows-based application, file types are automatically associated with the application when you install the application on your computer. You can use the following procedure to associate a file type with a different application. For example, if you wanted to make Internet Explorer open all GIF files, you could use this procedure to associate Internet Explorer with GIF files.
To associate a file type with an application
Some applications, such as Microsoft Word, associate multiple extensions with a file type. For example, a Microsoft Word document is associated by default with either a .doc or an .rtf extension. This can cause problems if a user wants to change which application opens a particular file. To re-associate a file type with an application under these conditions, follow the preceding procedure to delete all extensions registered to that application on the File Types tab, and then re-associate each file type with an application. In addition, you must redefine Open, Print, and Dynamic Data Exchange (DDE) actions for each file type.
The New shortcut menu shows a list of options, such as Folder, Shortcut, Text Document, and Microsoft Word Document. It appears when you click File and then point to New in Windows Explorer, or when you right-click the Active Desktop and then point to New on the shortcut menu. Clicking an object on the New shortcut menu creates that new object in Windows Explorer or on the desktop. You can add an object to this list by adding a key called ShellNew to the corresponding file extension in the registry for the related file name extension:
Hkey_Classes_Root\.ext
After creating the ShellNew key, add a new string value called FileName with a data value that equals the path of a template file in the ShellNew subdirectory. For example:
filename="c:\windows\shellnew\excel.xls"
The Windows 98 Active Desktop lets you simplify a user’s access to applications by customizing the Active Desktop Start and Programs menus. You can also create new toolbars containing only the applications and documents that you use most often.
You can also customize many other Active Desktop elements, such as channel bars, folders, and Active Desktop items. For more information about customizing the Active Desktop, see Chapter 6, "Configuring the Active Desktop and Active Channels."
Note
Windows 98 adds your most recently used documents to Documents on the Start menu. However, documents opened in an application that is not Win32-based do not appear. Win16-based documents are added to the list only if you double-click the document’s icon in Windows Explorer or My Computer.
Windows 98 configures conventional memory as do earlier versions of Windows, allowing MS-DOS-based applications to run smoothly in Windows 98. For more information about how Windows 98 makes system memory available to MS-DOS-based applications, see Chapter 26, "Performance Tuning."
The Apps.inf file in Windows 98 (in the \Windows\Inf directory) contains a section named [PIF95] that acts as a master list of settings for MS-DOS-based applications. Each line in this section corresponds to a subsequent entry in Apps.inf that contains information about running that specific application. Table 25.1 explains these entries.
Each entry in the [PIF95] section uses the following syntax:
app file=%title%, icon file, icon num, set working, section, other file, set pif
Table 25.1 Syntax of [PIF95] entries in Apps.inf
Entry | Meaning |
---|---|
app file | The file name, with extension, of the application’s executable file. |
title | The name that appears in the application’s title bar. The string identifier must appear in the [Strings] section of the INF file, set to the quoted name of the application. |
icon file | The file from which to extract the application’s icon. |
icon num | The number from the icon extraction table. The default is 0. |
set working | Allows Windows 98 to set the working directory automatically to the one that contains the executable (0, the default) or prevents it from doing so (1). |
section | The name of the corresponding section in Apps.inf that contains details about this application. |
other file | The key file within a directory for this application, used when two app file entries are identically named. |
set pif | The value allowing (0, the default) or preventing (1) creation of a PIF file for this application. |
Following the [PIF95] section are sections for each application listed in [PIF95]. Each application section includes entries that define any parameters, required memory or other options, and options that can be enabled or disabled for that application. For example:
[WORD.EXE]
LowMem=384
Enable=cwe
Disable=win,bgd,asp
The Enable= and Disable= entries use the abbreviations shown in Table 25.2. To separate multiple entries, use commas.
Table 25.2 Abbreviations used in Enable= and Disable= [PIF95] entries in Apps.inf
Entry | Meaning | Entry | Meaning |
---|---|---|---|
aen | ALT+ENTER | eml | EMS memory locked |
aes | ALT+ESC | ems | EMS memory |
afp | Allow fast paste | emt | Emulate ROM |
aps | ALT+PRINT SCREEN | exc | Exclusive mode |
asp | ALT+SPACE | gmp | Global memory protection |
ata | ALT+TAB | hma | Use HMA |
awc | Automatic window conversion | lml | Low memory locked |
bgd | Background | mse | Mouse |
cdr | CD-ROM | net | Network |
ces | CTRL+ESC | psc | PRINT SCREEN |
cwe | Close on exit | rvm | Retain video memory |
dit | Detect idle time | rwp | Run Windows applications |
dos | Real mode | win | Run in a window |
dsk | Disk lock | xml | XMS memory locked |
In addition to the information contained in the Apps.inf file, you can set unique properties for individual MS-DOS-based applications. You may want to do this to customize the way an application runs or to reset default properties used by Windows 98 that do not work correctly.
An application’s settings are recorded in its program information file (PIF). Windows 98 has no separate PIF Editor. To configure an application, right-click the application’s executable file, and then click Properties. Any settings you change in the Properties dialog box are recorded in the PIF file.
Windows 98 first searches for a PIF file in the directory that contains the executable file you are starting. If Windows 98 cannot find a PIF file there, it searches the \Windows\PIF directory. If there is no PIF file in the \Windows\PIF directory, Windows 98 searches the path specified in Autoexec.bat. If no PIF file is found, Windows 98 searches the Apps.inf file for a match.
If Windows 98 does not find an entry for an application in Apps.inf, it uses default settings for the application. If you replace Windows 3.1 with Windows 98, a _default.pif file remains in the directory. In this case, Windows 98 uses information in the _default.pif file to create a PIF file for the application.
If you do not have a _default.pif file and want to create one, you can do so by copying Dosprmpt.pif to _default.pif.
Regardless of how the settings for an application are initially established, you can change them by right-clicking the application’s executable file and then clicking Properties.
Windows 98 provides a flexible environment for running MS-DOS-based applications, even those that must have exclusive access to system resources. Almost all MS-DOS-based applications should run under Windows 98. For MS-DOS-based applications that need sole access to computer resources, Windows 98 offers MS-DOS mode.
When an MS-DOS-based application starts in MS-DOS mode, Windows 98 removes itself from memory (except for a small stub) and provides the application with full access to all the computer’s resources. Before running an application in this mode, Windows 98 ends all running tasks, loads a real-mode copy of MS-DOS, and uses customized versions of Config.sys and Autoexec.bat to run the application. After you quit the MS-DOS-based application, Windows 98 restarts and returns to the Windows 98 user interface.
MS-DOS mode is intended for applications that will not otherwise run in Windows 98. It does not necessarily improve the performance of MS-DOS-based applications that will run in Windows 98.
To configure an MS-DOS-based application to run in MS-DOS mode
If an MS-DOS-based application, such as a game, performs badly because of insufficient memory or a lack of appropriate drivers, you can try the following:
To adjust the amount of memory available to an MS-DOS-based application
The following procedure describes how to create a custom PIF file for an MS-DOS-based application. Windows 98 includes two sample PIF files in the \Windows directory.
To create a custom startup configuration for an MS-DOS-based application
Note
Windows 98 automatically provides expanded memory for MS-DOS-based applications that require it to run. Windows cannot provide this memory, however, if you include a statement in Config.sys that loads Emm386.exe with the noems parameter. When you include Emm386.exe in Config.sys, use the ram parameter or use the x=mmmm-nnnn statement to allocate enough space in the upper memory area for Windows 98 to create an EMS page frame.
In Windows 98, the properties sheets replace PIF Editor, which was used in versions of Windows earlier than Windows 95 to optimize settings for MS-DOS-based applications.
To view or modify the properties settings for an MS-DOS-based application
For specific information about the options on each tab of the Properties dialog box, click the Quick Help button in the upper right of the tab, and then click the option you want to learn more about.
You can set the path for a specific MS-DOS-based application that runs in MS-DOS mode using the following procedure.
To specify a path for an MS-DOS-based application that runs in MS-DOS mode
Note
For MS-DOS-based applications that do not run in MS-DOS mode, you can set only a working directory.
You can set a global path for all MS-DOS-based applications by adding a path statement to Autoexec.bat. You can also write a batch file that sets a path for an MS-DOS-based application. For example:
path=%path%;c:\utils;c:\norton
After you write the batch file, carry out the following procedure to ensure that Windows runs it before starting your MS-DOS-based application.
To run a batch file before starting an MS-DOS-based application
Running Games In most cases, MS-DOS-based games run under Windows 98 with no special adjustments. Most popular games are listed in the Windows 98 Apps.inf file. You do not need to specify certain PIF settings because Windows 98 manages them automatically. These settings include foreground and background priorities, exclusive priority, video memory usage, and video port monitoring. If you run a game that uses graphics modes, and Windows 98 fails to run it in a full screen, press ALT+ENTER. To run the game in a full screen every time you start it, right-click its executable file, and then click Properties. Click the Screen tab, and then in the Usage area, click Full-screen. You can also use the Properties dialog box to adjust other settings that improve performance. |