WINEXT.EXE Fran Finnegan June 25, 1991 (Utilities) Purpose: WINEXT is designed to extend the association power of File Manager, the MS-DOS Executive and Program Manager. Be sure that WINEXT is on your PATH. Although for special purposes you might want to run WINEXT directly from the Program Manager, it is normally invoked by being included in the entries in the WIN.INI [Extensions] section. Format: The full syntax for WINEXT within the WIN.INI is: INSERT 2(12)--3 lines INSERT 2(12)--3 lines INSERT 2(12)--3 lines ext=winext.exe [?] d:\path d:\path\program.ext [arguments] ^.ext [arguments] Remarks: As previously, ext is the extension of a data file. The optional ? parameter option causes WINEXT to bring up a message box that displays the ext= entry and the new command line and gives you a chance to cancel the command before it is executed. This is useful when you are adding and/or modifying your [Extension] entries in WIN.INI. Once you are comfortable with how WINEXT operates you can then simply delete the ? parameter from your ext= lines. The d:\path section of the syntax specifies the drive and directory in which you wish to be when the program has been started and loaded with its associated data file. Note that the d:\path start-up drive/directory may be . or .. , which will have the effect, respectively, of keeping you in the directory containing the data file or of changing to its parent directory. If you enter an invalid path, WINEXT will warn you in a message box. The d:\path\program.ext specifies the drive, directory, and name of the program you want to associate with the data file's extension. The program may be any DOS or Windows executable file or a batch file. (.PIF files have their own way of doing what WINEXT does, so they aren't relevent here.) If program does not contain an extension, then .EXE is assumed by Windows. If the program is not preceded by a drive and/or directory path, Windows will search for it in the following order: the current working directory (which is now d:\path, since WINEXT switched to it); the Windows directory; the Windows \SYSTEM directory; the directories listed in the PATH environment variable; and the list of directories mapped in a network. The optional arguments parameters (in both places in the syntax) are any parameters peculiar to the application specified that you may want to include. These would be used for compiler switches or compression/decompression utilities, for example. Putting double-quotes ( " ) around arguments causes a group of arguments to be considered as a single argument. For the ^.ext portion of the WINEXT syntax you can do one of three things. First, you can simply replace the .ext with the data file extention, as in a normal WIN.INI file (see Figure 1). Because WINEXT has been loaded, however, when you double-click on a file with the associated ext in File Manager or the MS-DOS Executive, WINEXT remembers the current directory the data file is in, but switches to the drive and directory specified by d:\path. Note that if WINEXT does not detect a qualified filespec (one that includes a drive or path), it prepends the current directory containing the data file. This assures that all applications started by WINEXT will receive a fully- specified data filename. Second, for the ^.ext you can use the caret alone, with no data file extention specified. This will cause the data file extension to be stripped off. This is useful when dealing with programs (AUTOCAD, for example) that do not require extensions on the command line or that may indeed not work properly if the data file extension is present. (If you have a particular need, you might even supply an ext that is different from your data file's extension.) Third, you can use * in place of ^.ext to tell WINEXT not to include any data filename on the command line. This option is particularly useful if you want to use WINEXT as a program item in a program group of Program Manager, as will be shown in the examples below. Note that in order to use the caret (^) by itself, or to add arguments after the ^ or ^.ext, or to use the asterisk (*) and no filename, you must manually edit your WIN.INI file. You can use the System Configuration Editor, Notepad or a plain ASCII text editor. (Remember too that you must restart Windows in order for the WIN.INI changes to take effect.)