Working with .INF Files
In addition to using the Windows® Internet Explorer® Administration Kit 9 (IEAK 9), batch files, command-line switches, and third-party applications to customize Setup, you can create custom setup solutions by using Setup information (.inf) files. The .inf files enable you to use the built-in Microsoft® Windows Setup Engine to automate setup tasks. This section describes .inf files, and discusses how you can use these text files to customize your component installations.
Customizing installations by using .inf files
IEAK 9 uses .inf files to provide installation instructions that control how custom Internet Explorer 9 packages will run on Windows.
For instructions for working with .inf files, see Setup Information Files.
In addition to installation instructions, you can provide instructions for uninstalling components as part of your custom .inf files. In Control Panel, click Add or Remove Programs, and then add a section that removes the files, registry entries, and shortcuts. This section then adds your component to the list of programs that can be uninstalled. To add your component to the Add or Remove Programs dialog box, add a new key and values under the following registry keys:
- "description" is the string that is displayed in the Add or Remove Programs list box.
- "command-line" is the command that runs when the component is selected from the Add or Remove Programs list box. To run a section in an .inf file, you can use Setupx.dll InstallHinfSection.
|Your installation script must copy the .inf file to the Windows\Inf folder when your component is installed. This is the default location searched when Setupx.dll InstallHinfSection is called. Your uninstall script should remove the Uninstall registry key you created. This prevents your program from showing up in the Add or Remove Programs list box after it is uninstalled.|
For more information about the Internet Component Download service, see the article: http://go.microsoft.com/fwlink/?LinkId=157953.
Limitations of .inf files
The following limitations apply to .inf files:
You cannot delete a directory.
The RenFiles entry only renames a file in its existing location. You cannot use this entry to move a file to a different location.
The CopyFiles entry only copies files from the source disk to the destination directory. You cannot use this entry to copy a file to another location on your hard disk drive.