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.
To coincide with the release of Update Rollup 2 for Media Center 2005, we have also released an updated version of the Media Center Diagnostics Kit that can be downloaded from this location.
I posted a blog entry about the previous version of test kit and received several comments from customers (such as this) indicating that this test kit would delete recorded TV shows. After receiving those comments, I asked the developer who wrote the Media Center Test Kit about this issue. He provided me with the following information about this issue to hopefully ease concerns you might have about using the Diagnostics Kit on your machine:
Older versions of the Media Center Diagnostics Kit used a bad helper library which deleted recording files under certain circumstances (such as when tests failed). This library has been replaced in the new version of the Media Center Diagnostics Kit and it should be never be deleting recorded content files on the machine.
However, even in this latest Diagnostics Kit the recording files may appear to be missing during test execution because the tool moves them just before running any of the test scripts. This is in place to protect the user from deleting recording files when running scripts because the scripts can do massive damage to the user environment and recording files. This means if you use Task Manager and kill the MCDiag process while a script is running, the Diagnostic Kit is never given the opportunity to restore the moved files.
To protect files, the Diagnostics Kit renames two directories:
If the Diagnostics Kit cannot rename either of the above directories before running a script (most likely because a file could be in use), it will fail and not run the script. In the new version of the Diagnostics Kit, when the user presses the Run button, they will get a dialog telling them that recording files are being moved and asks them permission to continue doing this. There is also an advisory message that appears during test script execution advising strongly against killing the MCDiag process while it is running test scripts. If you have to kill the process for some reason, you can restore the folders and files manually by copying them from the backup locations described above.
Since Update Rollup 2 for Media Center 2005 was released a couple of weeks ago, I have posted several blog entries with troubleshooting tips for various problems we have encountered so far. In the interest of making it easier to find help for Update Rollup 2 issues, I decided to post an article that can serve as a central location for links to all of the issues we have seen so far. I call this article the Update Rollup 2 for Windows XP Media Center Edition 2005 troubleshooting guide.
I encourage you to use that article as a starting point when searching through my blog archive for workarounds and fixes for problems encountered while installing and/or using Update Rollup 2 for Media Center 2005. As new issues are discovered, I will continue to post standalone blog posts, and I will also add links to the troubleshooting guide so that you can start from that guide to find solutions in the future as well.
As I mentioned in this previous post, some folks have encountered problems playing protected content after upgrading to Update Rollup 2 for Media Center 2005. We are still investigating root causes and trying to determine fixes for various types of protected content errors, and you can help us with this process.
If you think you are encountering a problem playing protected content on your Media Center 2005 machine after installing Update Rollup 2 (or you aren't sure but want to check and make sure you can successfully play protected content) you can try to download and play this Windows Media Audio file on your Media Center. When you download this file and choose to play it, Windows Media Player should display a dialog similar to the following:
You may also be prompted to back up existing licenses at some point during the process of trying to play this WMA file. If you have one of the content protection problems we have been investigating, installing this security upgrade or backing up licenses will result in an error and should display a numerical error code. For example, you may see a Windows Media Player error dialog with a Secure Storage Protection Error message.
If you encounter any such error, I would really appreciate it if you could post a comment on this blog post or contact me and let me know the exact error code and message that you receive. I will continue to update my blog as we make progress investigating and solving protected content playback issues, so stay tuned for the latest....
There is a new hotfix available as of 4/14/2006 that is designed to fix protected content playback issues in Update Rollup 2 for Media Center 2005. Please try out this hotfix if you have DRM/protected content playback issues in Update Rollup 2.
One of the questions I commonly receive from customers is how to uninstall a product when there is no entry created for that product in the Add/Remove Programs control panel. I get asked this question about a lot of different MSI-based setups and OS hotfixes, particularly from people who are trying to follow the uninstall instructions for beta versions of VS 2005 and the .NET Framework 2.0.
For MSI-based products, I typically recommend using the following steps to locate and remove a product that does not appear in Add/Remove Programs:
This set of steps has resolved nearly all cases I've run into in the past where someone needed to remove a product but could not find an entry in Add/Remove Programs to launch the uninstall process from. If you try these steps and run into problems or have questions, please contact me and I will try to help.
For OS hotfixes, you need to make sure the Show updates checkbox is checked in the top middle of the Add/Remove Programs control panel. If that is checked and the hotfix you want to remove still does not appear in Add/Remove Programs, the hotfix may have been installed on your system with a command line that suppresses the ability to uninstall.
<update date="1/9/2006"> Added more specific information about extracting and running smartmsizap.exe from c:\ because otherwise Windows may not know where to find the exe when running the command from a cmd prompt </update>
<update date="4/1/2009"> Fixed broken link to smartmsizap tool. </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 was contacted by a customer this week who was trying to install Visual Studio .NET 2003 and was receiving 1308 or 1309 error messages during setup, which caused setup to rollback and fail. The errors appeared in the verbose MSI log file similar to the following (note that for Visual Studio 2002, 2003 and 2005 setup, the log file is %temp%\vsmsilog*.txt where * is a randomly generated ending):
There are many possible causes for 1308 or 1309 errors in an MSI-based setup. The most common cause of this that we've seen for Visual Studio 2002, 2003 and 2005 setup is an issue reading from the source media while installing from CD or DVD. This could be due to scratches, dust or other physical flaws on the disc itself. It could be a firmware or driver issue with the CD-ROM or DVD-ROM drive (we see this a lot for some of the older generation DVD-ROM drives that have slower spin speeds in particular).
The most reliable workaround we've found for eliminating 1308/1309 errors and allow Visual Studio to install successfully is to copy the contents of the VS CDs or DVD to a local hard drive and then install from the local hard drive instead of from media. The instructions that can be used to copy the VS CDs or DVD locally are documented in the following locations:
Note that if you have VS 2005, there is not yet a readme posted that I could find since it just shipped. I will update this post with the official link when it is available, but in the meantime you can use steps similar to the VS 2003 steps (except you do not need to change the [Baseline] section of setup.ini anymore).
The instructions I linked to above refer to creating a network install point so that you can install VS in a corporate or academic network environment, but the same set of steps apply to copy VS to a local drive to install from directly in order to resolve 1308/1309 errors. I think the instructions on those pages are self-explanatory but I do want to call out a couple of key points:
I have heard from a couple of customers who have run into a problem playing back recorded TV shows after installing Update Rollup 2 for Media Center 2005. In the cases I've heard of so far, the show will display for a couple of seconds and then displays a blue screen with an overlay that says Digital Audio Service. They were able to play the same shows correctly via a Media Center Extender and via Windows Media Player, but not within Media Center.
The customers I have heard from so far were able to resolve this issue by downloading and installing updated drivers for the video card and TV tuner cards on their Media Center PCs. When working on Update Rollup 2, we tried our best to not require any driver updates above and beyond what is required for Media Center 2005. However, there are a few cases such as this where it has proved to not be possible.
If anyone else sees this Digital Audio Service overlay, please try to visit the websites for the manufacturers of your video card and TV tuner(s) and see if that resolves the issue. Please also take a look at this blog post for more information about the root cause of this error and this blog post for more information about another known cause of this error.
If none of the above steps work for you, please install the Media Center Diagnostic Kit from and then run it and gather a system snapshot and send it to me at aaronste@microsoft.com so we can take a closer look.
<update date="12/4/2005"> Updating steps to include using the Media Center Diagnostic Kit to gather a system snapshot </update>
Now that the .NET Framework 2.0 and VS 2005 are officially released, those of you who have been running beta and CTP builds will need to prepare your machines to install the final release. As I'm sure many of you are aware of if you've had a beta installed in the past, beta uninstall and migration to newer builds has been a very painful subject dating all the way back to VS 2005 and .NET Framework 2.0 beta 1. Fortunately there is a lot more awareness that uninstalling the various pieces of VS 2005 is not trivial, and there are some automated uninstall tools and much better documentation.
For those of you who will need to uninstall a previous beta in order to install the final release of VS 2005 and/or the .NET Framework 2.0, you should make sure to review the official uninstall instructions before starting to uninstall anything. In case you read nothing else, please make sure that you leave the .NET Framework 2.0 beta uninstall until the very end. Most of the other pieces of VS 2005 will not uninstall fully if you remove the .NET Framework 2.0 beta first, and that can cause problems in some scenarios after installing the final release.
In order to make the uninstall process easier, there are a couple of automated uninstall tools available for various scenarios:
The uninstall tools (#1, #3 and #4 above) are designed to run Windows Installer APIs and command lines to discover whether or not a known, fixed set of products are installed and then remove them. As we discover additional issues that these tools do not cover, I will be updating the troubleshooting tool. The main goal of the troubleshooting tool is to fix up a machine that already has the final release installed without needing to have the user resort to uninstalling everything and starting from scratch. It tries to perform more "surgical" fixes for specific issues related to incomplete/incorrect beta uninstalls.
As always, let me know if you run into any issues or have any feedback on any of the above tools and I'll try my best to help.
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:
I have been looking at some of the previous topics that I intended to write follow-up articles for to try to provide more detailed information. One of them is this article I wrote a couple of months ago where I introduced the external UI handler that we use to install the .NET Framework 2.0 and some other packages that will ship as part of Visual Studio 2005. I wanted to pick this back up now that VS 2005 and .NET 2.0 are getting closer to shipping because I think some of this information will be interesting to people interesting in including .NET Framework 2.0 in their setup package and/or customizing the behavior of .NET Framework 2.0 setup.
For this post, I want to take a more detailed look at the INI file that is used by the .NET Framework 2.0 setup wrapper. To begin with, we need to download a copy of the .NET Framework 2.0. I am going to use the release candidate, but you can download the latest beta version located here and follow along with me. I'm not sure the best way to approach this, so I'm going to try the strategy of listing the contents of the INI file and adding my own comments to each line describing more about what parts of setup they control. Not all options supported by the setup wrapper are used in the .NET Framework setup INI file, so I will explore other types of supported settings in a future blog post...
[Setup] // This is the section of the INI that contains "global" data that is used to configure major settings for the setup wrapperProductName=Microsoft .NET Framework 2.0 // The name displayed in all of the setup UI title barsProductMsi=netfx.msi // The name of the MSI that is included with the setup UI files that will be installedProductRegKey=SOFTWARE\Microsoft\NET Framework Setup\NDP\v2.0.50727 // Registry key name under HKEY_LOCAL_MACHINE that contains a value that setup should check for and block installation if it exists because the product is already installed using some other setup technology. This is designed to allow .NET Framework 2.0 MSI-based setup to block on Windows Vista because .NET 2.0 is installed as part of the OSProductRegValue=OCM // Name of a DWORD registry value located in the location referred to by ProductRegKey; setup will check to see if this value exists and is equal to 1 and if so, will block installation and tell the user that the product is already installed as part of the OSProductSupportURL=http://go.microsoft.com/fwlink/?LinkId=45396 // This URL is displayed in setup UI to provide readme information, such as when setup failsDefaultDirInstallToken=URTInstallPath.3643236F_FC70_11D3_A536_0090278A1BB8 // The directory token in the MSI that represents the default install path; this is used in setup UI for products that allow changing the install pathSupportWin9X=1 // Whether or not this setup package should allow installation on Windows 98, 98 SE, or MEMinNTVersion=5.0 // The minimum NT version that setup should allow installation on; version 5.0 = Windows 2000 (and 4.0 = NT4, 5.1 = Windows XP, 5.2 = Windows Server 2003)CheckAdminRights=1 // Whether or not this setup package should check for administrative privileges and block setup from running unless the calling process has administrative privilegesShowFeatureOptions=0 // Whether or not setup UI should show the page that allows the user to select features to installShowDestinationFolder=0 // Whether or not setup UI should show the page that allows the user to change the install path for the product; the default value if this page is shown is the directory represented by the DefaultDirInstallToken value aboveLogFilePrefix=dd_netfx20 // The name to use as the prefix for log files generated by this product; there will be 2 logs created - dd_netfx20ui*.txt and dd_netfx20msi*.txt. The * is a randomly generated suffix, and these logs are always created in the %temp% directory; the UI log is a record of activities performed by the setup wrapper itself, and the MSI log is an MSI log created by Windows Installer while the product is installingVerboseLog=1 // Whether or not to create a verbose MSI log during installationRebootMode=1 // Whether or not the user will be offered a checkbox that lets them postpone a reboot at the end of installationBlockOn64Platform=1 // Whether or not the setup should block installing on 64-bit versions of WindowsBitmapFile=netfx.bmp // The name of a file contained in the setup package that has a small bitmap that is displayed in the top right corner of all setup UI wizard pages; in the case of the .NET Framework, it is just a blank bitmap so there is no logo displayed in the wizard UICustomTextPrefix=CustomText // The prefix of a DLL that contains custom strings that will be displayed on the first and/or last page of setup UI; setup expects the DLL name to begin with this prefix then have .LCID.dll as the ending (where LCID is the 4-digit language code for the language of the resources in the DLL); for example, if the .NET Framework setup carried a file named CustomText.1033.dll, setup UI will try to load resources from that file to customize the UI on the first and last page; if the DLL does not exist, setup UI will display the page with the default text and not show any custom UI for this productUninstallWarning=1 // Whether or not to show an advisory dialog at the beginning of uninstall to advise that uninstalling this product may break other dependent productsControlMSIService=1 // Whether or not the setup wrapper should stop the Windows Installer service before and after installationUILanguage=0 // The default UI language to use for this setup package; setting it to 0 means it is language neutral and will attempt to load the UI in the language of the OS; setting it to a specific LCID will cause it to load the UI in the specific language; the UI DLLs are carried with the setup package and are named install.res.LCID.dll; in addition, the EULA files are carried with the package and are named eula.LCID.txt
[DetectDarwin] // This section tells the setup wrapper whether or not to enforce a specific version of Windows Installer as a prerequisiteX86=3.0 // The Windows Installer version to search for on x86 machinesI64=3.0 // The Windows Installer version to search for on Intel 64-bit machinesA64=3.0 // The Windows Installer version to search for on AMD x64 machinesWin9x=2.0 // The Windows Installer version to search for on Windows 98/ME machinesNT4=2.0 // The Windows Installer version to search for on NT4 machinesInstall=0 // Whether or not the setup wrapper should check for Windows Installer or install it if it is not present; we used to set this to 1 and install Windows Installer if it was needed; unfortunately, this feature is orphaned now and the code only knows how to bootstrap and install Windows Installer 2.0; it will not correctly install Windows Installer 3.0 or higher because the setup packaging is different and the command line parameters the setup wrapper passes in to install Windows Installer are hard-codedLink=http://go.microsoft.com/fwlink/?LinkId=45724 // Link to provide to users on Windows 2000 and higher machines if the required version of Windows Installer is not present and the Install value = 0; this link should point to the install location for the required version of Windows InstallerLink9x=http://go.microsoft.com/fwlink/?LinkId=45725 // Link to provide to users on Win9x-based machines if the required version of Windows Installer is not present and the Install value = 0; this link should point to the install location for the required version of Windows InstallerLinkNT4=http://go.microsoft.com/fwlink/?LinkId=45726 // Link to provide to users on NT4 machines if the required version of Windows Installer is not present and the Install value = 0; this link should point to the install location for the required version of Windows Installer
[DetectIE] // This section tells the setup wrapper whether or not to enforce a specific version of Internet Explorer as a prerequisiteX86=5.0.2919.6307 // The Internet Explorer version to search for on x86 machinesA64=5.0.2919.6307 // The Internet Explorer version to search for on AMD x64 machinesI64=5.0.2919.6307 // The Internet Explorer version to search for on Intel 64-bit machinesLink=http://www.microsoft.com/windows/ie/default.asp // Link to provide to users if the required version of Internet Explorer is not present; this link should point to the install location for the required version of Internet ExplorerVersionDisplay=5.01 // Friendly version number to display to the user in setup UI when this block is hit
[DetectNetFx] // This section tells the setup wrapper whether or not to enforce a specific version of the .NET Framework as a prerequisite; setup looks for the registry value HKLM\Software\Microsoft\NET Framework Setup\NDP\v<version>\<optional lang value>\Install = 1X86=2.0.50727 // The .NET Framework version to search for on x86 machines; replaces <version> in the registry key name listed aboveA64=2.0.50727 // The .NET Framework version to search for on AMD x64 machines; replaces <version> in the registry key name listed aboveI64=2.0.50727 // The .NET Framework version to search for on Intel 64-bit machines; replaces <version> in the registry key name listed aboveLink=http://go.microsoft.com/fwlink/?linkid=27895 // Link to provide to users if the required version of the .NET Framework is not present; this link should point to the install location for the required version of the .NET FrameworkLang=1033 // The LCID for the language of the .NET Framework that must be installed; replaces the <optional lang value> in the registry key name listed above if LangDetectionNeutral = 0; if this value = 1033, this detection section is skipped entirely (this logic is in place to allow for easier creation of non-English INI files in the build process for VS and the .NET Framework)LangDetectionNeutral=1 // Whether or not to append the Lang value as part of the registry key used to determine whether or not the version of the .NET Framework is already installed; if this equals 0, setup will append the Lang value, and if it is equal to 1 it will not
[BlockProductCode] // List of product codes that the setup wrapper should check for the presence of; if any are found, setup will block and tell the user to uninstall the products associated by the product codes{018F3F06-CDA6-492C-9B45-3687E29B7BC6}= // Each GUID is an MSI product code; it has an equal sign because the parser for the INI file expects strings in each section to be in the form <value> = <data><additional GUIDs removed from the real install.ini for length reasons>
[VSSetupWatson] // This section is used to collect Watson data when setup fails so that we can track the type of failures and offer remediation steps as we identify root causes and post workarounds via the Watson server; these values are all used to categorize the issues on the Watson serverVSSWSuccessEnabled=1VSSWSuccessHeadless=1VSSWFailedEnabled=1VSSWFailedHeadless=1VSSWProdName=Microsoft .NET Framework 2.0VSSWProdVer=8.0.50727.42_RTM_x86retVSSWSectionEnabled=1VSSWProdSAID=183VSSWInternalRelease=1
I have heard of several folks running into issues playing protected content (such as purchased songs/movies, or HBO television shows) after installing Update Rollup 2 for Media Center 2005. As I described here, Update Rollup 2 installs an updated Digital Rights Management (DRM) redistributable package. We are still investigating reports of content protection problems in order to identify root causes and provide fixes. In the meantime, I wanted to offer some suggestions.
First, I highly encourage you to backup your licenses for protected content prior to installing Update Rollup 2. You can do the following to backup licenses:
Note - there are some license issuers that will not allow you to store backup copies of their license files, so this backup process may not back up all licenses on your system.
Second, if you have already installed Update Rollup 2 without backing up licenses, and you are now unable to play protected content there is a knowledge base article that describes how to reset the DRM system on your computer. There is one step that should be added to that article that is not there currently - before deleting the Windows Media DRM folder, you need to close any programs that might be holding files in that folder in use. Specifically, make sure to close Media Player and Media Center, and run the command net stop ehRecvr to stop the Media Center Recording service immediately prior to trying to delete that folder.
Resetting DRM restores the ability to play protected content in most cases. However, if you use these steps to reset the DRM system and do not have backup copies of your licenses, you will lose the ability to play any previously acquired protected content. If you have content that you do not want to lose, I would encourage you to wait until we can identify and post a fix. If you are not concerned about any previous content, I encourage you to try out the steps in the KB article - they are semi-complicated, but I have used them in the past and had some success.
<update date="11/4/2005"> Added an additional step for the knowledge base article - stopping any processes that may have DRM files in use </update>
<update date="4/15/2006"> Added a link to a new DRM hotfix that is now available in case people find and read some of my older blog posts in an attempt to fix this type of issue </update>
There have been a few reports so far from customers who have installed Update Rollup 2 for Media Center 2005 and have had problems getting their infrared (IR) receivers or devices such as remote controls or wireless keyboards to work correctly afterwards. Update Rollup 2 setup installs an updated set of IR drivers (also shipped independently as KB888795) that have caused some sporadic issues. Here is a list of the workarounds we have seen be successful so far to resolve IR receiver/remote control issues after installing Update Rollup 2:
1. The IR receiver appears to be installed correctly but pressing buttons on the remote does not do anything
In this scenario, it is possible that the remote control has been configured to broadcast on a channel range that was supported previously but has since been removed. You can use the steps that I previously posted here to reconfigure your remote control to broadcast on a different channel to resolve this issue
2. One or more of the IR drivers is configured incorrectly in Device Manager
In this scenario, if you look in Device Manager (by going to the Start menu, choosing Run and typing devmgmt.msc), you will see yellow exclamation points next to one or more items in the Human Interface Devices category. The following steps will resolve this issue in most cases:
3. Some remote control buttons (number keys, arrows, enter) fail to function, while other buttons work as expected
We have not yet been able to reproduce this scenario in our test lab, but we have seen this set of steps resolve this issue on some customer machines so I wanted to post it here in case someone runs into a similar problem:
4. If none of the above suggestions work
There are some cases that we have seen where none of the above suggestions work. A customer posted a comment indicating that it sometimes helps to short the Media Center remote control to forcibly reset it. You can see more information about how to do that in this blog post.
<update date="12/29/2005"> Added a link to a new post I created with a description of how to short a remote control </update>
I have heard from a couple of customers who have encountered an error during setup for Update Rollup 2 for Media Center 2005, and setup then fails with a generic message (which simply states that setup failed). In the cases I have seen so far, one of the prereqisite packages for Update Rollup 2 (a DShow hotfix described by KB891593) failed to install because there was another hotfix installed that updates the same file (another DShow hotfix described by KB904706).
This does not happen on all computers that have KB904706 installed before attempting to install Update Rollup 2, but since it has been seen by multiple people now I wanted to post a workaround here just in case anyone else runs into it.
How do I know if this issue is the one affecting my machine?
You can diagnose this issue by looking at a couple of the log files that Update Rollup 2 setup creates. First, you can open %windir%\mcsetup.log in a text editor such as Notepad. If KB891593 is the package that fails on your system, you will see the following entry in mcsetup.log:
Generic Package: 09/20/05. 09:00:44Looking for existing install of the generic packageCreating Process: WindowsXP-KB891593-x86.exe /quiet /norestartProcess returned 0x00000643
The 0x00000643 return code (which translates to 1603 in decimal) represents the return code for a generic error in a Windows hotfix package.
Now, you can look at %windir%\kb891593.log to determine the exact reason why this hotfix failed to install. In the cases I have seen so far, the error in kb891593.log looks like the following:
3.437: DoInstallation: Installation was canceled because migration is blocked by following files:3.437: Package KB904706, File c:\windows\system32\dllcache\quartz.dll, Version 6.5.2600.2749, Branch SP2GDR3.437: Package KB904706, File c:\windows\system32\quartz.dll, Version 6.5.2600.2749, Branch SP2GDR3.453: KB891593 Setup encountered an error: Failed to migrate dependent packages.
How can I workaround this issue?
In the cases I have seen so far, uninstalling KB904706 and then attempting to reinstall Update Rollup 2 has proven successful. The following steps can be used to accomplish this:
Note: Once you have successfully installed Update Rollup 2 for Media Center 2005, you can safely reinstall KB904706 on your system if you would like to.
What is the root cause of this issue?
We are still trying to identify an exact root cause for this problem. Both KB891593 and KB904706 try to update the file %windir%\system32\quartz.dll, but there is a mechanism within the Windows hotfix setup wrapper (update.exe) that accounts for overlapping files and migrates copies of the file appropriately. We have attempted to reproduce this issue in our test lab and in the cases we have tried, Update Rollup 2 setup succeeds, and there is information like the following in kb891593.log:
30.891: MigrateHotfix: Migrating hotfix KB90470630.922: Migrating QFE KB904706 with command line: update.exe -Z -Q -B:sp2qfe46.500: MigrateHotfix: Hotfix KB904706 successfully migrated46.500: MigrateHotfixes: Return code: 3010
I will update this post if/when we discover better information about what is causing this problem and why it is not does not reproduce 100% of the time when we try it in our lab.
<update date="2/21/2006"> Added a note that it is safe to reinstall KB904706 after Update Rollup 2 has been successfully installed if you run into this scenario </update>
After hearing a couple of questions from customers and from folks inside of Microsoft, I thought it might be interesting to describe the setup contents and packaging strategy for Update Rollup 2 for Media Center 2005 in a bit more detail. Most of this information can be gleaned using some of the setup reverse engineering tips and tricks I've posted in the past (here, here and here for example).
The main Update Rollup 2 setup package that can be downloaded here or via Windows Update on MCE 2005 machines contains a setup UI chainer that silently installs a set of update.exe hotfix packages behind the scenes.
The following is a list of the packages that are installed by the Update Rollup 2 setup chainer and the order in which they are installed:
If you take a look at the KB numbers for each of these packages and cross-reference them against the list of log files produced during Update Rollup 2 setup that I listed in this blog post, you will see a nearly one-to-one mapping. Update.exe will produce a log file for each hotfix, and the general guideline is that log files produced by update.exe should be named %windir%\kb#####.log. The logs named %windir%\mcsetup.log and %windir%\mcsetup_ui.log are the log files produced by our setup UI chainer.
Update Rollup 2 has a dependency on the .NET Framework 1.1 and .NET Framework 1.1 SP1 being installed, but setup does not include these 2 dependencies as part of the chained setup package. Windows Update will automatically check your system and include these packages when you choose to install Update Rollup 2 on a machine that does not have them installed. Because of this, the download size reported on the Windows Update page will vary depending on the state of your machine at the time you choose to install Update Rollup 2. If the machine does not have .NET 1.1 at all, thedownload size will be ~62 megabytes on Windows Update. If it has .NET 1.1 but not SP1, the download size will be ~39 megabytes, and if it has .NET 1.1 and SP1, the download size will be ~29 megabytes.
We decided not to package the .NET Framework 1.1 or SP1 inside our chained setup package for a couple of reasons:
I would like to call your attention to an alpha version of a tool that Peter Rosser wrote that will automatically repair and re-register parts of Media Center to fix some of the issues we've seen so far with Update Rollup 2 for MCE 2005. You can read about the exact steps the tool does and where to get the tool in this blog post.
Please note that this tool is not "officially" supported, but it has proven useful in some scenarios already. Also, we will be making every effort to add additional steps to it as we discover workarounds for additional issues caused by Update Rollup 2. Also, as Peter states in his blog post, if the tool does not work for you, please contact us and let us know. I've posted a list of log files that would be useful to us from Update Rollup 2. Please send them to us with a description of the problem you're seeing. My email is aaronste@microsoft.com, and you can contact Peter here.
A couple of members of the Media Center team have started blogs in the past week. I'd encourage you to take a look at each of their blogs and welcome them!
Now that I've posted steps to diagnose and manually fix component registration failure errors that are sometimes seen after installing Update Rollup 2 for Media Center 2005, I have heard from a few customers who have run into this problem and worked with them to identify at least one possible underlying cause.
In the cases I have investigated so far, the NGEN commands that are run during Update Rollup 2 registration to fail with an "interface not found" return code. When running the same NGEN command separately, these machines showed an error message stating The procedure entry point GetRequestedRuntimeVersion could not be located in the dynamic link library mscoree.dll.
The underlying problem on these machines was that the version of %windir%\system32\mscoree.dll was reverted back to the .NET Framework 1.0 SP3 version (1.0.3705.6018). Ordinarily, mscoree.dll should be the .NET Framework 1.1 SP1 version (1.1.4322.2032) or higher on machines with Update Rollup 2 installed because the .NET Framework 1.1 SP1 is a prerequisite for installing Update Rollup 2.
The following steps have allowed the customers I have worked with so far to fix this issue:
I am still not clear about how mscoree.dll is being reverted in this scenario, so my next step is to figure out what exactly could cause that. This is an interesting convergence of my previous experience working on the .NET Framework setup team and my current experience on the Media Center setup team. Based on my experience on the .NET setup team, I can't think of any valid ways this file would be reverted like this. One possibility I can think of is performing a system restore - I know that performing a system restore will revert the file versions, but I don't know if it would leave behind the registry value that would trick Update Rollup 2 setup into thinking that 1.1 SP1 is installed when actually it isn't. For reference, the registry value that Update Rollup 2 setup looks at to detect the presence of .NET Framework 1.1 SP1 is HKEY_LOCAL_MACHINE\Software\Microsoft\NET Framework Setup\NDP\v1.1.4322@SP >= 1.
I think there may also be some potential conflicts with some older beta versions of the .NET Framework 2.0. I have not yet found a machine that demonstrates problems that I've traced back to .NET 2.0, but I do know that installing .NET 2.0 will update the version of %windir%\system32\mscoree.dll, and uninstalling .NET 2.0 will not revert it back because of how Windows Installer handles shared files and reference counting. I am going to try to create some repro scenarios to look at this further.
I'll post further updates when I figure out more about the root cause of these issues....
I have heard of a few cases where Visual Studio .NET 2002, 2003 or 2005 setup fails after launching the main setup.exe launcher screen and clicking on the first link to start the setup process. The error dialog that appears has the title Setup Initialization Error and an error string that looks something like the following:
Setup cannot access the required initialization file 'C:\PROGRA~1\SAP\FRONTEND\SAPGUI\FILC\ODBC\AUNCHER="C:\DOCUME~1\USERNAME\LOCALS~1\TEMP\"'.
There is a compatibility issue that prevents Visual Studio setup from being able to copy itself to the %temp% directory and relaunch itself if the SAP GUI client application is installed on the computer. The telltale indication that you've hit this problem is the \SAP\FRONTEND\SAPGUI\ information in the path listed in the error dialog during VS setup.
As a workaround, you can temporarily uninstall the SAP GUI client, install Visual Studio and then re-install the SAP GUI client if needed.
Since I posted the instructions for gathering setup log files for Update Rollup 2 for Media Center 2005 and asked folks to send the logs to me, I have gotten several sets of logs. I'm still looking through some of the issues to try to figure them out (and I apologize for the slow replies to those of you who have not heard back from me yet). There is one issue that I've now seen on multiple customer machines that I wanted to post a workaround for in case anyone else runs into it in the future.
What are the symptoms of this issue?
For this particular problem, customers have reported the following types of problems while using Media Center after upgrading to Update Rollup 2:
The machines I have seen that have had these problems so far have had errors logged in %windir%\medctroc.log. This log is appended to during every Media Center setup action, so you have to find the section that corresponds to the registration that happens at the end of Update Rollup 2 setup. To find this, you can search for the string 5.1.2710.2732. There should be multiple instances of this string in this log file. You will need to find the entry that is followed a few lines later by a line stating Will run in registration mode.
Once you have found the Update Rollup 2 registration section, look for the group of commands labeled Removing existing native assemblies... In each of the cases I have seen so far, there are entries in this section like the following:
Executing line "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\ngen.exe /nologo /delete ehiwmp" Warning: Process Return Value is 0xc0000139 --> (null) Error: Failed to apply command to ehiwmp (return value: 0xc0000139).
Then you should see another entry in the log file during this same registration session that states:
Encountered errors during registration of Windows Media Center. Please see {C:\WINDOWS\medctroc.Log} for details.
If you have the above entries in your %windir%\medctroc.log file, you can do the following to repair your computer:
There are a couple of problems that cause this issue. The first is a logic problem with the setup registration program (%windir%\ehome\medctrro.exe). When it encounters an error like the NGEN error listed above, it continues until it is done processing managed assemblies but then it stops without performing the rest of the registration steps. This means that the machine is left in the state where new assemblies from Update Rollup 2 are added to the GAC, but the ehSched and ehRecvr services and the ehRec and ehMsas executables are unregistered. These services and COM servers are used for a lot of functionality inside of Media Center, particularly TV. Therefore if they are left in an unregistered state, MCE fails in many places.
The second issue is that the command to run NGEN is failing with an unexpected error code 0xc0000139 in some cases. This error code means "entry point not found" but I have not been able to reproduce this on one of my test machines so I don't understand exactly why this error is appearing. I have asked a couple of folks who hit this problem to try running the NGEN commands directly to see if they give more descriptive error messages. I will update this blog post when I know more about the root cause of NGEN failing in these scenarios.
<update date="10/20/2005"> We have found one root cause of this type of error, and I have posted a description and a simpler workaround for this error in this blog post </update>
<update date="10/30/2005"> It appears that the link to the simpler workaround isn't being found in the update text, so I've updated the workaround to contain the steps from my newer blog post to avoid confusion </update>
<update date="1/12/2010"> Added a note about rebooting at the end of the registration process. </update>
A couple of folks have contacted me and mentioned that they have had trouble using the TweakMCE power toy after installing Update Rollup 2 for MCE 2005. I remembered that Matt Goyer had posted an item about TweakMCE a few weeks ago indicating that there will be a new version that will be available shortly after Update Rollup 2 itself is released. I looked around a bit and couldn't find an updated version that we've posted to the web yet, so I took a look at the version that is currently available on the web. The setup package is an MSI and it is not checking for a specific version of Media Center before letting you install (it only verifies that the OS is running Media Center, but doesn't care which version). However, there is a check that happens at runtime that will block TweakMCE from running unless specific versions of Media Center are installed (specifically - Media Center 2005 or Media Center 2005 with Update Rollup 1).
If you would like to use the currently available version of TweakMCE on a computer with Update Rollup 2 installed, you can use this temporary workaround to get past the runtime check (note you will need to have write permissions to HKLM for this workaround to work, meaning you will need to at least have power user privileges on your computer with the currently logged in user):
Of course, I encourage you to keep an eye out and download and install the updated version of TweakMCE when it is available instead of using this workaround in the future. There are some settings that will be added to the new version of TweakMCE to modify new MCE settings that have been added in Update Rollup 2.
Please let me know if you run into any issues getting this workaround to work for you....
I have heard from a couple of folks so far who have tried to install Update Rollup 2 for Windows XP Media Center Edition 2005 and ran into problems during installation or while trying to use Media Center after installation completed.
Update Rollup 2 setup is implemented as a chained set of Windows XP hotfixes, a DRM update, and the main Media Center update.exe package. The following is a list of log files for each of the packages installed as part of Update Rollup 2:
Note - in the paths listed above %windir% and %ALLUSERSPROFILE% are environment variables. You can go directly to those folder locations by clicking on the Start menu, choosing Run, typing either %windir% or %ALLUSERSPROFILE% and clicking OK. That will open up the chosen folder in Windows Explorer.
If you run into any issues while installing Update Rollup 2, please gather up all of the logs from the above list that exist on your computer, zip them and attach them in an email to me so I can take a look and try to diagnose the problem you're running into and provide a workaround or fix. You can email me at aaronste@microsoft.com, or use my blog contact form.
If you prefer, you can download this script and run it to automatically gather all of the above files into a single directory. You will need to make sure to zip them so that they will not be too large to send via email.
<update date="10/20/2005"> Added a couple of additional log files to the list </update>
<update date="10/24/2005"> Added one more log file to the list </update>
<update date="10/25/2005"> Added a link to a script that will automatically gather all of the files </update>
<update date="12/1/2005"> Added another log file to the list </update>
<update date="2/18/2006"> Added log files produced by the most recent Media Center hotfix packages </update>
<update date="4/28/2006"> Added log files produced by the April 2006 Media Center hotfix packages </update>
<update date="1/2/2007"> Added log files produced by the July 2006 and October 2006 Media Center hotfix packages </update>
<update date="11/20/2007"> Added information about how to find %windir% and %ALLUSERSPROFILE% </update>
A few weeks ago, I posted an entry describing a scenario where you may encounter package load failure error dialogs for the Class Designer Package while using the Visual Studio 2005 IDE after uninstalling VS 2005 beta 2 in an incorrect order and then installing a later CTP or the release candidate build. Since then I've had a few people contact me who had trouble getting the steps that I posted in that previous post to work, so I wanted to post a more straightforward set of steps that didn't require installing Orca and navigating through the VS MSI.
If you are running into this issue, I would first encourage you to download and use the updated version of the VS 2005 cleanup tool, which will automate cleaning up the files that cause this package load failure. Please note that this tool is only designed to help solve issues caused by previous beta versions of VS 2005 that were installed on your system. If you have not ever had a beta of VS 2005 on your system, this tool will likely not help you.
If you would prefer to clean it up manually, here are some more straightforward steps that will allow you to do so. Note that these steps assume that the machine has previously had VS 2005 beta 2 installed and that it was uninstalled in an incorrect order (meaning the order of uninstall listed here was not followed exactly). It also assumes that the machine has a later build of VS 2005 already installed.
Note that I have inserted spaces into some of the commands above to force it to word wrap on the blog site. If you copy and paste these steps please remove the spaces before running the commands listed above.
<update date="7/21/2009"> Fixed broken link to VS 2005 beta cleanup tool. </update>
As I mentioned earlier, Update Rollup 2 for Windows XP Media Center Edition 2005 was released on Windows Update this morning. In addition, the setup package is available for download on the Microsoft Download Center. Here are the direct links for the packages for each of the languages we support so you don't have to search for them:
Here are some additional links for packages that go along with Update Rollup 2:
As of 8am Pacific Standard Time this morning, Update Rollup 2 for Windows XP Media Center Edition 2005 is now available for download. It is being announced at the Digital Life conference in New York City this morning. This new update rollup will be offered as a recommended update on all computers running Windows XP Media Center Edition 2005.
There is a lot of cool stuff included in Update Rollup 2 (in fact, naming it an "update rollup" doesn't come close to doing this product justice). Here are some of the highlights:
Update Rollup 2 requires that the .NET Framework 1.1 and 1.1 SP1 be installed. Windows Update will automatically include these packages on computers that need them when you choose to install Update Rollup 2 via WU. One note here - the issue I described here regarding .NET Framework hotfix 886904 will affect Update Rollup 2 if you try to install on a machine that has .NET Framework 1.1 and KB886904 installed but don't yet have 1.1 SP1 installed. If your computer is in this state and you see Update Rollup 2 fail to install via Windows Update, make sure to uninstall KB886904 using Add/Remove Programs and then try to install Update Rollup 2 again.
In addition, there is a small set of additional fixes that we were not able to get ready in time to include in Update Rollup 2 before our final sign-off, but that are now ready for download. After installing Update Rollup 2, you will see an additional update (KB908250) available for download as a recommended update on Windows Update.
I strongly encourage you to install both Update Rollup 2 and KB908250. Let me know if you run into any issues or have any questions as you try to install it and start using it.
I just stumbled onto a link on MSDN to download a tool called the Microsoft Component Installer Software Development Kit. This tool aims to make it easier for setup developers to bootstrap and install common Microsoft components, including the following:
I downloaded it and took a look and it seems pretty straightforward to use, and it is INI-driven so you can enable or disable bootstrapping to only target the components you need in your scenarios. I haven't actually tried to use it yet though, so I'm curious if anyone out there has tried this tool yet for your setup scenarios. If so, please post a comment and let me know what you think - is this tool useful? Does it address some/all/any of your scenarios? Are there big functional holes that make it not feasible in your scenarios?