Consider the following scenario. You use the installer tool (Installutil.exe) to install an assembly. The assembly is located on a remote computer. You have the read-only NTFS file system permission on the remote computer. When you run the installer tool, you receive the following error message:
An exception occurred during the Install phase.System.UnauthorizedAccessException: Access to the path 'Path\AssemblyName.InstallState' is denied.
The InstallUtil.InstallLog file can be redirected to a specified location by using a command parameter. However, the AssemblyName.InstallState file cannot be redirected. The AssemblyName.InstallState file is written to the same directory location as the location of the assembly. If you do not have the write permission on the directory, this problem occurs.
A supported hotfix is now available from Microsoft. However, it is intended to correct only the problem that this article describes. Apply it only to systems that are experiencing this specific problem.
To resolve this problem, contact Microsoft Customer Support Services to obtain the hotfix. For a complete list of Microsoft Customer Support Services telephone numbers and information about support costs, visit the following Microsoft Web site:
Note In special cases, charges that are ordinarily incurred for support calls may be canceled if a Microsoft Support Professional determines that a specific update will resolve your problem. The usual support costs will apply to additional support questions and issues that do not qualify for the specific update in question.
You must have the Microsoft .NET Framework 2.0 Service Pack 1 installed to apply this hotfix.
You do not have to restart the computer after you apply this hotfix.
Hotfix replacement information
This hotfix does not replace a previously released hotfix.
The English version of this hotfix has the file attributes (or later file attributes) that are listed in the following table. The dates and times for these files are listed in Coordinated Universal Time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time item in Control Panel.
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.
After you apply this hotfix, you can redirect the AssemblyName.InstallState file by using a command parameter. For example, run the following command to redirect the AssemblyName.InstallState file:
Note When you use the command parameter, consider the following. If you add a trailing backslash at the end of the path and use quotation marks to enclose the path, the trailing backslash can negate the trailing quotation mark. For example, the following command is incorrect:
For more information about a similar problem that is fixed in this hotfix, click the following article number to view the article in the Microsoft Knowledge Base:
934388 An .installstate file is not removed after you uninstall a .NET Framework 2.0-based application
To resolve the problem that is described in Microsoft Knowledge Base article 934388, follow these steps:
In Visual Studio 2008, open the setup project for the assembly.
Specify the following parameter in the CustomActionData property of each managed custom action:
Note After you do this, the .InstallState file will be saved to the target directory that you specified in the CustomActionData property. This guarantees that the .InstallState file is removed at uninstall time.
Install this hotfix on all target computers where the assembly will be installed.
Note We recommend that you also install the hotfix on the development computer for testing.
Install the assembly.
Note Make sure that you add a trailing backslash at the end of the parameter. This is because the target directory will be resolved to a directory that ends in a backslash and that is enclosed in quotation marks. As we mentioned previously, the trailing backslash can negate the trailing quotation mark. Therefore, you must add a trailing backslash at the end of the parameter so that the target directory will be resolved to a directory that ends in a double backslash.
For more information about the installer tool, visit the following Microsoft Developer Network (MSDN) Web site: