.NET Framework 的相关问题
2011-08-11 03:42
某软件依赖.NET Framework 1.1,不小心装上了2.0版本后该软件不可用
卸载2.0版本后1.1装不上,通过微软在线帮助,卸载了1.1,重新安装后恢复。
过程比较复杂,相关操作都需要手动完成,涉及到删除注册表项、删目录、删dll等等
相关资料如下:
How to manually remove and then reinstall the.NET Framework 2.0:
http://support.microsoft.com/kb/908077
文中节选:
This step-by-step article describes how to troubleshoot issues that you may experience when you install the .NET Framework 2.0.
When Microsoft Windows Installer is incorrectly registered in the Windows registry, the .NET Framework 2.0 Setup program cannot access some Windows Installer components. This article discusses how to work around this issue by unregistering and then reregistering Windows Installer.
You may not always be able to completely remove the .NET Framework 2.0 by using the Add/Remove Programs tool in Control Panel. This article also discusses how to work around this issue either by repairing the .NET Framework 2.0 or by manually removing the .NET Framework 2.0 from the computer and then reinstalling the .NET Framework 2.0.
Back to the top
Requirements
The following list outlines the recommended hardware, software, network infrastructure, and service packs that you need:
Microsoft Windows Server 2003, Microsoft Windows 2000 Service Pack 3 (SP3), or Microsoft Windows XP Service Pack 2 (SP2)
Microsoft .NET Framework 2.0.
To obtain the Microsoft .NET Framework Version 2.0 Redistributable Package (x86), visit the following Microsoft Web site:
http://www.microsoft.com/downloads/details.aspx?familyid=0856EACB-4362-4B0D-8EDD-AAB15C5E04F5
To obtain the Microsoft .NET Framework Version 2.0 Redistributable Package (IA64), visit the following Microsoft Web site:
http://www.microsoft.com/downloads/details.aspx?familyid=0856EACB-4362-4B0D-8EDD-AAB15C5E04F5
Note To troubleshoot .NET Framework 2.0 installation issues, you must use an account that is in the Local Administrators group on the computer that is running the .NET Framework 2.0.
This article assumes that you are familiar with the following topics:
Microsoft .NET Framework 2.0
Registry Editor
Windows Installer
Back to the top
Unregister and then reregister Windows Installer
This action corrects most situations. Additionally, this action does not affect any currently installed programs that use the Windows Installer.
Unregister Windows Installer. To do this, click Start, click Run, type msiexec /unregister in the Open box, and then click OK.
Reregister Windows Installer. To do this, click click Start, click Run, type msiexec /regserver in the Open box, and then click OK.
Back to the top
Repair the .NET Framework 2.0
The following are three ways to repair the .NET Framework.
Use the Repair command on the Windows Installer cache file
To repair the .NET Framework 2.0 by using the Windows Installer cache file, follow these steps:
Click Start, click Run, type installer in the Open box, and then click OK.
On the View menu in Windows Installer, click Details, right-click the Name column header, and then click Comment.
Right-click the cached Windows Installer file that has the Microsoft .NET Framework 2.0 RTL x86 enu comment, and then click Repair.
After the repair process has completed, quit Windows Installer.
Run the .NET Framework 2.0 Redistributable package at a command prompt
To repair the .NET Framework 2.0 by using the command prompt, follow these steps:
Locate the Dotnetfx.exe file that you used to install the .NET Framework 2.0. To do this, use one of the following methods:
If you installed the .NET Framework 2.0 from a CD or from a DVD, insert the installation disk in the CD drive or DVD drive.
If you installed the .NET Framework 2.0 from the hard disk, download the .NET Framework 2.0 Setup program to the hard disk.
If you installed the .NET Framework 2.0 from a network drive, reconnect to the network drive.
Click Start, click Run, type cmd in the Open box, and then click OK.
At the command prompt, run the following command:
%InstallationPath%\dotnetfx.exe /t:%temp% /c:"msiexec.exe /fvecms %temp%\netfx.msi"
Note %InstallationPath% is a placeholder for the path of the Dotnetfx.exe file that you located in step 1.
Manually remove and then reinstall the .NET Framework 2.0
Important This section, method, or task contains steps that tell you how to modify the registry. However, serious problems might occur if you modify the registry incorrectly. Therefore, make sure that you follow these steps carefully. For added protection, back up the registry before you modify it. Then, you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, click the following article number to view the article in the Microsoft Knowledge Base:
322756 How to back up and restore the registry in Windows
Important These steps may increase your security risk. These steps may also make your computer or your network more vulnerable to attack by malicious users or by malicious software such as viruses. We recommend the process that this article describes to enable programs to operate as they are designed to, or to implement specific program capabilities. Before you make these changes, we recommend that you evaluate the risks that are associated with implementing this process in your particular environment. If you choose to implement this process, take any appropriate additional steps to help protect your system. We recommend that you use this process only if you really require this process.
Remove the .NET Framework 2.0 from the Windows Installer cache:
Click Start, click Run, type installer in the Open box, and then click OK.
On the View menu in Windows Installer, click Details.
Right-click the Name column header, and then click Comments.
Right-click the cached Windows Installer file that has the Microsoft .NET Framework 2.0 RTL x86 enu comment, and then click Uninstall.
After the uninstall process has completed, quit Windows Installer.
Manually delete the following from the computer. Note Depending on the current condition of the .NET Framework installation, these items may not exist on the computer.
The URTTemp folder
The Mscoree.dll file
The v2.0.50727 folder
To do this, follow these steps:
Click Start, click Run, type system32 in the Open box, and then click OK. The contents of the System32 folder appear in Windows Explorer.
Locate and then delete the URTTemp folder.
Locate and then delete the mscoree.dll file.
Note If the .NET Framework 1.1 or the .NET Framework 1.0 is also installed on the computer, and you do not intend to reinstall the .NET Framework 2.0, you must repair the .NET Framework 1.1 or the .NET Framework 1.0. For more information, see the "Repair the .NET Framework" section of the following Microsoft Knowledge Base article:
824643 How to troubleshoot Microsoft .NET Framework 1.1 installation issues in Windows XP or in Windows 2000
Click Start, click Run, type microsoft.net in the Open box, and then click OK. The contents of the Microsoft.NET folder appear in Windows Explorer.
In the Microsoft.NET folder, double-click the Framework folder.
In the Framework folder, delete the v2.0.50727 folder.
Close the Framework folder.
Manually delete the relevant registry keys:
Click Start, click Run, type regedit in the Open box, and then click OK to start Registry Editor.
In Registry Editor, locate and then delete the following registry keys.
Note Depending on the current condition of the .NET Framework installation, these registry keys may not exist on the computer.
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v2.0.50727
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\policy\v2.0
Quit Registry Editor.
Use the Windows Installer CleanUp Utility (Msizap.exe) to remove Windows Installer information from the registry. The components (Msizap.exe) of the Windows Installer Software Development Kit are included in the Microsoft Windows Software Development Kit (SDK).
The following file is available for download from the Microsoft Download Center:
Download the Windows Installer CleanUp Utility (Msicuu2.exe) package now.
For more information about how to download Microsoft support files, click the following article number to view the article in the Microsoft Knowledge Base:
119591 How to obtain Microsoft support files from online services
Microsoft scanned this file for viruses. Microsoft used the most current virus-detection software that was available on the date that the file was posted. The file is stored on security-enhanced servers that help prevent any unauthorized changes to the file.
For more information, click the following article number to view the article in the Microsoft Knowledge Base:
290301 Description of the Windows Installer CleanUp Utility
To remove Windows Installer information from the registry, follow these steps:
Click Start, click Run, type cmd in the Open box, and then click OK.
At the command prompt, locate the directory that contains the Windows Installer CleanUp Utility, and then run the following command:
Msizap TP {7131646D-CD3C-40F4-97B9-CD9E4E6262EF}
Restart the computer.
Disable all antivirus programs and all firewall programs that you have installed on the computer. To do this, use the System Configuration Utility (Msconfig.exe) to perform a clean start of your computer. Then disable any services that you do not need.
When you use the System Configuration Utility in diagnostic mode, reenable the Windows Installer Service on the Services tab.
To start the System Configuration Utility, click Start, click Run, type msconfig in the Open box, and then click OK.
Delete the contents of the Temp folder:
Click Start, click Run, type %Temp% in the Open box, and then click OK. The contents of the Temp folder appear in Windows Explorer.
In the Temp folder, click Select All on the Edit menu.
On the File menu, click Delete.
Note Delete as many files and folders as possible from the Temp folder.
Reinstall the .NET Framework 2.0. To obtain the Microsoft .NET Framework Version 2.0 Redistributable Package (x86), visit the following Microsoft Web site:
http://www.microsoft.com/downloads/details.aspx?familyid=0856EACB-4362-4B0D-8EDD-AAB15C5E04F5
To obtain the Microsoft .NET Framework Version 2.0 Redistributable Package (IA64), visit the following Microsoft Web site:
http://www.microsoft.com/downloads/details.aspx?familyid=0856EACB-4362-4B0D-8EDD-AAB15C5E04F5
Note If you do not want to reinstall the .NET Framework 2.0, and the .NET Framework 1.1 or the .NET Framework 1.0 is installed on the computer, you must repair the .NET Framework 1.1 or the .NET Framework 1.0. You must repair these installations to replace the Mscoree.dll file and the URTTemp folder.
How to troubleshoot Microsoft.NET Framework 1.1 installation issues in Windows XP or in Windows 2000:
http://support.microsoft.com/kb/824643
文中节选:
Method 1: Unregister and then reregister Windows Installer
Unregister Windows Installer:
Click Start, click Run, type msiexec /unregister, and then click OK.
Reregister Windows Installer:
Click Start, click Run, type msiexec /regserver, and then click OK.
Back to the top
Method 2: Repair the .NET Framework
There are two options to repair the .NET Framework.
Option A: Repair the .NET Framework 1.1 by using the command prompt
Locate the Dotnetfx.exe file that you used to install the .NET Framework 1.1. To do this, use one of the following methods:
If you installed the .NET Framework 1.1 from a CD or from a DVD, insert the installation disc in your CD drive or DVD drive.
If you installed the .NET Framework 1.1 from your hard disk, download the .NET Framework 1.1 Setup program to your hard disk.
If you installed the .NET Framework 1.1 from a network drive, reconnect to the network drive.
Click Start, click Run, type cmd, and then click OK.
At the command prompt, run the following command:
%InstallationPath%\dotnetfx.exe /t:%temp% /c:"msiexec.exe /fvecms %temp%\netfx.msi"
Note %InstallationPath% is a placeholder for the path of the Dotnetfx.exe file that you located in step 1.
Option B: Repair the .NET Framework 1.1 by using the Windows Installer cache file
Click Start, click Run, type Installer, and then click OK.
On the View menu in Windows Installer, click Details.
Do one of the following, depending on your operating system:
In Windows XP, right-click the Name column header, and then click Comments.
In Windows 2000, right-click the Name column header, and then click Comment.
Right-click the cached Windows Installer file that has the Microsoft .NET Framework 1.1 RTL x86 enu comment, and then click Repair.
After the repair process is complete, exit the Installer.
Back to the top
Method 3: Remove and then reinstall the .NET Framework 1.1
There are two options to remove and then reinstall the .NET Framework 1.1.
Option A: Use the .NET Framework cleanup tool (automatic method)
The .NET Framework cleanup tool will remove and then reinstall the .NET Framework 1.1 for you. For information about how to obtain and to use this tool, visit the following MSDN Web site:
http://blogs.msdn.com/astebner/archive/2005/12/10/502439.aspx
The third-party products that this article discusses are manufactured by companies that are independent of Microsoft. Microsoft makes no warranty, implied or otherwise, about the performance or reliability of these products.
Option B: Modify the registry (manual method)
Important This section, method, or task contains steps that tell you how to modify the registry. However, serious problems might occur if you modify the registry incorrectly. Therefore, make sure that you follow these steps carefully. For added protection, back up the registry before you modify it. Then, you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, click the following article number to view the article in the Microsoft Knowledge Base:
322756 How to back up and restore the registry in Windows
Remove .NET Framework 1.1 from the Windows Installer cache. To do this, follow these steps:
Click Start, click Run, type Installer, and then click OK.
On the View menu in Windows Installer, click Details.
Do one of the following, depending on your operating system:
In Windows XP, right-click the Name column header, and then click Comments.
In Windows 2000, right-click the Name column header, and then click Comment.
Right-click the cached Windows Installer file that has the Microsoft .NET Framework 1.1 RTL x86 enu comment, and then click Uninstall.
After the uninstall process is complete, exit the Installer.
Manually delete the existing files and folders from your computer. Depending on the present condition of the .NET Framework, this file and folder might not exist .To delete the file and folder, follow these steps:
Click Start, click Run, type system32, and then click OK. The contents of the System32 folder appear in Windows Explorer.
Locate and then delete the URTTemp folder.
Locate and then delete the mscoree.dll file.
Note If the .NET Framework 1.0 is also installed on your computer, and you do not intend to reinstall the .NET Framework 1.1, you must repair the .NET Framework 1.0. For more information, see the "More Information" section.
Click Start, click Run, type Microsoft.NET, and then click OK. The contents of the Microsoft.NET folder appear in Windows Explorer.
In the Microsoft.NET folder, double-click the Framework folder.
In the Framework folder, delete the v1.1.4322 folder.
Close the Framework folder.
Manually delete the relevant registry keys. To do this, follow these steps:
Click Start, click Run, type regedit, and then click OK to start Registry Editor.
In Registry Editor, locate and then delete the existing registry keys (all the registry keys may not be present):
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v1.1.4322
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\policy\v1.1
Exit Registry Editor.
Zap Windows Installer information from the registry by using the Msizap.exe utility. The Msizap.exe utility is included with Microsoft Windows Installer Software Development Kit (SDK). To download Windows Installer SDK, visit the following Microsoft Web site:
http://www.microsoft.com/downloads/details.aspx?FamilyId=A55B6B43-E24F-4EA3-A93E-40C0EC4F68E5&displaylang=en
To zap Windows Installer information from the registry, follow these steps:
Click Start, click Run, type cmd, and then click OK.
At the command prompt, locate the directory that contains the Msizap.exe utility, and then run the following command:
Msizap TP {CB2F7EDD-9D1F-43C1-90FC-4F52EAE172A1}
Restart your computer.
Clear the contents of your Temp folder. To do this, follow these steps:
Click Start, click Run, type %Temp%, and then click OK. The contents of the Temp folder appear in Windows Explorer.
In the Temp folder, click Select All on the Edit menu.
On the File menu, click Delete.
Note Delete as many files and folders as possible from the Temp folder.
Disable all antivirus programs and all firewall programs that you have installed on your computer. To do this, use the System Configuration Utility (Msconfig.exe) to perform a clean start of your computer, and then disable any services that you do not need. When you use Msconfig.exe in diagnostic mode, re-enable the Windows Installer Service on the Services tab. Then, start Msconfig. To do this, follow this step:
Click Start, click Run, type MSconfig, and then click OK
Install the .NET Framework 1.1. To download the .NET Framework 1.1, visit the following Microsoft Web site:
http://www.microsoft.com/downloads/details.aspx?FamilyId=262D25E3-F589-4842-8157-034D1E7CF3A3&displaylang=en
Note If the .NET Framework 1.0 is installed on your computer, and you do not intend to reinstall the .NET Framework 1.1, you must repair the .NET Framework 1.0 to replace the Mscoree.dll file and the URTTemp folder. For more information, see the "More Information" section.
Labels: Operation and Maintenance, Windows
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home