## The FASTINST Sample

The FASTINST Sample accompanies Chapter 15 and illustrates how to write a simple setup program for Windows XP or Windows 98/Me. The real purpose of FASTINST is to allow you (and me!) to quickly install a sample driver.

The sample includes two components:

- FASTINST.EXE is a Windows XP setup program that installs the first (or only) device in a specified INF file.
- FASTINST.EXE (WIN98/Me subdirectory) is a Windows 98/Me setup program that installs the first (or only) device in a specified INF file.

### Building FASTINST

To build the Windows XP version of FASTINST.EXE, follow the general instructions for building user-mode programs. The Microsoft Visual C++ project file is named FASTINST.DSP.

To build the Windows 98/Me version of FASTINST.EXE, use a 16-bit compiler such as Microsoft Visual C++ version 1.52. The project file is named WIN98/Me\FASTINST.MAK.

### Using FASTINST

You can invoke FASTINST from a Windows XP command prompt, as follows:

C:\WDMBOOK\Chap15\FastInst\debug>fastinst infpath [devid]

where infpath is the pathname of the INF file you want to install and devid is an optional device identifier. If you omit the devid parameter, FASTINST installs the first (or only) device in the file. If you supply the devid parameter, FASTINST will install the designated device.

Note that the progress dialog you see while FASTINST executes is a fake (driven by a timer) designed to reassure you that something is happening during the sometimes time-consuming process of installing a driver.

In Windows 98/Me, use the 16-bit version instead, like this:

C:\WDMBOOK\Chap15\FastInst\win98>fastinst infpath [devid]

I recommend, however, that you follow the general instructions for using FastInst to setup a context menu command that you can use from Explorer.

### What to look for

FastInst.cpp is the main program for this application. Don't overlook the 16-bit version in the win98 directory.