Thoughts about setup and deployment issues, WiX, XNA, the .NET Framework and Visual Studio
All postings are provided AS IS with no warranties, and confer no rights. Additionally, views expressed herein are my own and not those of my employer, Microsoft.
We recently released Update Rollup 1 for eHome Infrared Receivers for Windows XP Media Center Edition 2005. There are some fixes in this package that may cause your Media Center remote control to stop working. Specifically, we previously allowed channels 1-8 to broadcast IR signals on, and with this package installed the remote is limited to channels 1-4. If your remote is broadcasting on channels 5-8, here is what you can do to change to a channel in the 1-4 range to allow it to start working again:
Question:
I have built an installer using the Visual Studio 2005 setup project wizard. It installs correctly on Windows XP but fails on Windows Vista. I investigated and found that the failure on Windows Vista is caused by a custom action that fails with an access denied error. However, I am running the setup with elevated privileges in Windows Vista. How can I fix my setup so it will work correctly on Windows Vista?
Answer:
As Robert Flaming described in this blog post, it is necessary to set the NoImpersonate flag for custom actions that modify the system in Windows Vista. This was an uninforced architectural intent that is now enforced in Windows Vista.
Unfortunately, there is not a way to directly set this flag for a custom action in the UI for the setup project in the Visual Studio IDE. In Visual Studio 2005, you can use a post-build step that modifies the MSI to set this bit using a strategy previously described in this blog post.
You can use the following steps to set the NoImpersonate bit in a Visual Studio 2005 setup project:
<update date="1/22/2007"> Updated command line in step 7. The variable I had specified previously was incorrect. It actually needs to be spelled wrong using "ouput" instead of "output" in the $(BuiltOuputPath) variable </update>
<update date="3/18/2009"> Fixed broken link to the sample script. </update>
Heath Stewart posted an item on his blog this past week that I wanted to raise awareness about. In the post, located at http://blogs.msdn.com/heaths/archive/2007/05/31/windows-installer-errors-2738-and-2739-with-script-custom-actions.aspx, Heath described some potential issues and workarounds for script-based custom action failures in MSI-based setups.
These error codes appear in an MSI log file when a script-based custom action fails to run correctly, and the error messages look like the following:
A common resolution for this type of error is to re-register the file %windir%\system32\vbscript.dll and/or %windir%\system32\jscript.dll. However, on Windows Vista this can present problems because if you attempt to re-register these DLLs from a normal user cmd prompt, the registration will be written to HKEY_CURRENT_USER instead of HKEY_CURRENT_MACHINE.
A key point Heath makes in his blog post that I was not aware of before reading it is that Windows Installer will not load and use scripting engines if they are registered in HKEY_CURRENT_USER (for security reasons that he described in more detail in his post). Therefore, if you have registered the DLLs on Windows Vista from a normal user cmd prompt, that will not help fix this type of error.
If you have these scripting engines registered under HKEY_CURRENT_USER, you need to make sure that you remove that registration and re-register them under HKEY_LOCAL_MACHINE. You can use the following steps to unregister them from HKEY_CURRENT_USER:
One last note - if you are a setup developer reading this post, I encourage you to read this post by Rob Mensching where he explains reasons why using script-based custom actions in an MSI can lead to bad results and should be avoided if at all possible.
<update date="7/29/2009"> Added steps to unregister the VBScript and JScript engines on 64-bit OS's. </update>
Note - the issue described in this blog post was originally presented as an issue on Windows XP SP2. However, it can also affect .NET Framework 1.0 and 1.1 installation on any OS released after the .NET Framework 1.0 and 1.1 shipped - specifically, I have seen reports of this issue on Windows Vista. The steps listed here are applicable to this type of install failure on other newer OS's like Windows Vista and not just Windows XP SP2.
As I was researching the bug in .NET Framework 1.0 and 1.1 that is related to regional language settings on Windows XP SP2 (see this blog post for full details), I discovered an additional issue introduced in Windows XP SP2 that can cause .NET Framework 1.0 or 1.1 setup to fail. Just like the other bugs, this one causes .NET Framework setup to report an error while registering System.EnterpriseServices.dll. In the case of .NET Framework service pack setup, it will cause an error to occur while extracting the service pack to a temporary location before even starting setup.
Windows XP SP2 introduced a new security feature known as Data Execution Prevention (or DEP for short). There is a good article introducing DEP here. If a computer running XP SP2 has hardware that supports DEP and DEP is enabled in boot.ini, installation of the .NET Framework will fail while trying to register System.EnterpriseServices.dll (which happens to be the first time that managed code gets run during setup and therefore is the first time the bug is hit). Also, installation of .NET Framework service packs will fail while trying to extract the service pack setup to a temporary location because the .NET Framework service pack wrapper is written in managed code.
The DEP feature was introduced after the .NET Framework 1.0 and 1.1 shipped and unfortunately the .NET Framework is not compatible with DEP without applying a service pack. Like the language settings bug, this DEP compatibility bug has been fixed in the .NET Framework 1.0 SP3 and 1.1 SP1. However, this bug causes the initial installation of the .NET Framework to fail and rollback, and you cannot install the service pack without first getting the product installed (unless you use a method like I describe here, which will work but is not "officially" supported).
If you are running into this bug on your Windows Vista, Windows Server 2008 or Windows 7 computer, you can use steps like the ones in this blog post to work around this bug in the .NET Framework 1.0 and 1.1 and get it installed.
If you are running into this bug on your Windows XP SP2 computer, you can use the following steps to work around this bug in the .NET Framework 1.0 and 1.1 and get it installed:
For reference, here is what the Startup and Recovery item in the Advanced tab of the System control panel looks like (this is the screen you will see in step 4 of the instructions above):
<update date="4/17/2008"> Added a note indicating that the issue in this post can affect the .NET Framework 1.0 and 1.1 setup on Windows Vista and not just Windows XP SP2 </update>
<update date="6/23/2009"> Fixed broken image link, and added a link to a separate blog post that provides steps for turning DEP on and off on Windows Vista and higher. </update>
A while ago, I published a .NET Framework setup verification tool that can be run to provide a sanity check of the install state of the .NET Framework 1.0, 1.1 and 2.0 on a system. However, there are some limitations in that tool:
As a result, I decided to create a new verification tool, and I have an initial version that I think is ready for more people to use. I wanted to post some information about the tool so that folks can try it out to verify the installation state of the various versions of the .NET Framework on their systems.
Where to download the new verification tool
I have a draft version of a new verification tool that can be used to verify all versions of the .NET Framework (1.0, 1.1, 2.0, 2.0 SP1, 3.0, 3.0 SP1 and 3.5) on any supported OS and processor architecture. You can find information about the tool and download it from this location:
http://blogs.msdn.com/astebner/pages/8999004.aspx
The UI for the tool is straightforward - it contains a drop-down list box that lets you choose the version of the .NET Framework that you would like to verify and a Verify Now button to initiate the verification process for the chosen product. After verification completes, it will display results for the chosen product and allow you to select additional products to verify.
I have been testing this new version on several systems that I have access to, but there are likely to still be issues where the tool falsely reports errors or misses some error cases. Please let me know if you see any issues while using this tool by posting comments on this blog post or by contacting me directly. If possible, please include information about your scenario and copies of the log files that I describe below so I can continue to make this tool better in the future.
How to run the tool in silent mode
This verification tool supports running in silent mode if you would like to automate the verification process. To run in silent mode, you need to download the verification tool .zip file, extract the file netfx_setupverifier.exe from the .zip file, and then run it using syntax like the following:
netfx_setupverifier.exe /q:a /c:"setupverifier.exe /p <name of product to verify>"
The value that you pass with the /p switch to replace <name of product to verify> in this example must exactly match one of the products listed in the file setupverifier.ini that is included in the self-extracting package for the verification tool.
Currently, the verification tool includes the following product names that can be passed in using the /p switch:
For example, if you would like to run the tool in silent mode and verify the install state of the .NET Framework 2.0, you would use a command line like the following:
netfx_setupverifier.exe /q:a /c:"setupverifier.exe /p .NET Framework 2.0"
The verification tool returns the following exit codes:
Logging
This verification tool creates 2 log files by default that can be used to determine what actions the tool is taking and what errors it encounters while verifying a product. The 2 log files are listed below, and they are created in the %temp% directory by default. Note that you can find the %temp% directory by clicking on the Windows start menu, choosing Run, typing %temp% and clicking OK to open the directory in Windows Explorer.
A new pair of log files will be created each time the verification tool is launched. The date and time the tool is launched will be appended to the end of the log file names by default in place of the * in the names listed above. If you want to control the exact names used for the log files, you can use the following command line parameters:
For example, the following command line will allow you to specify non-default names for both log files:
netfx_setupverifier.exe /q:a /c:"setupverifier.exe /l %temp%\my_main_log.txt /e %temp%\my_error_log.txt"
<update date="9/2/2009"> Fixed broken link to the verification tool. </update>
Last week, I posted a set of command line parameters that can be used to repair or uninstall the .NET Framework 2.0 SP2 and 3.0 SP2. When I was working on that blog post, I noticed a behavior change that is new in 2.0 SP2 setup and 3.0 SP2 setup that affects the repair scenarios for these products on Windows XP and Windows Server 2003, so I wanted to describe the issue and how to work around it.
Description of the issue
There was a change made in the MSI-based installers for the .NET Framework 2.0 SP2 and 3.0 SP2 that causes the default repair that happens when you use the Add/Remove Programs entry for these products to not actually repair anything. For example, if you end up with an out-of-date version of c:\windows\system32\mscoree.dll or if any of the files or registry values in the .NET Framework 2.0 SP2 or 3.0 SP2 are missing entirely, the repair from Add/Remove Programs will not restore the files or registry keys.
Because this issue only affects the MSI-based installers for 2.0 SP2 and 3.0 SP2, you will only encounter this issue on Windows XP and Windows Server 2003. On Windows Vista and Windows Server 2008, the .NET Framework 2.0 SP2 and 3.0 SP2 are installed as OS update packages instead of as MSIs.
How to work around the issue
If you need to repair the MSI-based version of the .NET Framework 2.0 SP2 or 3.0 SP2 on Windows XP or Windows Server 2003, you must run the following command lines instead of using the repair option from Add/Remove Programs:
.NET Framework 2.0 SP2 - silent repair
msiexec /fpecmsu {C09FB3CD-3D0C-3F2D-899A-6A1D67F2073F} REINSTALL=ALL /l*v %temp%\netfx20sp2_repair_log.txt /qb
.NET Framework 3.0 SP2 - silent repair
msiexec /fpecmsu {A3051CD0-2F64-3813-A88D-B8DCCDE8F8C7} REINSTALL=ALL /l*v %temp%\netfx30sp2_repair_log.txt /qb
Behind-the-scenes details if you are interested
There is a difference in the command line switches being passed in to trigger the repair of 2.0 SP2 and 3.0 SP2 compared to 2.0 SP1 and 3.0 SP1. Here are a couple of specific examples:
msiexec /fpecmsu {C09FB3CD-3D0C-3F2D-899A-6A1D67F2073F} REINSTALL=ALL /l*v %temp%\netfx20sp2_repair_log.txt /qn
.NET Framework 2.0 SP1 - silent repair
msiexec /i {B508B3F1-A24A-32C0-B310-85786919EF28} /l*v %temp%\netfx20sp1_repair_log.txt /qn
The reason that these command lines need to be different (aside from the product codes changing between SP1 and SP2) is that the REINSTALL=ALL property no longer gets set by default in the MSI-based .NET Framework 2.0 SP2 or 3.0 SP2 repair processes. There is a custom action in .NET Framework 2.0 SP1, 2.0 SP2, 3.0 SP1 and 3.0 SP2 setup that sets the REINSTALL=ALL property during repair scenarios. However, the condition for that custom action was changed in 2.0 SP2 and 3.0 SP2 setup such that it will never evaluate to true, and the REINSTALL=ALL property no longer gets automatically set. As a result, you have to manually pass in the REINSTALL=ALL property in order to perform a full repair of the .NET Framework 2.0 SP2 and 3.0 SP2.
With the release of VS 2005 and the .NET Framework 2.0, we began to use a new Windows Installer external UI handler to manage installation of several of the setups that are part of the VS 2005 family, including the .NET Framework 2.0 redistributable and SDK, J# redistributable, VS Tools for Office redistributable, language packs .NET, J# and VS Tools for Office, etc.
This new external UI handler is named install.exe, and you will find an INI file named install.ini included with each product that uses install.exe. Install.ini expresses many configuration options for the setup in question. I have described many of the settings used for the .NET Framework 2.0 redistributable in this blog post.
In addition to the INI file, install.exe can be configured using several command line switches. The following list provides information about all of the command line switches that are supported by the install.exe external UI handler in the VS 2005 and .NET Framework 2.0 family of products:
<update date="12/7/2005"> Added a note to the /l log file switch indicating that you need to put quotes around the file name if there are spaces in the name </update>
I have seen your blog posts that describe how to silently repair and uninstall the following versions of the .NET Framework:
How can I perform a silent repair and uninstall for the .NET Framework 3.5 SP1?
The following list provides example command lines that can be used to repair and uninstall the MSI-based .NET Framework 3.5 SP1 package after it has been installed on the system. The silent option will perform the repair/uninstall with no UI displayed to the user. The unattended option will perform the repair/uninstall with only a progress dialog, but with no user interaction required.
.NET Framework 3.5 SP1 - silent repair
"%windir%\Microsoft.NET\Framework\v3.5\Microsoft .NET Framework 3.5 SP1\setup.exe" /q /norestart
.NET Framework 3.5 SP1 - unattended repair
"%windir%\Microsoft.NET\Framework\v3.5\Microsoft .NET Framework 3.5 SP1\setup.exe" /qb /norestart
.NET Framework 3.5 SP1 - silent uninstall
"%windir%\Microsoft.NET\Framework\v3.5\Microsoft .NET Framework 3.5 SP1\setup.exe" /q /uninstall /norestart
.NET Framework 3.5 SP1 - unattended uninstall
"%windir%\Microsoft.NET\Framework\v3.5\Microsoft .NET Framework 3.5 SP1\setup.exe" /qb /uninstall /norestart
Important notes about repair scenarios:
Important note about uninstall scenarios:
Other important notes:
There is a known issue in Update Rollup 2 for Media Center 2005 that causes 5.1 analog surround sound to revert to 2 channel mode. The underlying issue is that a registry setting is being overwritten by Media Center. You can use the following steps to add the registry value needed to fix this issue:
Note that if you re-run the Speaker Setup portion of Media Center Setup, this registry value will be reset again and you will need to re-run the above command to fix the underlying issue once more.
This issue was previously described on this NVidia support page, but I wanted to list it here as well in case anyone reading my blog runs into it as well.
I got a question from a customer who found this blog post describing how to chain silent installation of VS .NET 2003 prerequisites, VS .NET 2003 and MSDN. They wanted to know what the equivalent set of steps would be for chaining silent installation of VS 2005. There have been some modifications to how setup works behind the scenes in VS 2005, most notably the elimination of the separate step that used to be required to install prerequisite components for VS, so happily I can say these steps are much simpler than in the past. Here are the steps for VS 2005 (using the same format as my previous post).
To start with you should stage Visual Studio bits to a network share so that you can use this as your installation source later on. You can accomplish that with the following steps (also described in the VS readme located in the file adminreadme.htm in the Setup subdirectory on VS Disk 1):
Now that you have a network image, you can create the unattended INI file to install VS 2005 and MSDN using the following steps:
There are a couple of gotchas that I have seen that you should keep an eye out for when following these instructions:
There is an advanced trick that you can use when creating this unattend script as well:
In the VS 2003 instructions there was an additional advanced trick regarding waiting for the setup process to exit and checking the return code. The workaround I listed in my previous post is not necessary in VS 2005 because setup now has specific logic to not copy itself to the %tmep% folder and start a new process if it detects it is being run in administrative installation mode.
I recently installed the .NET Framework 3.5 SP1 on my system. Afterwards, I looked in Add/Remove Programs, and it shows that I have all of the following versions of the .NET Framework installed on my system:
Do I need any of these older versions of the .NET Framework now that I’ve installed the .NET Framework 3.5 SP1, or can I safely uninstall them?
When you install the .NET Framework 3.5 SP1, it will also install the .NET Framework 2.0 SP2 and the .NET Framework 3.0 SP2 behind the scenes. You cannot use the .NET Framework 3.5 SP1 unless you also have the .NET Framework 2.0 SP2 and 3.0 SP2 installed. Therefore, you will not be allowed to uninstall the .NET Framework 2.0 SP2 or 3.0 SP2 if you have the .NET Framework 3.5 SP1 installed. If you try to uninstall those versions of the .NET Framework, their uninstall processes will block and tell you that they are needed by another application on your system.
The .NET Framework 1.0 and .NET Framework 1.1 can be installed side-by-side with the .NET Framework 2.0, 3.0 and 3.5. Most applications that were created for the .NET Framework 1.0 or 1.1 will automatically use the .NET Framework 2.0 instead if it is installed on the system. In most cases, that means you do not need to keep the .NET Framework 1.0 or 1.1 installed on your system if you already have the .NET Framework 2.0 installed.
However, there are some applications that are configured to require a specific version of the .NET Framework, even if later versions of the .NET Framework are installed. If you have any applications like that on your system and try to run them without installing the .NET Framework 1.0 or 1.1, you will get an error message that looks like the following:
--------------------------- MyApplication.exe - .NET Framework Initialization Error --------------------------- To run this application, you first must install one of the following versions of the .NET Framework: v1.1.4322 Contact your application publisher for instructions about obtaining the appropriate version of the .NET Framework. --------------------------- OK ---------------------------
In the above error message, the version number will be v1.0.3705 if you need to install the .NET Framework 1.0, and it will be v1.1.4322 if you need to install the .NET Framework 1.1.
If you end up seeing any error messages like this, you can re-install the .NET Framework 1.0 or 1.1 in order to resolve the errors. If you don't end up seeing any error messages like this, then you don't need to worry about re-installing the .NET Framework 1.0 or 1.1.
Important note: The issue described in this blog post only affects pre-RC1 builds of Windows Vista. If you are running Windows Vista RTM and have problems installing the .NET Framework, do not try this workaround because it does not apply to the RTM build and will not help. Please see http://blogs.msdn.com/astebner/articles/454956.aspx instead of this blog post if you have problems installing the .NET Framework 1.1 on Windows Vista RTM.....
The .NET Framework setup team recently discovered a compatibility bug that will prevent the .NET Framework 1.1 from installing on the most recent build of Windows Vista that was released to the Windows Vista beta program members (build 5456).
The underlying problem is that one of the type libraries registered by .NET Framework 1.1 setup is attempting to write to a registry sub-key that is incorrectly marked read-only in this build of Windows Vista. In order to workaround this issue, you will need to change owners and modify permissions on a registry sub-key on your system.
You can perform the following steps before installing the .NET Framework 1.1 to workaround this issue on Windows Vista build 5456:
After performing the above steps, you should be able to re-run .NET Framework 1.1 setup and install successfully.
<update date="4/4/2007"> Added note at the top of this blog post to try to let users know that this workaround will not help in the final RTM release of Windows Vista. </update>
Steven Bone posted the first of a series of articles about how Windows Installer custom actions work and how to create and debug them. You can click on the link to read Part 1 - Custom Action Types and Sequences.
This article describes how to configure the columns of the custom action table in an MSI, when to use immediate and deferred custom action types, how to handle rollback, and when to use the various custom action flags, options and conditions.
When using Windows Installer to create a setup, you can author most necessary actions using the standard MSI tables. However, there are some types of actions that are not supported using native MSI tables (such as the list I posted a while back). Because of this, using custom actions in your MSI will sometimes be necessary. Building a setup package is an integral part of the software development process, and the same level of care should be put into planning and designing the setup and deployment for your software.
Therefore, I strongly encourage you to read through this article (and the follow-up articles he will be posting in the future about writing custom action code) if you do any kind of setup development or testing work.
I also wanted to point out that there is a set of commonly needed custom actions that are published with the WiX toolset, and they can be easily incorporated into a setup package without needing to write any additional code. If you are writing an MSI-based setup I encourage you to take a look at WiX as well.
I wanted to take a minute to spotlight one of the big new embedded enabling features that is new to Windows XP Embedded SP2. It is called hibernate once, resume many. We have taken to abbreviating this to HORM internally, so if you see this new acronym floating around in documents or newsgroups about XP Embedded that is likely what it means.
HORM provides the ability to resume an EWF-protected system from a hibernation file (hiberfil.sys) each time a machine is restarted instead of performing a full OS boot. This greatly improves the cold-boot startup time of machines. Here are a few key points about HORM:
I encourage you all to take a look at HORM as you start exploring XPE SP2. Please let us know if you run into any problems or have any questions.
I got a question from a customer this week asking how they could modify the default installation path in their MSI-based setup package based on a value they wanted to retrieve from the registry. Typically this kind of modification is desired if your setup shares files/components with another MSI, and that other MSI can be installed to non-default locations by another setup package. The steps to accomplish this are roughly the following. Please note that I am basing this algorithm on how we accomplish this inside of Visual Studio setup (I also described what happens behind the scenes in VS setup in more detail here). There may be alternative ways to accomplish the same result.
Rob Mensching wrote a blog entry a while back that explains some reasons why you should not use script-based custom actions in your setup. I encourage you all to read it if you haven't yet, and I also strongly encourage you to heed his recommendations if at all possible.
I can personally relate to one of his explanations as well. Reason #3 on his list talks about anti-virus programs. When we shipped Visual Studio .NET 2002 we started getting reports of seemingly random failures during setup from our product support team. After some detailed analysis we found that many of these failures were being caused by overly aggressive anti-virus programs that were blocking scripts from running even as part of custom actions during VS setup. We scrubbed our custom actions before shipping Visual Studio .NET 2003 to re-write or eliminate the script-based custom actions to avoid these failures, and we were able to eliminate a fairly high support call generator.
I have a system with Windows Vista and have been using Media Center to watch DRM-protected content for a while. Recently, I upgraded some hardware on my system, and now I can no longer view any DRM-protected content in Media Center. After some web searches, I found one of your old blog posts that describes a similar type of error message in Update Rollup 2 for Windows XP Media Center Edition 2005. However, that post and the knowledge base article it refers to appear to be specific to older versions of Windows.
I have read that some types of hardware upgrades can cause DRM to stop working in Windows, and I suspect that is what is happening to me. How can I reset DRM on my system so that I can view protected content inside of Windows Vista Media Center again?
The knowledge base article linked in that old blog post (located at http://support.microsoft.com/?kbid=891664) contains information that is applicable to Windows Vista as well as older versions of Windows, but it does not specifically state that it applies to Windows Vista.
According to this knowledge base article, you can reset DRM by deleting the files in the DRM folder on your system (but make sure to not delete the DRM folder itself because that can cause other problems on your system).
The default location of the DRM folder in Windows Vista is c:\ProgramData\Microsoft\Windows\DRM, but it might not be in the same location on every system. To reliably determine the location of the DRM folder on your system, you can look up the data in one of the following registry values:
For 32-bit versions of Windows Vista:
[HKEY_LOCAL_MACHINE\Software\Microsoft\DRM]DataPath
For 64-bit versions of Windows Vista:
[HKEY_LOCAL_MACHINE\Software\WOW6432Node\Microsoft\DRM]DataPath
Note - the DataPath value is in binary format, so you will have to double-click on the DataPath value in regedit.exe and look at the right-hand column of the Edit Binary Value dialog box that appears to see the plain text version of the path.
I was talking recently with a colleague who works on the .NET Framework setup and Windows Installer technical support team here at Microsoft. He told me about a set of steps that his team typically has customers try when they call in to report failed installations. I wanted to post these steps here in case they are helpful to anyone else struggling to get an application installed.
This set of steps allows you to easily find all services that are installed on your system and temporarily disable them so they cannot interfere with installation processes. It also allows you to identify and temporarily disable programs that are scheduled to start every time the system reboots. The System Configuration tool (also known as MSConfig) allows you to manage these and other settings.
I recommend trying the following steps in cases where a product fails to install on your system and you've already tried other workarounds posted on my blog and elsewhere to attempt to resolve the issue:
In many cases, the above steps will allow a previously failing setup package to install successfully. Hopefully they will be useful to you as well if you find yourself in this situation.
I have seen your previous blog posts that describe how to detect the presence of the Visual C++ 2005 redistributable package and the Visual C++ 2008 redistributable package. I am creating an installer that requires the Visual C++ 2010 runtime files. How can I detect the presence of the Visual C++ 2010 redistributable package?
Unlike the Visual C++ 2005 and 2008 redistributable packages, there are registry keys that can be used to detect the presence of the Visual C++ 2010 redistributable package.
Visual C++ 2010 redistributable package detection registry values
Alternatively, like in past releases of the Visual C++ redistributable package, you can use an algorithm like the one I described in my previous blog posts to detect the presence of the Visual C++ 2010 redistributable package on a system:
Visual C++ 2010 redistributable package product codes
Visual C++ 2010 SP1 redistributable package product codes
<update date="4/12/2011"> Added product codes for Visual C++ 2010 SP1 redistributable packages. </update>
I've posted an updated version of the .NET Framework cleanup tool that now contains an option to remove the .NET Framework 3.5 (in addition to 1.0, 1.1, 2.0 and 3.0). I also added some additional information to be removed when uninstalling the .NET Framework 1.1 (thanks to this comment on one of my other blog posts).
You can use the following links to find more information about the .NET Framework cleanup tool and download it if you need it on your system:
Note - at the time that I am writing this blog post, the .NET Framework 3.5 is still only a beta, so currently the cleanup tool is only able to remove the beta 1 and beta 2 versions of the .NET Framework 3.5. I will update the tool in the future when future builds of the .NET Framework 3.5 are released publicly.
<update date="5/19/2008"> Added an alternate download location for the cleanup tool in case the first site is down. </update>
I have heard from a couple of customers who have uninstalled beta versions of Visual Studio 2005 and then installed the final release. After installation finished, they saw a small error dialog that looks like the following when trying to launch the Visual Studio 2005 IDE:
Pressing OK on this dialog dismisses the IDE and VS 2005 is not usable.
There are a couple of cases where registry data can be orphaned on the machine that causes this type of error. Unfortunately, because this data is written by a custom action and there are some "interesting" conditions on that cusotm action in the VS MSI, running a repair of VS 2005 will not correctly fix the registry values that control this functionality.
The following steps can be used to resolve this Invalid license data error message:
After doing this, the license data should be recreated and correct and allow you to launch the VS 2005 IDE.
<update date="10/25/2006"> Added some more licensing registry values and a new section for 64-bit registry values that need to be removed </update>
<update date="8/27/2009"> Fixed broken link to image. </update>
I was contacted by a customer last week who could not get the .NET Framework 1.1 to install correctly. It reported an error while registering System.EnterpriseServices.dll just like I describe in this post. In the end, the customer discovered that the system locale of the computer was set to Maltese, and he was able to install the .NET Framework by temporarily changing the system locale back to English.
I did a little research, and found that there is a bug in the .NET Framework that causes it to not work correctly when the default system locale is set to a language that the .NET Framework does not recognize. This bug has been fixed in the .NET Framework 1.0 SP3 and 1.1 SP1. However, this bug causes the initial installation of the .NET Framework to fail and rollback, and you cannot install the service pack without first getting the product installed (unless you use a method like I describe here, which will work but is not "officially" supported).
With the release of Windows XP SP2, Microsoft shipped Enabling Language Kits (ELKs) for 25 new locales (click here for a complete list and a nice description of what features ELKs provide). Because of the bug in the .NET Framework that I described above, if a computer running XP SP2 has the system locale set to one of these 25 new locales, installation of the .NET Framework will fail while trying to register System.EnterpriseServices.dll (which happens to be the first time that managed code gets run during setup and therefore is the first time the bug is hit).
If you are running into this bug on your Windows XP SP2 computer, you can use the following steps to work around this bug in the .NET Framework and get it installed:
For reference, here is what the Advanced tab of the Regional and Language Options control panel looks like. This screenshot is from my laptop, where I was able to reproduce the failure to install the .NET Framework by changing my system locale to Welsh (one of the 25 new ELKs included in XP SP2):
<update date="7/26/2005> As Michael Kaplan points out, the underlying bug affects both the .NET Framework core setup and the .NET Framework service pack setup. Once a computer has .NET Framework 1.0 + SP3 and/or 1.1 + SP1, the bug will not affect any future .NET Framework service packs. In addition, the bug can happen if your computer has a default user locale set to one of the new ELK languages, not just a default system locale. </update>
I received an email yesterday from an individual who had just installed the latest Windows Installer Platform SDK and had read a previous blog post that I wrote about using msi.chm for Windows Installer help information, but was unable to find msi.chm on his system. I took a look on our internal products server and couldn't find msi.chm there either, so I decided to go to the Platform SDK site and figure out what was going on. What I found is that I was basing the information in that blog entry about msi.chm on what appears to be an older version of the Platform SDK that I had downloaded a while ago and then just copied msi.chm off to a separate location.
I tried out a new download of the Windows Installer part of the Platform SDK, and it appears they have re-organized the help documentation for the entire SDK. Instead of having standalone CHM files for each product in the SDK, there is now a unified Platform SDK help collection and each individual product plugs in and registers an HXS (compiled help) file.
So what I had to do was launch the Platform SDK Documentation link on the Start menu after installation of the SDK. From there I was able to use the index and search that I normally use in my old copy of msi.chm, and as an added bonus there are updated topics for Windows Installer 3.0 and some of the incorrect info in my old version of msi.chm have been fixed.
Sorry for any confusion I created in my original post....
Hey, I'm happy to say that the .NET Framework 2.0 is finally finished, and the official RTM build (2.0.50727.42) is available for download on the Microsoft Download Center. Check out this location for a full list of .NET Framework 2.0 products that are available. Here are some of the most commonly requested downloads:
A couple of important notes here: