Aaron Stebner's WebLog

Thoughts about setup and deployment issues, WiX, XNA, the .NET Framework and Visual Studio

16 Oct 2005

  • Aaron Stebner's WebLog

    How to select an audio channel if the Audio menu does not appear in Update Rollup 2


    I recently heard from a customer who lives in Spain and has been using Media Center 2005 for a while.  After installing Update Rollup 2 for Media Center 2005, they reported to me that they could no longer change the audio channel for their television shows from stereo to SAP because they could not find the Audio menu in the TV Settings menu on their system anymore.  After digging through the source code and asking around on the team a little bit, here is what I found out about this scenario:

    In Media Center 2005, there was an Audio menu under Settings | TV.  This Audio menu contained an audio channel spinner that let you choose between stereo and SAP.  It also contained other spinners and text boxes that could be used to configure captioning for television shows.  The Audio menu was configured to always be displayed in the list of TV Settings menues, no matter what locale you lived in and configured your OS for.

    In Update Rollup 2, the captioning settings have been broken out into a separate menu under Settings | TV.  This left the stereo/SAP spinner as the only item in the Audio menu.  Therefore, we added a condition to the Audio menu itself so it would be hidden in locales that did not support SAP.

    In the case of this customer, they indicated to me that Spain technically does not support SAP, but they do support NICAM DUAL, which works roughly the same way to deliver alternate audio tracks for television shows.  However, Media Center treats Spain as a locale that does not support SAP and hides the Audio menu entirely.

    I am not sure if there are any countries or regions other than Spain affected by this logic change in the Audio settings menu in Media Center 2005.  There is not any workaround to enable this menu in an affected country or region, but there are a couple of registry values that can be updated to cause Media Center to use the SAP audio channel instead of the default stereo channel.

    You can click on the Start menu, choose Run, type cmd, and then run the following 2 commands in a cmd prompt to set the registry values necessary to enable the SAP audio channel in Media Center 2005:

    • reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Media Center\Settings\VideoSettings" /v PreferredLanguageID /t REG_DWORD /d 1 /f
    • reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Media Center\Settings\VideoSettings" /v SAPOn /t REG_DWORD /d 1 /f


  • Aaron Stebner's WebLog

    ClickThrough - a new WiX tool for creation and automatic updating of simple MSI packages


    Rob Mensching posted a blog entry last week that I wanted to make sure everyone reading my blog also sees.  In this post, he introduces a new tool in the WiX toolset called ClickThrough (which can be downloaded here).  ClickThrough is still in a relatively early phase of the development process, but the drop that is currently available has some pretty nice functionality:

    • Graphical user interface for creating an MSI for an application designed to be distributed via the Internet (using WiX behind the scenes to represent and build the MSI)
    • Self-extracting setup.exe that installs the MSI
    • Update executable that polls an RSS feed to detect new versions of the application and then installs them automatically

    The current version of ClickThrough is designed to install isolated, low impact applications - ones that are installed on a per-user basis and do not require administrative privileges to install.  Future iterations will address creating setup packages for other types of applications.

    I've been playing around with ClickThrough a bit and have been able to use it to successfully create and deploy simple applications.  You may run into some bugs or usability issues or have some feature suggestions, and they can be reported here (for bugs) and here (for feature suggestions).  Keep in mind that Rob has posted a disclaimer at the top of his post about ClickThrough indicating that it is "just-post-prototype" and should not be used in production software yet.

    As a side note, you'll notice if you download and install ClickThrough that it is installed and updated using ClickThrough itself, kind of like using the compiler to build the code for the compiler itself  :-)


  • Aaron Stebner's WebLog

    Introducing the Visual Studio 2005 and .NET Framework 2.0 Setup Troubleshooting Guide


    I've talked to a few folks who work at Microsoft who have resolved issues installing the final release of Visual Studio 2005 and the .NET Framework 2.0 using some of my previous blog posts.  I realized that I've posted quite a few random tips and tricks for getting beta uninstall to work and final release setup to work over the past few weeks and months, and I usually know exactly where to find them and when they are applicable.  Unfortunately, the searching mechanism for MSDN blogs is not perfect, so it sometimes can be hard for others to find the information they need to resolve their setup issues.

    As a result, I decided to post a new article that can serve as a central collection point for all of these tips and tricks.  You can click on the link to view the Visual Studio 2005 and .NET Framework 2.0 Setup Troubleshooting Guide.

    As I create new blog posts, I will update this central article as well in order to try to make it as easy as possible to find information about Visual Studio 2005 and .NET Framework 2.0 setup issues.


  • Aaron Stebner's WebLog

    Errors in MCE 2005 after installing Update Rollup 2 if Rudeo PC Remote Control is also installed


    I heard from a customer today who was running into component registration failure errors after installing Update Rollup 2 for Media Center 2005.  In this case, they tried the workaround for the .NET Framework issue described in this previous blog post, but it did not resolve the errors.  I found the following information in the file %windir%\medctrro.log that the customer sent me:

    GACAssembliesAddRemove: Failed to uninstall assembly (Microsoft.MediaCenter)

    Fortunately, I had seen a similar problem in the past where an add-in had installed a copy of Microsoft.MediaCenter.dll as part of their setup so I had an idea of where to start in troubleshooting this issue.  The file Microsoft.MediaCenter.dll is always installed on Media Center 2005 computers as part of the OS.  When an application that is packaged using an MSI-based setup is installed on the Media Center 2005 OS and it tries to install Microsoft.MediaCenter.dll (or any other assembly that is installed as part of the OS), it adds an additional reference count on the file.  Then, when Update Rollup 2 or any other Media Center hotfix tries to uninstall the old copy of this file from the GAC and then install the new copy of the file to the GAC, the uninstallation fails because of the additional reference count held on this file.  Media Center hotfix setup halts at the point of this failure, and the remaining registration steps are not run (including registering Media Center services such as ehRecvr and ehSched).

    What I had the customer do was use the tool described in this blog post to run the msiinv.exe tool with the verbose switch (-v).  Then I searched for Microsoft.MediaCenter.dll in the output from msiinv.exe.  In the case of this customer, they had a product called Rudeo MCE Control installed.  I went to the company's web site and found a trial version of the Rudeo MCE Control.  Looking at the MSI for this product in Orca showed that it was indeed installing a copy of Microsoft.MediaCenter.dll to the GAC.

    I had the customer uninstall the Rudeo MCE Control and then re-install Update Rollup 2 from this location and Media Center Hotfix KB908250 from this location to resolve these component registration failure errors.

    If you run into this issue, you can re-install the Rudeo MCE Control software after you uninstall it and then install Update Rollup 2.  However, if there is any future Media Center hotfix that needs to update Microsoft.MediaCenter.dll, then you will have to uninstall the Rudeo MCE Control software before the future hotfix will install successfully due to the root cause described above.


  • Aaron Stebner's WebLog

    How to resolve invalid license data errors after upgrading to the final release of Visual Studio 2005


    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:

    Visual Studio 2005 invalid license data error

    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:

    1. Uninstall the Visual Studio 2005 product that you have installed.  You only have to uninstall the main Visual Studio product entry in Add or Remove Programs, and you can leave the other pieces installed by Visual Studio setup (such as the .NET Framework 2.0, MSDN, SQL Express, etc) alone.  The product name in Add or Remove Programs that you want to uninstall is dependent on the VS 2005 edition you have installed.  For example, for the English Professional edition, the product name will be "Microsoft Visual Studio 2005 Professional - ENU"
    2. Click on Start, choose Run and type cmd
    3. Copy and paste each of the following commands into the cmd prompt to clean up orphaned Visual Studio licensing data in your registry: 
      reg delete HKCR\Licenses\17A13F5F-2dE4-4691-B332-83CA4CC38935 /f
      reg delete HKCR\Licenses\2F1682F3-6A3C-4545-AF41-6836A22276CF /f
      reg delete HKCR\Licenses\2FE88699-A1AF-410D-8049-1CB6BA8F8FF2 /f
      reg delete HKCR\Licenses\5BCBC240-27DF-49C1-8C1C-27B8463009A9 /f
      reg delete HKCR\Licenses\895E2152-C3F9-4C49-968B-15B08ADA0F37 /f
      reg delete HKCR\Licenses\95C63E85-8244-4D86-8327-579B85EC154C /f
      reg delete HKCR\Licenses\BA32367F-28F8-4AEA-848D-95AE438B3B9C /f
    4. If you are installing on a 64-bit OS, copy and paste each of the following commands into the cmd prompt to clean up orphaned Visual Studio licensing data in your registry:
      reg delete HKCR\Wow6432Node\Licenses\17A13F5F-2dE4-4691-B332-83CA4CC38935 /f
      reg delete HKCR\Wow6432Node\Licenses\2F1682F3-6A3C-4545-AF41-6836A22276CF /f
      reg delete HKCR\Wow6432Node\Licenses\2FE88699-A1AF-410D-8049-1CB6BA8F8FF2 /f
      reg delete HKCR\Wow6432Node\Licenses\5BCBC240-27DF-49C1-8C1C-27B8463009A9 /f
      reg delete HKCR\Wow6432Node\Licenses\895E2152-C3F9-4C49-968B-15B08ADA0F37 /f
      reg delete HKCR\Wow6432Node\Licenses\95C63E85-8244-4D86-8327-579B85EC154C /f
      reg delete HKCR\Wow6432Node\Licenses\BA32367F-28F8-4AEA-848D-95AE438B3B9C /f
    5. Re-install the Visual Studio 2005 product that you uninstalled in step 1 above

    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>


  • Aaron Stebner's WebLog

    How to fix IR learning problems that occur after installing Update Rollup 2 for Media Center 2005


    I have heard from a couple of folks who have had trouble getting IR learning to work for their universal remote controls after installing Update Rollup 2 for Media Center 2005.

    As I described in this blog post, Update Rollup 2 installs an updated set of IR drivers (via KB888795), among other things.  Unfortunately, there is a design flaw in the Windows driver installer - it will always writes this registry key anytime a new IR receiver device is enumerated by plug-and-play.  The IR rollup package that is installed as a prerequisite of Update Rollup 2 forces such an enumeration when it upgrade the IR drivers.  Also, this registry key can be overwritten if you plug in a new IR receiver.  Doing so will cause the new device to be enumerated by plug-and-play, and the driver installation overwrites the registry key.

    Whenever IR drivers are updated (such as when you install Update Rollup 2), it is necessary to update a registry value to re-enable IR learning in universal remote controls.  You can do so by using the following steps to reset the necessary registry value and then rebooting your machine to cause it to take effect:

    1. Click on the Start menu, choose Run, type cmd and click OK
    2. Run this command:  reg add HKLM\SYSTEM\CurrentControlSet\Services\HidIr\Remotes\745a17a0-74d3-11d0-b6fe-00a0c90f57da /v EnableDebounce /t REG_DWORD /d 0 /f
    3. Reboot to cause the change to take effect


  • Aaron Stebner's WebLog

    How to specify the exact time for Media Center guide downloads


    I received a question from a customer today asking how they could update their Media Center television guide download time.  It had been set for 4:50am and they wanted to change it to some other time in order to not be woken up by a dialing modem sound.  I looked at the TweakMCE tool, but that didn't offer any configuration settings for guide download time.  Then I found the registry value that is used to control guide download time:

    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Media Center\Service\EPG]

    Unfortunately, the value in question is a REG_QWORD, so it is very difficult to manually change it to a specific time of your choosing.  Fortunately, the customer found out that there is a tool that Peter Rosser wrote that lets you specify the exact time that you want guide downloads to happen.  You can read about and download a copy of his tool at this location.

    Note that after you change the preferred Media Center guide download time, you will need to stop and restart the Media Center Scheduler service by running net stop ehsched and then net start ehsched (or if you'd prefer, by rebooting the computer).

    <update date="11/14/2005"> Added note that ehSched needs to be stopped and restarted for the time change to take effect </update>


  • Aaron Stebner's WebLog

    Visual Studio 2005 IDE (devenv.exe) command line switches


    There is some good documentation available on MSDN that describes various command line switches that are supported by the Visual Studio 2005 IDE (devenv.exe).  Many of these switches have existed in previous versions of Visual Studio.

    However, I wanted to draw your attention to a new switch that was added in Visual Studio 2005 - the /log switch.  This switch allows you to run Visual Studio and cause it to generate a log file of the various activities that it does behind the scenes.  This switch can be useful in debugging problems where the IDE crashes when you try to launch it, when you encounter package load failure error messages, or when you see various other errors while using various Visual Studio features.

    The syntax for using this switch is the following:

    devenv.exe /log <full path to log file>

    The documentation currently states that the log file path is required and that it must exist before running this command line, but I have found this is not true in my experience.  I have seen this log created if it does not exist.  Also, if you do not pass in a path, Visual Studio 2005 will use the file named %USERPROFILE%\Application Data\Microsoft\VisualStudio\8.0\activitylog.xml by default.

    You can find devenv.exe in the C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\ folder (if you do a default installation of Visual Studio 2005 and your OS is on the C drive - you'll have to adjust the path as appropriate on your system).

    Also note, the file devenv.exe is the name of the IDE executable on the main Visual Studio editions (Professional, Team System, etc).  For the Express Editions, each IDE executable has a different name:


  • Aaron Stebner's WebLog

    VS 2005 setup fails with 1935 or 2908 error

    I have heard from a couple of customers who have tried to install the final release of Visual Studio 2005 or one of the Express Editions and have gotten 1935 (or 2908) errors with HRESULT values of 0x8002802F, and then setup failed and rolled back.  The cases I have seen so far have had the same root cause as the problem I described in this previous blog post.

    In the cases I have seen for this problem in the final release of VS 2005, the machines had the .NET Framework 1.1 installed, and the version of %windir%\system32\mscoree.dll was 1.1.4322.573 or 1.1.4322.2032.  When VS setup tried to install assemblies to the GAC, it failed because Windows Installer tried to call into a 2.0-specific API from mscoree.dll (needed because there are new processor architecture attributes on VS 2005 assemblies that only 2.0 knows about).  Since the version of mscoree.dll on the system was 1.1, these API calls failed.  This issue is described in more detail in my 1935 troubleshooting guide if you are interested.

    The underlying problem was that VS setup detected that the .NET Framework 2.0 was already installed and skipped that prerequisite step.  However, the machine did not actually have the .NET Framework 2.0 installed, but instead only had the registry key that VS setup uses to detect whether or not the .NET Framework 2.0 is installed.  I found that the machines had the following orphaned registry key/value that VS setup uses to determine that .NET Framework 2.0 was already installed:

    • Key name: HKLM\Software\Microsoft\NET Framework Setup\NDP\v2.0.50727
    • Value name: MSI
    • Data type: REG_DWORD
    • Value data: 1

    Once the customers deleted this key/value and re-ran VS 2005 setup, it detected that it needed to install the .NET Framework 2.0, and after installing that, VS setup worked perfectly.

    As a side note if you're really interested, you could use some of the setup reverse engineering tricks that I describe here to determine the exact location of this registry key.  In this case, the key/value are listed in the [gencomp18] section of the file named baseline.dat in the setup subdirectory of the VS 2005 DVD or in the self-extracting setup package for the Express Editions.


  • Aaron Stebner's WebLog

    Another possible resolution to guide download error 23 caused by the BITS service


    I have been working with a customer who ran into error code 23 while trying to download Media Center guide information after installing Update Rollup 2 for Media Center 2005.  Using the steps listed in this previous blog post, we tried to repair the BITS service using the bitsadmin.exe tool that is part of the Windows XP SP2 support tools package.  Running that tool gave an error like the following:

    Failed to instantiate BITS Manager interface... - 0x80080005
    Server execution failed

    After talking to the BITS team, I had the customer try the following workaround and it solved the issue on this machine:

    1. Check to see if the registry sub-key named HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\BackupRestore\FilesNotToBackup exists on the system
    2. If not, click on the Start menu, choose Run and type cmd
    3. Run the command reg add HKLM\SYSTEM\CurrentControlSet\Control\BackupRestore\FilesNotToBackup /f in the cmd prompt window
    4. After adding this registry value, try to start the BITS service by running net start bits

    I am not sure how that registry value got deleted on this machine, but adding it back allowed Media Center guide download and other BITS-related download functionality such as Windows Update to start working again.


  • Aaron Stebner's WebLog

    What to do if I get package load failures in the final release of VS 2005?


    IMPORTANT UPDATE - I have posted an updated set of steps for working around package load failures.  Please read that blog post instead of this post because it contains additional information not listed here.  I do not want to take this post down because I want to keep the comments so others can read them, but this post is essentially obsolete due to the new blog entry I have posted.

    Since the final release of Visual Studio 2005 and the .NET Framework 2.0, I have heard from several customers who have been using beta versions of VS, SQL and .NET 2.0, and have followed the uninstall steps to the best of their ability (including trying the auto-uninstall tool linked at the top of the uninstall instructions page) but are still encountering Package Load Failure error messages in the VS IDE after installing the final release.

    If you currently have the final release of any version of VS 2005 installed (including the Express Editions), and you are encountering package load failures, here is what I recommend that you do to resolve these issues:

    1.  Try to run the VS 2005 troubleshooting tool

    Before trying the next set of steps, please download and run the VS 2005 troubleshooting tool.  This tool is built on the same code base as the auto-uninstall tool, but it has knowledge of some specific problems that existed in previous beta versions of VS 2005 and knows how to go in and surgically clean them up.

    2.  Try to run the following command line to clear out the native image cache

    Click on the Start menu, choose Run and type cmd, then type rd /s /q %windir%\assembly\NativeImages_v2.0.50727_32\Microsoft.VisualStu# and press enter to remove native images from the cache.

    3.  Manually search for orphaned files in the GAC

    I have found that there are some cases where some additional files are getting orphaned on the machine that my test scenarios haven't caught yet (because we shipped a lot of different beta versions and I don't have the time to test out every uninstall permutation, etc).  If I haven't seen the issue in my testing, it hasn't been added to the troubleshooting tool and therefore that tool won't always be helpful.

    In general, the orphaned files that cause package load failures are located in the GAC (which is located at %windir%\assembly on your machine).  So, if you have already run the troubleshooting tool and are still running into package load failures, here are some additional steps that have proven useful in identifying additional orphaned files:

    1. Download the FSnap tool and extract it to c:\fsnap.exe on your machine
    2. Run c:\fsnap.exe /bs c:\windows\assembly\ > c:\file_list.txt
    3. Look at the contents of c:\file_list.txt for any files with version number 2.0.xxxxx.xx or 8.0.xxxxx.xx where the xxxxx.xx is not equal to 50727.42
    4. Remove the files that fit this criteria using gacutil.exe (which is installed to %ProgramFiles%\Microsoft Visual Studio 8\SDK\v2.0\Bin if you have VS 2005 installed and chose to install the .NET Framework SDK tools, or can be installed by installing the .NET Framework 2.0 SDK) or by using DOS commands in a cmd prompt

    I have found it useful to import the contents of c:\file_list.txt into Excel and then sort alphabetically by column G (which is the file version column).  That makes it easier to zero in on files that have suspicious version information.

    Please note that you will need to change the paths in the steps above if you have your OS installed on a drive other than C.  Also, make sure that you include the trailing \ after the "assembly" folder name or else the FSnap tool will not work correctly. 

    4.  Help me make the troubleshooting tool better

    If you use FSnap and manually delete files and that resolves the package load failures you are seeing, I would appreciate it if you could let me know which files you removed that fixed the issue (either via the contact form or a comment on this post).  If I see common problems that the tool is not yet able to fix, I can add them to the tool and post an updated version to help everyone else out who might hit the same issue.

    Hopefully this will help resolve any lingering package load failure issues that you might be seeing.  If these steps still do not work please contact me and let me know.

    <update date="11/18/2005"> Added an additional step to clear out the native image cache based on findings I posted here </update>

    <update date="12/16/2005"> Added an updated link to a newer set of steps at the top of this blog post </update>


  • Aaron Stebner's WebLog

    My adventure creating a Media Center add-in, part 4


    I know it has been a very long time since my previous post in this series, and I apologize for that.  I have been pretty busy getting Update Rollup 2 ready and then working through some of the issues seen by customers after we released it.  At any rate, I was sitting at the car dealership yesterday afternoon waiting for an oil change and tire rotation and decided to pick back up my effort to create a Media Center add-in.

    The first thing I realized that I should do is check out the updated version of the Media Center SDK because we shipped an updated version at the same time that we released Update Rollup 2.  So I started out by visiting the download site for the SDK and tried to download and install it.  Since I already had the previous version of the SDK installed, I received a Windows Installer error dialog stating that another version of this product was already installed on the system.  So I went and dug through my Add/Remove Programs control panel and uninstalled the version of the SDK that I had installed, then went back to the download site and this time it installed fine.

    I decided I wanted to try to look at the code and try to build one of the sample add-ins to get a feel for what this process looks like to the average add-in developer, and also because I wanted to see what the default add-in MSI would look like after using Visual Studio to build the MSI.  I decided to start with the screen saver sample (located in C:\Program Files\Microsoft\Microsoft Windows XP Media Center SDK\Sample AddIns\ScreenSaver if you install the SDK to the default location).  I found the ScreenSaver.sln file and double-clicked on it to launch it in Visual Studio.  I happened to have Visual Studio 2005 installed on my laptop, so I was prompted to convert the project files to the new format and stepped through the wizard to complete that task.

    I glanced briefly through the code in Connect.cs and it made reasonable sense from a conceptual perspective.  So I decided to try to build the project by pressing Ctrl + Shift + B in the VS IDE.  When I did that, it ran for a while and then gave me some error messages about unresolved references.  As it turns out, there is a reference to the Microsoft.MediaCenter assembly in the References node in the VS Solution Explorer, and it had a yellow exclamation point next to it on my machine, which indicates that the file couldn not be found in the expected location on my system.  It was expecting to find Microsoft.MediaCenter installed to the GAC, but since my laptop is running Windows XP Pro and not Media Center, that file didn't exist anywhere on my system.

    This presented an interesting dilemma to me - how do I get Microsoft.MediaCenter onto my development machine so that it will be recognized and allow me to successfully build this screen saver sample?  I had been planning to use a remote development strategy for creating an add-in (create it on a development machine, deploy it to a MCE machine to test it out, iterate as needed).  I definitely wasn't planning on using my Media Center machine as both the development machine and the test machine - it is configured on my TV in my living room, is set to 1600x900 resolution so the standard Windows desktop is barely readable without squinting and getting eye strain, and it doesn't even have Visual Studio installed anyways.  Plus, at the time I tried to build this project, I was sitting in a car dealership and didn't have access to a copy of Microsoft.MediaCenter.dll to work around this issue.  I dug through the MCE SDK documentation for a little while but couldn't find any mention of specific steps to take to build the sample add-ins correctly.  So I temporarily gave up on fixing the build until I got home.

    Once I got home I found a copy of Microsoft.MediaCenter.dll on my Media Center machine, copied it to the GAC on my laptop by using gacutil.exe (a tool that is installed as part of the .NET Framework SDK), and tried again to build the ScreenSaver add-in.  This time it worked fine for me - the assembly reference no longer appeared with a yellow exclamation point and the project built correctly.

    This is about all I had the energy to try last night, so I'm going to end this post here.  Next time, I'm planning on looking at the contents of the MSI that was created for the add-in and see if I can figure out a way to simplify the 26 step process in the SDK document entitled Creating a Windows Installer File for an Add-in.

    [to be continued]


  • Aaron Stebner's WebLog

    New version of TweakMCE is now available


    As some of you have noticed, the TweakMCE tool did not work correctly once we released Update Rollup 2 for Media Center 2005.  I am happy to say that there is now a new version of TweakMCE available that is designed to work with Update Rollup 2.

    TweakMCE v2.0 allows you to configure system settings and options not otherwise exposed in the Windows XP Media Center Edition user interface, including remote control settings, skip and replay time customizations, user interface options, and more. It also helps you to optimize Media Center Extender for plasma and non-CRT displays.

    The new version contains all of the features of the previous version, and also supports configuring the following settings that are either new in Update Rollup 2 or were just not supported in the old version of TweakMCE:

    • Overscan adjustments
    • Tweak the DVD changer
    • Fixes to the Extender tweaks
    • Fixes to the universal remote control setting

    Thanks to Jason for pointing out that this new version of TweakMCE has been posted for download.


  • Aaron Stebner's WebLog

    List of all possible Media Center guide download errors


    I've published an article that contains a full list of the possible error codes that can be encountered while trying to download Media Center guide data.  This list includes some suggested remedies for each error, and also describes how to navigate through your Application event log to locate the error codes and error strings so that you can match them to the list.  If you are running into guide download errors in Media Center, I encourage you to check out the Guide Download Error Codes article to see if any of the information in it can help resolve the issue for you.


  • Aaron Stebner's WebLog

    How the .NET Framework can get reverted and cause problems for Update Rollup 2 for MCE 2005


    I have previously written about component registration failure errors that have been seen in some instances after installing Update Rollup 2 for Media Center 2005.  As I described here, the primary root cause we have seen for this type of error is that the version of mscoree.dll in %windir%\system32 gets reverted from the .NET Framework 1.1 SP1 version to the .NET Framework 1.0 SP3 version.

    After investigating this issue a bit more, we have found some scenarios that will cause this file to be reverted like this.  In particular, the following set of steps will cause this to repro:

    1. Install Media Center 2004
    2. Install the .NET Framework 1.1
    3. Install the .NET Framework 1.1 SP1
    4. Upgrade to Media Center 2005

    What happens behind the scenes in this scenario is that the Media Center 2005 upgrade performs the equivalent of an OS reinstall but without reformatting the partition that the OS is installed to.  The .NET Framework 1.0 SP3 is a part of the OS in Media Center 2005, and it is a design philosophy of OS setup that it will install any files that are a part of the OS regardless of whether or not there are later versions of those files already present on the file system.  The reason for this is that computers could be in unknown states with higher versions of some files, but the bits that were shipped on the OS are known to work well together and be tested as a single unit.

    After performing this upgrade, the file %windir%\system32\mscoree.dll is updated to the 1.0 SP3 version that is included as part of the OS in Media Center 2005.  However, the .NET Framework 1.1 and 1.1 SP1 are still considered to be installed by Windows Installer and Windows Update.  That means that if you visit Windows Update on a machine that has been upgraded in this manner, you will be offered Update Rollup 2, but not be offered the .NET Framework 1.1 or 1.1 SP1.

    One of the commands run during Update Rollup 2 setup specifically calls the 1.1 version of ngen.exe, but that version of ngen.exe will not work correctly with the 1.0 SP3 version of mscoree.dll, so setup detects this error and stops running any further registration code.  That leaves the machine in a state where some Media Center components are not registered.  In order to get Media Center fully registered and recover from this scenario, you can run the following steps:

    1. Install the .NET Framework 1.1 SP1 or a later version of the .NET Framework such as the .NET Framework 2.0
    2. Click on the Start menu, choose Run and type cmd
    3. From the cmd prompt, run %windir%\ehome\medctrro.exe /o /p RunOnce to complete Media Center registration that was previously skipped


  • Aaron Stebner's WebLog

    Available command line switches for .NET Framework 2.0 setup


    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:

    • /a - Launches setup in administrative mode.  This mode is used to create a Windows Installer administrative install point that can then be used to install or deploy the product from.  Administrative mode presents UI that allows you to choose the location to stage the files to
    • /l <log file> - Causes setup to create a verbose log in a non-default path.  Setting this value will override the value of the VerboseLog entry in the install.ini file.  If the /l switch is passed, the log file name is required.  If it is provided, it will override the LogFilePrefix entry in install.ini.  If you choose to pass a log file name and there is a space in the path, you will need to enclose the name in quotes.  Leaving this parameter off will allow setup to create a verbose log file in the %temp% directory that has a name beginning with the LogFilePrefix entry in install.ini and ending with a randomly generated character sequence.
    • /lang #### - Specifies the 4-digit language code for the language in which to display the setup UI.  This setting overrides the OS language check and the language specified in the install.ini file.  Setup looks for a file named install.res.####.dll in the same path as install.exe and attempts to load strings from that DLL.  If the DLL with the numerical value passed in via this command line parameter does not exist, install.exe falls back to English strings (located in install.res.1033.dll).  If install.res.1033.dll also does not exist, setup will display an error dialog and exit
    • /msipassthru MSI_PROP_BEGIN"<properties with quotes here>"MSI_PROP_END - Specifies additional property/value pairs that will be passed to the Windows Installer MsiInstallProduct API (or msiexec.exe). This switch also requires that a token be used to prefix/postfix the actual command line arguments.  For example: /msipassthru MSI_PROP_BEGIN"PROPERTY1=Value1 PROPERTY2=Value2"MSI_PROP_END
    • /msipassthru MSI_ARGS_FILENAME_BEGIN<path to file with properties>MSI_ARGS_FILENAME_END - Specifies the full path to a file that contains additional property/value pairs that will be passed to the Windows Installer MsiInstallProduct API (or msiexec.exe)
    • /q - Specifies quiet install mode. Suppresses the display of all setup UI during installation
    • /qb - Specifies basic UI mode for installation.  This will cause install.exe to only show a small Windows Installer progress dialog with no other user interaction required.  This is the equivalent of the msiexec.exe /qb command line switch
    • /qb! - Extends the /qb switch by hiding the cancel button on the progress dialog during installation.  This is the equivalent of the msiexec.exe /qb! command line switch
    • /qu - Specifies quiet uninstall mode.  Suppresses the display of all setup UI during uninstallation
    • /skip_all_checks - Causes install.exe to skip all prerequisites checks that are specified in install.ini.  This may result in setup failing elsewhere because some of the checks are also specified in the MSI itself.  However, this can be useful as a troubleshooting tool if you know the state of the machine(s) that you are installing on very well
    • /watsonsilent - Causes all Watson reports generated by setup in the case of failure to be silently sent to Microsoft instead of displaying a dialog.  This command line switch is only applicable if one of the /q flags is also used
    • /watsonui - Causes all Watson reports generated by setup in the case of failure to display UI informing the user of the issue
    • /? - Displays a help dialog with information about supported command line parameters.  As I was writing this article I noticed that many of the switches that are supported by install.exe are not actually listed in this dialog.  I'll be reporting a bug to the setup team so that hopefully this will be cleaned up in a future release to present more useful information to the user

    <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>


  • Aaron Stebner's WebLog

    Final official versions of VS 2005 Express Editions are now available!


    To accompany the VS and SQL 2005 launch event that happened today in San Francisco, the Visual Studio 2005 Express site has been updated to offer links to the final released version of the various Express Editions.  Here are some useful links to get started:

    Express Edition readme information

    Download locations for each Express Edition

    Getting started guide for each Express Edition


  • Aaron Stebner's WebLog

    New nVidia decoder with fixes for Update Rollup 2 is now available


    I stumbled on a link to an updated trial version of the nVidia PureVideo decoder this morning.  The web page describing this decoder indicates that there are compatibility fixes specifically made for Update Rollup 2 for Media Center 2005.  If you have an nVidia decoder installed and are having trouble with playback after installing Update Rollup 2, you may want to try out this updated decoder to see if you get better results with it.


  • Aaron Stebner's WebLog

    Suggestions for guide download errors in Media Center caused by the BITS service


    As I have previously written here, there have been some guide download problems in Windows XP Media Center Edition 2005 after applying  Update Rollup 2

    How to diagnose guide download errors

    You can use the following steps to look at the Application event log to try to determine the root cause of the guide download failure:

    1. Click on the Start menu, choose Run and type eventvwr.exe
    2. Open the Application event log
    3. Find any errors or warnings with the source name of Media Center Scheduler

    If you find that the errors are caused by the Background Intelligent Transfer Service (BITS) not being detected as installed or being configured incorrectly, the following sets of steps can be used to resolve the issues in most cases.

    How to fix BITS configuration errors

    Various errors can occur when BITS interfaces are not registered or the registry settings are corrupted.

    To fix this error, repair the BITS service by using the following steps:

    1. Download and install the Windows XP SP2 support tools
    2. Click on the Start menu, choose Run and type cmd
    3. Run "C:\Program Files\Support Tools\bitsadmin.exe" /util /repairservice /force from the command prompt

    Note: the above command line assumes that you installed the XP SP2 support tools to the default location.  You will need to adjust the path to bitsadmin.exe as appropriate if you installed the support tools to a non-default path

    How to enable the BITS service if it is disabled

    This error occurs when the BITS service is disabled, does not exist, has been deleted from the services application, was stopped while download was in progress, or if any service that BITS depends on failed or was deleted.

    To fix this error, enable the BITS service by using the following steps:

    1. Click on the Start menu, choose Run and type services.msc
    2. In the list of services, right-click Background Intelligent Transfer Service, and then click Properties
    3. In the Startup type list, select Manual and then click OK

    If these steps do not resolve the problem, you may need to enable the services that BITS depends on by doing the following:

    1. Click on the Start menu, choose Run and type services.msc
    2. In the list of services, right-click Background Intelligent Transfer Service, and then click Properties
    3. In the Background Intelligent Transfer Service Properties dialog box, click the Dependencies tab
    4. For each service listed under This service depends on the following system components, select Manual in the Startup type list and then click OK to enable the service


  • Aaron Stebner's WebLog

    One root cause identified for protected content playback errors in Update Rollup 2 for Media Center 2005


    As I have previously described here and here, some folks have run into problems playing protected content after installing Update Rollup 2 for Media Center 2005.  Our team has identified one potential root cause for this problem and I wanted to outline it here.

    If you install Windows Media Player 10 after installing Update Rollup 2, the WMP 10 setup will revert some critical files related to digital rights management (DRM), and that will result in error messages that look like the following when trying to play protected content:

    Secure storage protection error dialog

    Ordinarily, there is no need to install Windows Media Player 10 on Windows XP Media Center Edition 2005 because this version of Media Center already has this version of Windows Media Player.  However, we have seen some applications that include a copy of WMP 10 with their package, and unfortunately WMP 10 setup is not correctly handling a couple of cases where later versions of some files are already installed on the machine.

    We are working on a fix for Windows Media Player setup so that it will no longer revert DRM files like this in the future.  Also, we are working on a fix to restore DRM functionality without losing licenses.  I am not sure when either of these fixes will be ready, but I will post updates when I know more.

    If you have already installed WMP 10 after Update Rollup 2 and do not want to wait for the fixes we are working on, you can use the workaround in this Knowledge Base article to reset the DRM system on your machine.  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.

    Please note also that resetting the DRM system will cause any previously acquired licenses to be lost, so you will have to reacquire them from the content providers or restore them using the license backup and restore feature in Windows Media Player (if you made backups prior to installing Update Rollup 2) to be able to play any pre-existing protected content.

    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.

    <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>


  • Aaron Stebner's WebLog

    VS 2005 beta uninstall instructions are missing the MSDN Library


    A customer contacted me this week after reading my blog post about uninstalling beta builds of VS 2005 and the .NET Framework 2.0 in preparation for installing the final release.  After following the officially documented uninstall instructions, they tried to install the final release and were prompted to uninstall the MSDN Library for VS 2005.  When they tried to uninstall MSDN using the entry in Add/Remove Programs, the uninstall failed with a generic "fatal error" message and they were stuck with MSDN and could not install the final release of VS 2005 or the .NET Framework 2.0.  I took a look at the instructions page, and sure enough - it currently does not list the MSDN library in the set of VS 2005 uninstall instructions at the bottom.

    If possible, I recommend that instead of manually uninstalling that you use the automated removal tool that is linked to at the top of the uninstall instructions page.  The automated tool does include a step to uninstall MSDN if it is present on your machine so you will not have to worry about running into this problem.

    However, if you have already uninstalled all of the other parts of VS 2005, then the uninstall tool will fail to remove MSDN just like if you try to manually remove it using the entry in Add/Remove Programs.  The most reliable way to resolve the MSDN uninstall crash is to use the following steps:

    1. Re-install the .NET Framework 2.0 beta build
    2. Uninstall the MSDN for Visual Studio 2005 beta build from the Add/Remove Programs control panel
    3. Re-uninstall the .NET Framework 2.0 beta build

    If these steps do not work, you can also try to use steps similar to those located here for manually uninstalling programs that have uninstall bugs.

    I have mentioned this issue to the VS setup team and they are working on a refresh of that page to include the MSDN uninstall step.

    <update date="11/11/2005"> Added a link to make it easier to find the .NET Framework 2.0 beta 2 installer in case you need to re-install it to remove MSDN </update>


  • Aaron Stebner's WebLog

    Interaction problems between the final release of .NET Framework 2.0 and the WinFX September CTP


    I have gotten a couple of questions from customers this week who have installed the final release of the .NET Framework 2.0 and then have had trouble trying to install the WinFX September CTP.  The underlying issue here is that the WinFX September CTP requires the beta 2 version of the .NET Framework 2.0 (v2.0.50215.xx), but the final release of the .NET Framework 2.0 cannot co-exist on the same machine as the beta 2 version of the .NET Framework 2.0.

    You will note that if you have the .NET Framework 2.0 beta 2 installed and attempt to install the final release, you will get an error message stating that you need to uninstall beta 2 first.  However, the setup package for the .NET Framework 2.0 beta 2 has no knowledge about the final release of the .NET Framework 2.0 (since it shipped earlier and we cannot predict the future), and therefore beta 2 setup will not block.  Instead, if you try to install beta 2 on a machine with the final release already installed, it will fail with various possible error dialogs.  The most common error I've seen so far is the following:

    Error 1920.Service '.NET Runtime Optimization Service v2.0.50215_X86' (clr_optimization_v2.0.50215_32) failed to start. Verify that you have sufficient privileges to start system services.

    If you want to use the WinFX September CTP on a machine that already has the final release of the .NET Framework 2.0 and/or VS 2005, you have a couple of options:

    1. Uninstall the final release of the .NET Framework 2.0 and/or VS 2005, then install the WinFX September CTP (which will automatically install .NET Framework 2.0 beta 2 for you)
    2. Install the WinFX September CTP on a separate machine that does not have the final release of the .NET Framework 2.0 or VS 2005 on it
    3. Wait for the next WinFX CTP that will be based on the final release of the .NET Framework 2.0.  Unfortunately, I don't know for sure when the new CTP will be released, but it should be soon...

    I apologize for any inconvenience that this scenario is causing....

    <update date="11/29/2005"> There is a November 2005 CTP for WinFx now available that works with the final release of VS 2005.  Check out my new blog post for additional information </update>


  • Aaron Stebner's WebLog

    Listen to me on the new edition of the Media Center Show


    I talked with Ian Dixon about some of the Update Rollup 2 issues and some general .NET Framework and setup technology topics, and he has published our talk as the latest edition of the Media Center Show at this location.  Check it out if you have a chance, and let me know if you have any questions or feedback.


  • Aaron Stebner's WebLog

    How to perform a customized command line install for the .NET Framework SDK 2.0


    Now that the final release of the .NET Framework 2.0 redist and SDK are available for download, I wanted to share a story about a scenario that I helped a team with here at Microsoft a couple of weeks ago.  They wanted to be able to do a command line install of the .NET Framework SDK 2.0 with customized installation options so that they did not have to install all of the documentation and samples.  They were able to run the SDK setup in full UI mode and uncheck the boxes in the setup UI for QuickStart Samples and Product Documentation and that gave them the bits they wanted.  However, they weren't able to figure out how to install the same set of bits in an unattended manner.

    I couldn't find any documented way of doing this, but given my background working on the setup team for the .NET Framework and Visual Studio and some of the tricks I've learned over the years about reverse engineering setup packages I decided to see if I could figure out how to accomplish this.  Here is what I did to learn how to do this kind of customized install:

    1. Install the .NET Framework 2.0 redistributable
    2. Install the .NET Framework 2.0 SDK in UI mode and check only the Tools and Debugger option
    3. After installation, go to the %temp% directory, locate the file dd_netfxsdk20msi*.txt and open it in a text editor such as Notepad
    4. Search for the string Command line: to find the command line that the .NET Framework 2.0 SDK external UI handler passes to the MSI to start installing
    5. Create a script that runs the following command lines to silently install the .NET Framework 2.0 redist and then the 2.0 SDK with the same command line that I found in the log file in step 4

    I ended up creating a script with the following command lines to silently install the .NET Framework 2.0 redist and the customized installation of the 2.0 SDK:

    To install the redist

    dotnetfx.exe /q:a /c:"install.exe /q"

    To install the SDK

    You can use one of the following 2 options, depending on whether or not you want to be able to customize the installation location as part of the unattended setup.

    1.  If you want to customize the install location, you will need to extract setup.exe in a separate step.  This means you need the following 2 command lines:

    setup.exe /t:c:\temp /c

    followed by

    msiexec.exe /i c:\temp\netfxsdk.msi USING_EXUIH=1 REBOOT=ReallySuppress ADDLOCAL=URT_SDK_ENU_X86_IXP_SETUP, GUIH_ARP_VSDIR_HIDDEN_URT_SDK_ENU_X86_IXP, Servicing_Key, NGWS_SDK FRAMEWORKSDK.3643236F_FC70_11D3_A536_0090278A1BB8=C:\Program Files\Microsoft.NET\SDK\ /qn /l*v c:\temp\netfxsdk.log

    2.  If you do not want to customize the install location, you can use the following command line:

    setup.exe /t:c:\temp /c:"msiexec.exe /i c:\temp\netfxsdk.msi USING_EXUIH=1 REBOOT=ReallySuppress ADDLOCAL= URT_SDK_ENU_X86_IXP_SETUP, GUIH_ARP_VSDIR_HIDDEN_URT_SDK_ENU_X86_IXP, Servicing_Key,NGWS_SDK /qn /l*v c:\temp\netfxsdk.log"

    Please note - I added spaces after the commas in the ADDLOCAL command lines above to make them display nicely in web browsers, but you need to get rid of those spaces to get the command line to work correctly if you try it on your own machines.

    <update date="11/29/2005"> One of the comments below demonstrated a problem with the syntax of the SDK install command line parameters that I had originally listed.  I have provided a couple of different options to get around this issue </update>


  • Aaron Stebner's WebLog

    Troubleshooting suggestions for guide download errors in Media Center


    I have heard from several customers so far who have encountered television guide download errors after installing Update Rollup 2 for Media Center 2005.  One of the customers sent me a link to a lengthy newsgroup thread that has several suggestions to fix or workaround guide download issues.  I wanted to consolidate some of the suggestions listed there and also include some other suggestions I have heard from other sources to try to unblock anyone who currently cannot get guide download working correctly.

    1. Make sure that your system clock is set to the correct time and time zone for the region you are located in.  Note also that daylight savings time ended this past weekend in the United States and also earlier in October in Europe so if you do not have the box checked to automatically adjust the time for daylight savings time changes, you may have to manually adjust your clock to account for this
    2. Eliminate possible XML parsing problems caused by previously downloaded guide data by renaming the directory %ALLUSERSPROFILE%\Application Data\Microsoft\Ehome\EPG (I suggest renaming rather than deleting in case you want to revert back to the previous data later on).  Then open Media Center, go to Settings, then TV, then Guide, then Set up Guide Listings and configure guide download one more time to regenerate this folder and (hopefully) the contents
    3. Launch Media Center, choose Settings, then General, then Media Center Setup and choose to not use the guide.  Then restart the machine, relaunch Media Center and run Media Center setup again and choose to use the guide again
    4. Re-register the Media Center guide DLL by clicking on the Start menu, choosing Run, typing cmd and then running the command line %windir%\Microsoft.NET\Framework\v1.1.4322\regasm.exe %windir%\ehome\ehepgdat.dll
    5. Temporarily disable any anti-virus, anti-spyware or firewall software that you have installed on your system, then launch Media Center and try to download guide data again
    6. Uninstall McAfee Privacy Service if you have it installed

    If none of the above suggestions work, you can do the following to look for more detailed error information:

    1. Click on the Start menu, choose Run and type eventvwr.exe
    2. Right-click on the Application event log and choose Save Log File As
    3. Save the log file as appevent.evt
    4. Locate the Media Center guide download log files.  They should be located in the directory named something like C:\Documents and Settings\All Users\Application Data\Microsoft\ehome\EPG\TraceHelper

    Our development team is also working on debugging a couple of guide download issues that we have been able to get access to repro machines for.  I will continue to update my blog as we find out any new information about these issues.

    <update date="12/8/2005"> Added additional suggested workaround of running regasm.exe for ehepgdat.dll </update>

    <update date="12/14/2005"> Added additional suggested workaround of disabling anti-virus, anti-spyware and firewall software on the system </update>

    <update date="1/9/2006"> Added additional log information that can be useful in tracking down guide download issues </update>


Page 1 of 2 (46 items) 12