Customizing Installation by Using .inf Files

Cc961378.chap_18(en-us,TechNet.10).gifCc961378.image(en-us,TechNet.10).gif

Although you can use the IEAK, batch files, command-line switches, and third-party programs to customize setup, you can also extend setup by using setup information (.inf) files.

Scripts based on .inf files take advantage of the setup engine built into Windows. The primary advantage of using the built-in setup engine is its smaller size. Such functions as copying files, adding registry entries, and creating shortcuts are already part of the Windows operating system. You need to ship only the .inf file and the program files you want to install. A separate script is required for each component that you want to install or uninstall.

Note that a Windows .inf file cannot prompt the user for a destination directory - the directory must be hard-coded in the .inf file.

You can use .inf files to perform these tasks:

  • Manipulate folders and files - You can use .inf files to perform tasks such as creating folders and links in folders, creating and deleting long file names, setting attributes for files and folders, and copying files to the Program Files folder.

  • Extend Windows 32-bit setup - You can extend Windows Update Setup for Internet Explorer 5 and Internet Tools by using the Run command (Rundll.exe or Rundll32.exe) to run .inf files from the command line. To do this, you would install optional Windows software components by using 32-bit program code, and then create an icon on the Windows desktop that the user can click to run an .inf file. For more information about these methods, see "Extending Setup" later in this chapter.

  • Provide uninstall functionality - To provide uninstall functionality in your .inf files, you would add an installation section that removes the files, registry entries, and shortcuts for your program. The .inf file would also add your component to the list of programs that can be uninstalled from the Add/Remove Programs dialog box in Control Panel. An example is included in the Inf folder of the IEAK Toolkit.

  • Use RunOnce technology - The RunOnce registry key enables you to run a program one time in Windows. You can specify how much interaction occurs between the program and the user.

For more information about .inf files, see Appendix H , "Structural Definition of .inf Files."

.