Offline Repair Plus Quiet and Passive Modes Make .NET Repair Tool More Suited to the Enterprise
Microsoft recently released .NET Framework Repair Tool v1.2 with command line support for quiet and passive modes. This enables automation of the repair tool if needed, and when coupled with a new "Offline Repair" mode that enables it to be used in an offline/locked down environment, makes the tool much more suitable in large-scale enterprise deployments.
The .NET repair tool mainly does a system scan to plug possible setup failures, make necessary changes to the system such as correcting the state of the Windows Installer service, and reset the discretionary access control lists (DACLs) and to resolve issues that are related to an invalid or corrupted update registration. The tool also includes a functionality to generate a .cab file that contains the required logs.
In order to work with the .NET repair tool, you need to either use full UI or Quiet/Passive modes. If you use full UI mode, you will be guided with a wizard to perform all the required steps to scan and fix issues. The Quiet and Passive modes consist of command line switches as shown below. These can be used to apply fixes, collect logs in %temp% folder and send usage data to Microsoft.
NetFxRepairTool.exe /q /l "%temp%"
This is an example of a typical log file:
MSI (s) (84:F8) [16:02:31:526]: APPCOMPAT: no matching ProductCode found in database.
MSI (s) (84:F8) [16:02:31:529]: MSCOREE not loaded loading copy from system32
MSI (s) (84:F8) [16:02:31:531]: Machine policy value 'TransformsSecure' is 0
MSI (s) (84:F8) [16:02:31:532]: User policy value 'TransformsAtSource' is 0
MSI (s) (84:F8) [16:02:31:532]: Machine policy value 'DisablePatch' is 0
MSI (s) (84:F8) [16:02:31:532]: Machine policy value 'AllowLockdownPatch' is 0
MSI (s) (84:F8) [16:02:31:532]: Machine policy value 'DisableLUAPatching' is 0
MSI (s) (84:F8) [16:02:31:532]: Machine policy value 'DisableFlyWeightPatching' is 0
Microsoft has also added support for .NET Framework 4.5 and 4.5.1, and a new command line switch which enables you to target repairs to either specific .NET Framework versions or to fix all versions. The former option is generally much faster.
InfoQ had a brief chat with Mike Mitchell, Spokesperson, Developer Tools team, Microsoft about why the repair tool doesn't provide support for Windows 8:
The .NET Framework ships both in the Windows OS and outside the Windows OS. In the case where the .NET Framework ships in the OS, the servicing stack uses a technology called CBS and any issues are handled within Windows.
In the case where the .NET Framework does not ship in the OS, we ship a .NET redistributable for customers so they can use this and even ship it with their products. The installer for the redistributable uses a stack called Windows Installer. Occasionally customers encounter issues when installing the redistributable or updates to the redistributable, due to issues specific to the Windows Installer stack. The .NET Framework Repair tool is available for addressing those issues.
Starting with Windows 8 both the .NET 3.5 SP1 and 4.5 (including 4.5.1) are all shipping in the OS, so there is no redistributable that needs to be installed. And with no redistributable to install the scenarios don't exist and the particular issues this tool addresses don't exist. Thus there is no need to extend support for this tool beyond Windows 7.
Finally, the latest release provides an option that enables you to run the tool in Log Collection Only mode in addition to an ability to investigate logs before the application of actual fixes. It also enables you to opt out of any data collection in quiet and passive modes. The Microsoft .NET Framework team has examined in detail a scenario where the repair tool can be effectively used in a recently published blog post