Starting with the .NET Framework version 2.0, the 32-bit version of the common language runtime (CLR) continues to ship with only the 32-bit version of the Installer tool, but the 64-bit version of the CLR ships with both a 32-bit and a 64-bit version of the Installer tool. When using the 64-bit CLR, use the 32-bit Installer tool to install 32-bit assemblies, and the 64-bit Installer tool to install 64-bit and Microsoft intermediate language assemblies. Otherwise, both versions of the Installer tool behave the same.
Microsoft .NET Framework applications consist of traditional program files and associated resources, such as message queues, event logs, and performance counters that must be created when the application is deployed. You can use an assembly's installer components to create these resources when your application is installed and to remove them when your application is uninstalled. Installutil.exe detects and executes these installer components.
You can specify multiple assemblies on the same command line. Any option that occurs before an assembly name applies to that assembly's installation. Options specified for one assembly apply to any subsequent assemblies unless the option is specified with a new assembly name.
If you run Installutil.exe against an assembly without specifying any options, it places the following three files into the assembly's directory:
-
InstallUtil.InstallLog
Contains a general description of the installation progress.
-
assemblyname.InstallLog
Contains information specific to the commit phase of the installation process. For more information about the commit phase, see the Installer.Commit Method.
-
assemblyname.InstallState
Contains data used to uninstall the assembly.
Installutil.exe uses reflection to inspect the specified assembly and find all Installer types with the RunInstallerAttribute set to true. The tool then executes either the Install Method or the Uninstall Method on each instance of the Installer type. Installutil.exe performs installation in a transactional manner; if one of the assemblies fails to install, it rolls back the installations of all other assemblies. Uninstall is not transactional.
Installutil.exe can not install or uninstall delay signed assemblies, but can install or uninstall strong named assemblies.
Note that you cannot deploy a Windows service created using C++ with Installutil.exe. Installutil.exe cannot recognize the embedded native code that is produced by the C++ compiler. If you attempt to deploy a C++ Windows service with Installutil.exe, an exception such as BadImageFormatException will be thrown. To work with this scenario, move the service code to a C++ module. Then, write the installer object in C# or Visual Basic.