Aaron Stebner's WebLog

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

  • Aaron Stebner's WebLog

    Troubleshooting steps I use for Media Center component registration failure errors

    • 54 Comments

    I heard from a customer this week who indicated they were seeing all of the following errors that I have described in previous blog posts:

  • A Component Registration Failure error appears while trying to navigate to My TV.  The text of the error message states "Some of the files needed to play radio or video are missing or corrupt. Media Center component registration may have failed."
  • A Critical Process Failure error appears while trying to configure an internet connection during first run.  The text of the error message states "A critical Media Center process has unexpectedly failed. If problems persist, please restart your machine and try again, or contact technical support. Code: 3"
  • A Tuner Not Found error appears while trying to setup a TV signal during first run

    I wanted to outline the exact steps I took to investigate this user's computer because they are very often useful in resolving this type of error.  Hopefully, if other folks run into this type of error within Media Center, they will be able to find this blog post and be able to more easily fix the error themselves.

    The errors listed above are normally caused by a Media Center service not being correctly registered on the system.  Service registration happens at the end of Media Center update rollup or hotfix setup, and most cases I have seen of this error can be traced back to something failing during the installation of the most recent Media Center hotfix.

    The most useful log file for Media Center hotfixes is named %windir%\medctroc.log.  In this type of scenario, I always start my investigation by opening up that log file, scrolling to the bottom and looking for any errors or warnings, especially errors related to service installation.

    In general, the sessions in that log file come in pairs - an un-registration mode that is denoted by the log string Will run in unregister mode and a registration mode that is denoted by the log string Will run in registration mode.  The service un-registration and re-registration command lines appear under the heading Registering services and COM objects... in the log file.

    In most cases one or more of the following warnings or errors will appear:

    • Warning: Process wait timed out
    • Error: couldn't stop the ehSched service: 0x00000424.  -->    "The specified service does not exist as an installed service.

    In cases where I see any of the above error messages in %windir%\medctroc.log, I use the following set of steps in the order listed below to manually un-register and re-register Media Center services:

    1. Close Media Center
    2. Click on the Start menu, choose run and type cmd
    3. Execute the command regsvr32.exe atl.dll
    4. Execute the command C:\WINDOWS\eHome\ehSched /unregServer
    5. Execute the command C:\WINDOWS\eHome\ehSched /service
    6. Execute the command C:\WINDOWS\eHome\ehRecvr /unregServer
    7. Execute the command C:\WINDOWS\eHome\ehRecvr /service
    8. Execute the command C:\WINDOWS\eHome\ehRec.exe /unregServer
    9. Execute the command C:\WINDOWS\eHome\ehRec.exe /regserver
    10. Execute the command C:\WINDOWS\eHome\ehmsas.exe /unregServer
    11. Execute the command C:\WINDOWS\eHome\ehmsas.exe /regserver
    12. Restart Media Center

    The command lines above are case-sensitive, so make sure to capitalize the S in unregServer exactly as listed above.  Also, it is not sufficient to simply re-register the services because these services have logic in the code that treats the /service switch as a toggle (meaning that if it is un-registered, it will re-register it, but if it is already registered, it will un-register it).

  • In a few cases, running the above steps will result in the same error messages when launching Media Center and will show the same log messages in %windir%\medctroc.log.  I have seen the following steps help resolve these errors in this scenario if the above commands did not help:

    1. Go to Add/Remove Programs
    2. Check the box labeled Show updates at the top
    3. Scroll to the bottom of the list of installed programs
    4. Remove the most recently installed Media Center update rollup package
    5. Re-download and re-install the update rollup package that you uninstalled in the previous step

    <update date="2/19/2006"> Added additional steps to uninstall and reinstall the most recent Media Center update rollup because I have heard from a couple of customers who tried all of the above command lines and none of them helped, but uninstalling and reinstalling did end up solving the issue for them </update>

     

  • Aaron Stebner's WebLog

    Definitive list of workarounds for Package Load Failure errors in Visual Studio 2005

    • 63 Comments

    Important note - the steps in this blog post have typically only proven useful in cases where a previous beta of Visual Studio 2005 was installed on the system prior to installing the final release of VS 2005.  If you have never had a beta of VS 2005 on your system and are encountering package load failure errors, these steps will most likely not help.  In that type of scenario, I recommend running devenv.exe with the /log switch (described in this MSDN topic) to create a log file of the packages it tries to load and then search in that log file for errors and warnings to help narrow this issue down further. 

    Ever since the final version of Visual Studio 2005 was released, I have been hearing from customers who are running into Package Load Failure errors while trying to get beta versions uninstalled and the final version installed.  I have previously posted a set of steps that I have found will resolve nearly all cases of these Package Load Failure errors.  However, there have been some cases where these steps are not enough and more in-depth manual removal steps have proven necessary.  Up until now, I have been resisting posting the additional steps that are necessary in some cases because I really want folks to try out the other steps I have posted first.  However, I am going to go ahead and post a complete set of steps and just duplicate my previous steps in an effort to communicate the workarounds I have found as widely as possible while also making my best effort to make things as easy as possible for the majority of customers.

    So, without further ado, here is a complete, hopefully definitive set of steps that will help resolve all Package Load Failure errors seen while trying to use the final release of VS 2005 on a system that previously had a beta version installed.  Please try these steps in the order listed and check to see if the Package Load Failure errors are resolved after completing each step so that you can try to avoid needing to perform more removal steps than are strictly necessary on your system.

    Please note - if you have Dotfuscator 3.0 installed on your system, you should first try the workaround described here to see if you are running into a known issue that has been fixed by Preemptive (the company that produces Dotfuscator).

    1.  Try to repair the .NET Framework 2.0

    Sometimes, package load failures have a very simple cause - the .NET Framework 2.0 is somehow in a broken state.  Before trying any of the more complicated steps listed below, it is worth trying to repair the .NET Framework 2.0.  To do this, go to the Add/Remove Programs control panel, locate the item named Microsoft .NET Framework 2.0 and choose to repair it.

    2.  Try to run the VS 2005 beta uninstall troubleshooting tool

    Before trying any of the manual steps listed below in this blog post, please download and run the VS 2005 beta uninstall troubleshooting toolThis 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.

    3.  Try to run the following command line to clear out parts of the native image cache

    • Close Visual Studio and/or reboot the system to make sure that there will not be any files in use
    • Click on the Start menu, choose Run and type cmd
    • Type rd /s /q %windir%\assembly\NativeImages_v2.0.50727_32\Microsoft.VisualStu# and press enter to remove a subset of the native images that have proven problematic in the past from the cache.

    4.  Try to run the following command line to clear out all of the native image cache

    • Close Visual Studio and/or reboot the system to make sure that there will not be any files in use
    • Click on the Start menu, choose Run and type cmd
    • Type rd /s /q %windir%\assembly\NativeImages_v2.0.50727_32 and press enter to remove all VS 2005 native images from the cache.

    5.  Remove the version of VS 2005 you have installed, manually clean the system and try installing again

    • Uninstall all of VS 2005 using the uninstall instructions and automated uninstall tool
    • Click on the Start menu, choose Run and type cmd
    • Type cd /d %windir%\assembly
    • Type rd /s /q GAC_32 and then rd /s /q GAC_MSIL
    • Type dir and locate any directories named NativeImages_v2.0* and type rd /s /q <directory> to delete all VS 2005 native image directories as well
    • Using regedit.exe, remove all of the following registry sub-hives, including all registry keys and values underneath them:
      HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\8.0
      HKEY_CURRENT_USER\SOFTWARE\Microsoft\VisualStudio\8.0
      HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSDN\8.0
      HKEY_CURRENT_USER\SOFTWARE\Microsoft\MSDN\8.0

      HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VBExpress\8.0
      HKEY_CURRENT_USER\SOFTWARE\Microsoft\VBExpress\8.0
      HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VCExpress\8.0
      HKEY_CURRENT_USER\SOFTWARE\Microsoft\VCExpress\8.0
      HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VCSExpress\8.0
      HKEY_CURRENT_USER\SOFTWARE\Microsoft\VCSExpress\8.0
      HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VJSExpress\8.0
      HKEY_CURRENT_USER\SOFTWARE\Microsoft\VJSExpress\8.0
      HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VWDExpress\8.0
      HKEY_CURRENT_USER\SOFTWARE\Microsoft\VWDExpress\8.0
      HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Hatteras
    • Run this set of steps to locate and delete any files with versions 2.0.xxxxx.xx and 8.0.xxxxx.xx that are still left on your system.  Please note that all of the Package Load Failure errors that I have seen so far have been caused by files left behind in %windir%\assembly (the GAC) on the machine, so pay special attention to any leftover files in this location and make sure that all orphaned files with versions 2.0.xxxxx.xx and 8.0.xxxxx.xx are removed before attempting to reinstall VS 2005
    • Run this set of steps to clean up the WinSxS folder
    • Reboot the machine
    • Try to install VS 2005 again

    If none of the above steps work for you, please leave a comment on this blog post or contact me and I will try my best to help you further.

    <update date="12/19/2005"> Added a new step to remove some registry data related to VS 2005 as part of step 4 above </update>

    <update date="1/10/2006"> Added link to information about a package load failure scenario caused by Dotfuscator 3.0 </update>

    <update date="1/15/2006"> I have seen a couple of issues caused by orphaned keys under the Express Edition hives and the MSDN hives, so I added those to the list in step 4 above </update>

    <update date="11/18/2006"> Added a new first step to try repairing the .NET Framework 2.0 </update>

    <update date="4/2/2008"> Added caveat that the steps in this post are typically only useful when a beta of VS 2005 was previously installed on the system. </update>

    <update date="4/24/2009"> Fixed broken link to the VS 2005 beta uninstall troubleshooting tool. </update>

     

  • Aaron Stebner's WebLog

    Mailbag: What version of the .NET Framework is included in what version of the OS?

    • 32 Comments

    Question:

    I recently installed Windows Vista.  When I looked in the Programs and Features (formerly known as Add/Remove Programs) control panel, I didn't see the .NET Framework 2.0 listed.  Therefore I decided to install the .NET Framework 2.0 by downloading it from this location.  However, running that setup displays an error message stating that it cannot be installed because it is already a part of the OS.  Why does this happen?

    Answer:

    Over the past few months, I've received several variations on this question for other operating systems and all of the released versions of the .NET Framework.  When the .NET Framework is installed as a part of the OS, it does not appear in the Programs and Features (or Add/Remove Programs) control panel.  The following is a complete list of which version of the .NET Framework is included in which version of the OS:

    • Windows XP Media Center Edition (Windows XP SP1) includes the .NET Framework 1.0 + SP2 as an OS component
    • Windows XP Media Center Edition (Windows XP SP2 and higher) includes the .NET Framework 1.0 + SP3 as an OS component.  On Windows XP Media Center Edition, the only way to get the .NET Framework 1.0 SP3 is to install Windows XP SP2 or higher.  There is not a standalone 1.0 SP3 installer for this edition of Windows XP.
    • Windows XP Tablet PC Edition (Windows XP SP1) includes the .NET Framework 1.0 + SP2 as an OS component
    • Windows XP Tablet PC Edition (Windows XP SP2 and higher) includes the .NET Framework 1.0 + SP3 as an OS component.  On Windows XP Tablet PC Edition, the only way to get the .NET Framework 1.0 SP3 is to install Windows XP SP2 or higher.  There is not a standalone 1.0 SP3 installer for this edition of Windows XP.
    • Windows Server 2003 (all x86 editions) includes the .NET Framework 1.1 as an OS component; 64-bit versions of Windows Server 2003 do not include a version of the .NET Framework as an OS component
    • Windows Vista (all editions) includes the .NET Framework 2.0 and 3.0 as OS components  3.0 can be added or removed via the Programs and Fatures control panel.
    • Windows Vista SP1 (all editions) includes the .NET Framework 2.0 SP1 and 3.0 SP1 as OS components.  3.0 SP1 can be added or removed via the Programs and Features control panel.
    • Windows Server 2008 and Windows Server 2008 SP1 (all editions) includes the .NET Framework 2.0 SP1 and 3.0 SP1 as OS components.  The .NET Framework 3.0 SP1 is not installed by default and must be added via the Programs and Features control panel though.
    • Windows Server 2008 SP2 (all editions) includes the .NET Framework 2.0 SP2 and 3.0 SP2 as OS components.  The .NET Framework 3.0 SP2 is not installed by default and must be added via the Programs and Features control panel though.
    • Windows Server 2008 R2 (all editions) includes the .NET Framework 3.5.1 as an OS component.  This means you will get the .NET Framework 2.0 SP2, 3.0 SP2 and 3.5 SP1 plus a few post 3.5 SP1 bug fixes.  3.0 SP2 and 3.5 SP1 can be added or removed via the Programs and Features control panel.
    • Windows 7 (all editions) includes the .NET Framework 3.5.1 as an OS component.  This means you will get the .NET Framework 2.0 SP2, 3.0 SP2 and 3.5 SP1 plus a few post 3.5 SP1 bug fixes.  3.0 SP2 and 3.5 SP1 can be added or removed via the Programs and Features control panel.
    • Windows 8 (all editions) includes the .NET Framework 4.5 as an OS component, and it is installed by default.  It also includes the .NET Framework 3.5 SP1 as an OS component that is not installed by default.  The .NET Framework 3.5 SP1 can be added or removed via the Programs and Features control panel.
    • Windows 8.1 (all editions) includes the .NET Framework 4.5.1 as an OS component, and it is installed by default.  It also includes the .NET Framework 3.5 SP1 as an OS component that is not installed by default.  The .NET Framework 3.5 SP1 can be added or removed via the Programs and Features control panel.
    • Windows Server 2012 (all editions) includes the .NET Framework 4.5 as an OS component, and it is installed by default except in the Server Core configuration.  It also includes the .NET Framework 3.5 SP1 as an OS component that is not installed by default.  The .NET Framework 3.5 SP1 can be added or removed via the Server Manager.
    • Windows Server 2012 R2 (all editions) includes the .NET Framework 4.5.1 as an OS component, and it is installed by default except in the Server Core configuration.  It also includes the .NET Framework 3.5 SP1 as an OS component that is not installed by default.  The .NET Framework 3.5 SP1 can be added or removed via the Server Manager.

    Note - for the .NET Framework 2.0, 3.0 and 3.5, you can see a graphical view of the above information in this blog post

    In addition, the .NET Framework shipped with the following versions of Windows but not as truly integrated OS components:

    • Windows XP Home and Professional SP1 includes the MSI-based .NET Framework 1.0 + SP2 in the Additional Components folder on the installation CD.  It is not an OS component on this OS.
    • Windows XP Home and Professional SP2 includes the MSI-based .NET Framework 1.1 + SP1 in the Additional Components folder on the installation CD.  It is not an OS component on this OS.
    • Windows XP Home and Professional SP3 includes the MSI-based .NET Framework 1.1 + SP1 in the Additional Components folder on the installation CD.  It is not an OS component on this OS.
    • Windows Server 2003 R2 includes the MSI-based .NET Framework 2.0.  It appears in Add/Remove Windows Components as an OS component, but selecting it simply invokes the MSI-based installer.  The MSI can be repaired and removed using Add/Remove Programs regardless of whether it is installed via the standalone MSI or via the Add/Remove Windows Components UI.

    You can see a table of what version numbers are associated with each version of the .NET Framework in this blog post.

    <update date="3/27/2008"> Added a note that the .NET Framework 1.1 is not included in 64-bit versions of Windows Server 2003.  Added information about Windows Server 2008. </update>

    <update date="7/29/2008"> Added a note about Windows XP SP3. </update>

    <update date="8/14/2008"> Added a note about Vista SP1 and the .NET Framework 2.0 SP1 and 3.0 SP1 </update>

    <update date="1/12/2009"> Added a note about the .NET Framework 1.0 SP3 for Windows XP Media Center and Tablet PC editions. </update>

    <update date="4/1/2009"> Added a note about the .NET Framework versions available on Windows 7 </update>

    <update date="8/26/2009"> Added a note about Windows Server 2008 SP2. </update>

    <update date="8/29/2009"> Added a note about Windows Server 2008 R2. </update>

    <update date="2/5/2010"> Added a link to a blog post with a graphical view of the versions of Windows that include the .NET Framework 2.0, 3.0 and 3.5. </update>

    <update date="4/27/2010"> Added a link to a blog post with a list of the exact version numbers for each .NET Framework version and service pack level. </update>

     <update date="9/8/2012"> Added a note about Windows 8. </update>

     <update date="11/18/2013"> Added a note about Windows 8.1. </update>

     <update date="3/5/2014"> Added a note about Windows Server 2012. </update>

     

  • Aaron Stebner's WebLog

    Mailbag: How to perform a silent install of the Visual C++ 8.0 runtime files (vcredist) packages

    • 44 Comments

    Question:

    Visual Studio 2005 includes redistributable setup packages to install the Visual C++ 8.0 runtime files such as msvcr80.dll, atl80.dll, etc.  I would like to run this setup in fully silent mode, but when I run it normally, it displays a progress page.  How can I run this setup package in fully silent mode?

    Answer:

    The Visual C++ 8.0 redist packages (vcredist_x86.exe, vcredist_x64.exe and vcredist_ia64.exe) support the following command line installation options.  The examples below use the file named vcredist_x86.exe, but you can substitute the 64-bit versions of the EXEs with equivalent command lines to achieve the same behavior for them as well.

    Unattended install

    This option will run setup and display a progress dialog but requires no user interaction.

    vcredist_x86.exe /q:a

    Unattended install with no cancel button

    This option is the same as the previous option, except that the user will not have the option to press cancel during installation.

    vcredist_x86.exe /q:a /c:"msiexec /i vcredist.msi /qb! /l*v %temp%\vcredist_x86.log"

    Silent install

    This option will suppress all UI during installation.

    Vcredist_x86.exe /q:a /c:"msiexec /i vcredist.msi /qn /l*v %temp%\vcredist_x86.log"

    Note about standalone VC++ redistributable packages

    The instructions above apply to the copies of the VC++ redistributable packages that ship with Visual Studio 2005.  If you are downloading and trying to install the standalone versions of the VC++ redistributable packages instead of using the copies included with Visual Studio 2005, you will need to use slightly different command line parameters.  Please refer to this blog post for information about the command line parameters you will need to use in that case.

    <update date="10/16/2009"> Added a link to a separate blog post with command line syntax for the standalone versions of the VC++ 2005 redistributable packages. </update>

     

  • Aaron Stebner's WebLog

    Resolving Tuner Not Found errors in Update Rollup 2 for Media Center 2005

    • 66 Comments

    I have heard from some folks who have been encountering Tuner Not Found error messages when trying to view live TV in Media Center 2005 after installing Update Rollup 2.  Many of these errors have been caused by the .NET Framework versioning issue that I previously described in this blog post.  However, recently I have seen this error on systems that had no error messages listed in their setup log files.  Fortunately, I got a chance to look at one of these systems because we found a repro machine that belonged to a Microsoft employee and they brought the system in for us to take a look at in our lab.

    On the system I looked at, the Media Center receiver and scheduler services (named ehRecvr and ehSched) were installed and registered, but were in a stopped state.  I could verify by running sc query ehrecvr and sc query ehsched that this was the case.  However, when I tried to manually start these services by running sc start ehrecvr or sc start ehsched, they each failed with an error message and an error code stating that a class was not registered.

    I used the following steps to fix these services, and once I did this, live TV started working again in Media Center 2005 with Update Rollup 2.  Note that before running these steps, I verified by looking at the setup log files that setup ran correctly and that the setup error described here was not present:

    1. Click on the Start menu, choose Run and type cmd
    2. Run the command regsvr32.exe atl.dll
    3. Run the command %windir%\ehome\ehrecvr.exe /unregServer
    4. Run the command %windir%\ehome\ehsched.exe /unregServer
    5. Run the command %windir%\ehome\ehrecvr.exe /service
    6. Run the command %windir%\ehome\ehsched.exe /service

    Note that the command line parameters to unregister and re-register are case sensitive, so you must spell it /unregServer with a capital S and /service all in lower case.

    If the above steps do not help, I have also seen the following steps work in some cases to fix Tuner Not Found error messages in Media Center 2005:

    • Update your video card and tuner drivers from the websites for your hardware manufacturers
    • Launch Media Center, go to Settings | TV and try to re-run the TV setup wizard
    • Use the MceRepair tool created by Peter Rosser to forcibly re-register all Media Center binaries (note that this tool does things that standard setup does not do, so please use it with caution)

     

  • Aaron Stebner's WebLog

    How to uninstall the components of the .NET Framework 3.5 SP1

    • 41 Comments

    Question:

    As described in this blog post, I have been evaluating the beta of the .NET Framework 3.5 SP1 and Visual Studio 2008 SP1.  I ran into some issues running my application on a system with this software installed, so I need to uninstall it.  I have tried to uninstall the .NET Framework 3.5 SP1, but all of the .NET Framework 2.0 assemblies are still at the SP2 level and are not rolled back.  How can I fully uninstall the .NET Framework 3.5 SP1?

    Answer:

    The .NET Framework 3.5 SP1 is a slipstream replacement for the original release of the .NET Framework 3.5.  It installs the .NET Framework 2.0 SP2 and the .NET Framework 3.0 SP2 behind the scenes, and 2.0 SP2 and 3.0 SP2 are both slipstream replacements of previous versions of the .NET Framework 2.0 and 3.0.

    In order to fully uninstall the .NET Framework 3.5 SP1 and return to the .NET Framework 3.5, .NET Framework 2.0 SP1 and .NET Framework 3.0 SP1, you must use the following steps.  Note that there are different steps on Windows Vista and Windows Server 2008 than on earlier versions of Windows because the .NET Framework 2.0 and 3.0 are OS components on Windows Vista and Windows Server 2008.

    How to uninstall the .NET Framework 3.5 SP1 on Windows XP and Windows Server 2003:

    1. Go to the Add/Remove Programs control panel
    2. Find the product named Microsoft .NET Framework 3.5 SP1 and uninstall it
    3. Find the product named Microsoft .NET Framework 3.0 SP2 and uninstall it
    4. Find the product named Microsoft .NET Framework 2.0 SP2 and uninstall it
    5. Re-install the original release of the .NET Framework 3.5 (which will re-install the .NET Framework 2.0 SP1 and the .NET Framework 3.0 SP1 behind the scenes)

    How to uninstall the .NET Framework 3.5 SP1 on Windows Vista and Windows Server 2008:

    Note - these steps are not required if you had a beta version of the .NET Framework 3.5 SP1 and plan to upgrade to the final release.  Behind the scenes, the .NET Framework 2.0 SP2 and .NET Framework 3.0 SP2 packages are designed to upgrade older beta versions of the same packages.  These steps are only needed if you are trying to fully remove the .NET Framework 2.0 SP2, .NET Framework 3.0 SP2 and .NET Framework 3.5 SP1 in order to move back to a previous version of the .NET Framework.

    1. Go to the Programs and Features control panel
    2. Find the product named Microsoft .NET Framework 3.5 SP1 and uninstall it
    3. In the Programs and Features control panel, click the link on the left named View Installed Updates
    4. In the list of installed updates, look for an item named Update for Microsoft Windows (KB948610) - this is the .NET Framework 3.0 SP2 OS update package
    5. Right-click on the item and choose Uninstall
    6. In the list of installed updates, look for an item named Update for Microsoft Windows (KB948609) - this is the .NET Framework 2.0 SP2 OS update package
    7. Right-click on the item and choose Uninstall
    8. Reboot
    9. Re-install the original release of the .NET Framework 3.5 (which will re-install the .NET Framework 2.0 SP1 and the .NET Framework 3.0 SP1 behind the scenes)

    <update date="8/7/2008"> Added a note clarifying that these uninstall steps are not needed when moving from a beta to the final release.  They are only needed when doing a full uninstall in order to move back to a previous version of the .NET Framework on a system. </update>

     

  • Aaron Stebner's WebLog

    How to fix component registration failures after installing Update Rollup 2 for Media Center 2005

    • 87 Comments

    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:

    • A Component Registration Failure error appears while trying to navigate to My TV.  The text of the error message states "Some of the files needed to play radio or video are missing or corrupt. Media Center component registration may have failed."
    • A Critical Process Failure error appears while trying to configure an internet connection during first run.  The text of the error message states "A critical Media Center process has unexpectedly failed. If problems persist, please restart your machine and try again, or contact technical support. Code: 3"
    • A Tuner Not Found error appears while trying to setup a TV signal during first run
    • Errors related to the Media Center Guide in the application event log

    How do I know if this issue is the one affecting my machine?

    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.

    How can I workaround this issue?

    If you have the above entries in your %windir%\medctroc.log file, you can do the following to repair your computer:

    1. Download and reinstall the .NET Framework 1.1 SP1
    2. Go to the Start menu, choose Run and type cmd.
    3. From the cmd prompt, run %windir%\ehome\medctrro.exe /o /p RunOnce to re-run Update Rollup 2 registration code.  This command will not display any UI, so you will have to keep track of the process in Task Manager to know for sure when it completes.
    4. After the process in step 3 completes, restart your computer to complete the Media Center registration process.

    What is the root cause of this issue?

    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>

     

  • Aaron Stebner's WebLog

    Registry settings that can be used to configure advanced Media Center options

    • 61 Comments

    There have been a couple of posts by myself and Matt Goyer listing some of the registry keys and values that TweakMce changes behind the scenes to configure advanced options within Windows Media Center.

    I decided that it would be worthwhile to post all of the registry keys and values that can be changed via TweakMce in case you are running a beta build of Windows Vista and cannot install the current version of TweakMce, or if you would like to change these Media Center settings without needing to download and install TweakMce or resort to a registry monitoring tool such as RegMon to reverse engineer these settings yourself.

    Skip Forward Interval - Enter the number of milliseconds you want to skip forward when you press the skip button. (1 second = 1000 milliseconds)

    • Registry key - HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Media Center\Settings\VideoSettings
    • Registry value - SkipAheadInterval
    • Registry value data type - REG_DWORD

    Skip Back Interval - Enter the number of milliseconds you want to skip back when you press the replay button. (1 second = 1000 milliseconds)

    • Registry key - HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Media Center\Settings\VideoSettings
    • Registry value - InstantReplayInterval
    • Registry value data type - REG_DWORD

    Storage Location For Recorded TV - Enter the path for the storage location for recorded TV.

    • Registry key - HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Media Center\Service\Recording
    • Registry value - RecordPath
    • Registry value data type - REG_SZ

    Watched Folders For Recorded TV - If you have recorded TV stored in multiple locations enter the folder path below. You can enter one folder path for each line below. Example: C:\Recorded TV

    • Registry key - HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Media Center\Service\Recording
    • Registry value - WatchedFolders
    • Registry value data type - REG_MULTI_SZ

    Notification Before A Recording Starts - When you are watching TV a notification appears before the channel is changed to start a new recording.  Enter the number of milliseconds to show this notification before Media Center changes the channel to begin the recording. (1 second = 1000 milliseconds)

    • Registry key - HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Media Center\Settings\VideoConstants
    • Registry value - RecorderStartWarningTimeout
    • Registry value data type - REG_DWORD

    More Info Panel Timeout - Enter the number of milliseconds to show the More Info panel while watching TV or DVD. (1 second = 1000 milliseconds)

    • Registry key - HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Media Center\Settings\VideoConstants
    • Registry value - InfoBarTimeout
    • Registry value data type - REG_DWORD

    Seek Bar Timeout - Enter the number of milliseconds to show the paused seek bar while watching TV or DVD. (1 second = 1000 milliseconds)

    • Registry key - HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Media Center\Settings\VideoConstants
    • Registry value - SeekBarTimeout
    • Registry value data type - REG_DWORD

    Seek Bar Rewind and Fast Forward Timeout - While watching TV or DVD pressing REW/FWD displays the seek bar.  Enter the number of milliseconds to show the seek bar when transitioning from REW or FWD to normal playback while watching TV or DVD. (1 second = 1000 milliseconds)

    • Registry key - HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Media Center\Settings\VideoConstants
    • Registry value - SeekBarBriefTimeout
    • Registry value data type - REG_DWORD

    Seek Bar Slow Motion Timeout - Enter the number of milliseconds to show the seek bar when video is in slow motion playback while watching TV or DVD. (1 second = 1000 milliseconds)

    • Registry key - HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Media Center\Settings\VideoConstants
    • Registry value - SeekBarSloMoTimeout
    • Registry value data type - REG_DWORD

    Enable Overscan - Some televisions do not display the full Media Center user experience. Do you want Media Center to pull in critical UI elements?

    • Registry key - HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Media Center\Settings\MCE.PerUserSettings
    • Registry value - marginSaved
    • Registry value data type - REG_DWORD
    • Registry value data - 1 = enable overscan; 0 = disable overscan

    Bottom Margin - How many units should Media Center pull in critical elements from the bottom of the screen?

    • Registry key - HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Media Center\Settings\MCE.PerUserSettings
    • Registry value - marginBottom
    • Registry value data type - REG_DWORD

    Top Margin - How many units should Media Center pull in critical elements from the top of the screen?

    • Registry key - HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Media Center\Settings\MCE.PerUserSettings
    • Registry value - marginTop
    • Registry value data type - REG_DWORD

    Right Margin - How many units should Media Center pull in critical elements from the right side of the screen?

    • Registry key - HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Media Center\Settings\MCE.PerUserSettings
    • Registry value - marginRight
    • Registry value data type - REG_DWORD

    Left Margin - How many units should Media Center pull in critical elements from the left side of the screen?

    • Registry key - HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Media Center\Settings\MCE.PerUserSettings
    • Registry value - marginLeft
    • Registry value data type - REG_DWORD

    Enable My DVDs - Media Center has a new DVD gallery with cover art and descriptions called My DVDs. Do you want to enable My DVDs? This setting is only available in Update Rollup 2 for Windows XP Media Center Edition 2005 and later.

    • Registry key - HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Media Center\Settings\DvdSettings
    • Registry value - ShowGallery
    • Registry value data type - REG_SZ
    • Registry value data - Gallery = enable My DVDs; Play = do not enable My DVDs

    Autostart Enhanced DVD Content - Some DVDs include bonus content enhanced for Media Center. Do you want to automatically start the content?

    • Registry key - HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Media Center\Settings\AutoScan
    • Registry value - _autoPlayMCLEnabled
    • Registry value data type - REG_DWORD
    • Registry value data - 1 = automatically start; 0 = do not automatically start

    DVD Notification Timeout - Enter the number of milliseconds that you want to view the notification that a DVD has been inserted and is about to automatically start playing. (1 second = 1000 milliseconds)

    • Registry key - HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Media Center\Settings\VideoConstants
    • Registry value - DVDNotificationTimeout
    • Registry value data type - REG_DWORD

    Search Depth - My DVDs Gallery will search all locations that you have added to your My Videos space. How many levels deeps should it search for DVD content? This setting is only available in Update Rollup 2 for Windows XP Media Center Edition 2005 and later.

    • Registry key - HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Media Center\Settings\DvdSettings
    • Registry value - FolderSearchDepth
    • Registry value data type - REG_DWORD

    Search Network Locations - My DVDs Gallery will search all locations that you have added to your My Videos space. Should it include network shares and folders in its search? This setting is only available in Update Rollup 2 for Windows XP Media Center Edition 2005 and later.

    • Registry key - HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Media Center\Settings\DvdSettings
    • Registry value - SearchNetworkFolders
    • Registry value data type - REG_DWORD
    • Registry value data - 1 = search network folders; 0 = do not search network folders

    Show DVDs In Drives First - My DVDs Gallery can display DVDs that are loaded in drives as the first items or sorted in with the rest of your DVDs. Should DVDs that are loaded in drives appear first? This setting is only available in Update Rollup 2 for Windows XP Media Center Edition 2005 and later.

    • Registry key - HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Media Center\Settings\DvdSettings
    • Registry value - ShowDiscsInDrivesAtTop
    • Registry value data type - REG_DWORD
    • Registry value data - 1 = show DVDs in drives first; 0 = show DVDs in drives based on the current sort order

    Show Cache File Location - In My DVDs when no metadata can be found for the current disc, the location of the cache file can be displayed on the DVD details page. You can edit this file to include any data that you would like to see displayed on the details page instead. Should the location of the cache file be displayed if there is no metadata? This setting is only available in Update Rollup 2 for Windows XP Media Center Edition 2005 and later.

    • Registry key - HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Media Center\Settings\DvdSettings
    • Registry value - ShowCacheLocation
    • Registry value data type - REG_DWORD
    • Registry value data - 1 = show cache file location; 0 = do not show cache file location

    Suppress Eject Prompt - When a 3rd party application (More Programs or Online Spotlight) tries to eject a disc, do you want a confirmation dialog? This setting is only available in Update Rollup 2 for Windows XP Media Center Edition 2005 and later.

    • Registry key - HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Media Center\Settings\DvdSettings
    • Registry value - SuppressExtensibilityEjectPrompt
    • Registry value data type - REG_DWORD
    • Registry value data - 0 = show eject prompt; 1 = do not show eject prompt

    Display My Music As Last Viewed - Display my music as I last viewed it sorted by artist, albums, playlists, songs or genres.

    • Registry key - HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Media Center\Settings\Audio
    • Registry value - fMyCollectionShouldBeSticky
    • Registry value data type - REG_DWORD
    • Registry value data - 1 = remember last music view; 0 = do not remember last music view

    Show Add To Queue Notification - Do you want to be notified every time music has been successfully added to the queue?

    • Registry key - HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Media Center\Settings\Audio
    • Registry value - fShowAddToQueueSuccessPrompt
    • Registry value data type - REG_DWORD
    • Registry value data - 1 = show Add To Queue notification; 0 = do not show notification

    Enable Universal Remote Control - If you have a universal remote control you may need to enable it. A reboot is required for this setting to take effect.

    • Registry key - HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\HidIr\Remotes\745a17a0-74d3-11d0-b6fe-00a0c90f57da
    • Registry value - EnableDebounce
    • Registry value data type - REG_DWORD
    • Registry value data - 1 = enable universal remote control; 0 = disable universal remote control

    Set Remote Control ID - To enable your Media Center to respond to a specific remote control ID do the following; 1. Press and hold the DVD Menu key on the remote then press a number button (1-8) for 5 seconds. Remotes with visible LED signal indicators will blink twice to confirm the change.  2. Enter that same number below. 3. Save. 4. Restart the Media Center PC.  Note: To enable Media Center to respond to all remotes use the number 0. A reboot is required for this setting to take effect.

    • Registry key - HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\HidIr\Remotes\745a17a0-74d3-11d0-b6fe-00a0c90f57da
    • Registry value - CodeSetNum0
    • Registry value data type - REG_DWORD

    This setting also requires deleting the following registry values:

    • Registry key - HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\HidIr\Remotes\745a17a0-74d3-11d0-b6fe-00a0c90f57da
    • Registry value - CodeSetNum1
    • Registry value - CodeSetNum2
    • Registry value - CodeSetNum3

    Display Wireless Passwords - When joining a wireless network, do you want to read the password as you enter it or do you want it to be hidden?

    • Registry key - HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Media Center
    • Registry value - DontHideWirelessKey
    • Registry value data type - REG_DWORD
    • Registry value data - 1 = display password; 0 = hide password

    Optimize For Display Type - By default Media Center Extender is optimized for display on a traditional TV. However, if you have a LCD or plasma TV you may want to disable this optimization in order to improve picture quality.

    • Registry key - HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Media Center
    • Registry value - TVSkin
    • Registry value data type - REG_DWORD
    • Registry value data - 1 = optimize for traditional TV; 0 = optimize for LCD or plasma screen

    Show Network Congestion Notification - Do you want to be notified on your Extender when there is network congestion preventing good performance?

    • Registry key - HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MediaCenterPeripheral
      Registry value - DisableTransraterDialogs
    • Registry value data type - REG_DWORD
    • Registry value data - 0 = show notification; 1 = do not show notification

    Show 'Not Enough Bandwidth For TV' Notification - Do you want to be notified on your Extender when there is not enough bandwidth to enable a good TV experience?

    • Registry key - HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MediaCenterPeripheral
    • Registry value - DisableMHN
    • Registry value data type - REG_DWORD
    • Registry value data - 1 = show notification; 0 = do not show notification

    Prompt When Navigating Between Secure and Insecure Pages - Should the Extender prompt when navigating between secure and insecure pages within a partner application?

    • Registry key - HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MediaCenterPeripheral\Setup\Internet Settings
    • Registry value - WarnOnZoneCrossing
    • Registry value data type - REG_DWORD
    • Registry value data - 0 = prompt; 1 = do not prompt

    Prompt When Submitting Nonencrypted Information - Should the Extender prompt when submitting nonencrypted information in a partner application?

    • Registry key - HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MediaCenterPeripheral\Setup\Internet Settings\Zones\3
    • Registry value - 1601
    • Registry value data type - REG_DWORD
    • Registry value data - 1 = prompt; 0 = do not prompt

    Prompt On Mixed Content - Should the Extender prompt when displaying a partner application page that contains both encrypted and nonencrypted content?

    • Registry key - HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MediaCenterPeripheral\Setup\Internet Settings\Zones\3
    • Registry value - 1609
    • Registry value data type - REG_DWORD
    • Registry value data - 1 = prompt; 3 = do not prompt

    Adjust Audio and Video Network Priority - Do you want to prioritize a seamless audio experience higher than a seamless video experience when there is network congestion preventing good performance?

    • Registry key - HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MediaCenterPeripheral
    • Registry value - DisableTransrater
    • Registry value data type - REG_DWORD
    • Registry value data - 0 = prioritize audio higher than video; 1 = prioritize audio and video equally

     

  • Aaron Stebner's WebLog

    How to uninstall an application when it does not appear in Add/Remove Programs

    • 39 Comments

    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:

    1. Use these steps to download and run the MsiInv tool to create a list of applications that Windows Installer thinks are installed on the computer
    2. Open the MsiInv output file, locate the product that you are interested in removing and copy the Product Code value to your clipboard.  The Product Code will be a GUID with curly braces surrounding it.  Make sure to copy the curly braces in addition to the GUID value
    3. Go to the Start menu, choose Run and type cmd
    4. From the cmd prompt, run msiexec /x {product_code} using the Product Code value from the MsiInv output and try to uninstall it using the standard MSI uninstall command line
    5. If the uninstall succeeds, you can stop here
    6. If the uninstall did not succeed, download the smartmsizap tool (if you are interested, you can read about the behind-the-scenes design for smartmsizap here) and extract it to c:\ on your computer
    7. From the cmd prompt, run c:\smartmsizap.exe /p {product_code} using the Product Code value from the MsiInv output

    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>

     

  • Aaron Stebner's WebLog

    Possible .NET Framework 3.5 installation failure caused by broken MSXML registration

    • 65 Comments

    The .NET Framework 3.5 can fail to install on a system where MSXML is not properly registered.  There is a custom action that runs during .NET Framework 3.5 setup that tries to use some APIs in MSXML to modify some information in the web_mediumtrust.config file that is a part of the .NET Framework 2.0.  In the cases that we've seen of this issue so far, one of the MSXML CLSID values was somehow unregistered on the system, and that causes this custom action to fail.

    How to diagnose this issue from the .NET Framework 3.5 setup log file

    This issue will cause the following information to be written to the verbose MSI log file for the .NET Framework 3.5 component (named %temp%\dd_net_framework35_MSI*.txt):

    MSI (s) (58:94) [11:11:11:829]: Invoking remote custom action. DLL: C:\WINDOWS\Installer\MSI35C6.tmp, Entrypoint: ExecXmlConfig
    MSI (s) (58:F0) [11:11:11:829]: Generating random cookie.
    MSI (s) (58:F0) [11:11:11:829]: Created Custom Action Server with PID 4936 (0x1348).
    MSI (s) (58:74) [11:11:11:860]: Running as a service.
    MSI (s) (58:00) [11:11:11:860]: Hello, I'm your 32bit Elevated custom action server.
    ExecXmlConfig:  Error 0x80040154: failed to load XML file: C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\CONFIG\web_mediumtrust.config
    MSI (s) (58!50) [11:11:11:954]: Product: Microsoft .NET Framework 3.5 -- Error 25541.Failed to open XML file C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\CONFIG\web_mediumtrust.config, system error: -2147221164

    How to work around this issue

    You can use one of the following options to work around this issue if you encounter it during .NET Framework 3.5 setup.  Note that these workarounds are only useful for this exact error and HRESULT value.  They will not help fix all possible .NET Framework 3.5 setup failures.

    1. Re-register msxml3.dll by running regsvr32 msxml3.dll
    2. Re-install MSXML3 by downloading and installing the package from http://www.microsoft.com/downloads/details.aspx?familyid=28494391-052b-42ff-9674-f752bdca9582

    More details about the root cause of this issue

    In the example log file above, the HRESULT value is 0x80040154, which means that a class is not registered.  On systems where we have seen this error, the root MSXML CLSID is listed in the registry at the following location:

    [HKEY_CLASSES_ROOT\Msxml2.DOMDocument\CLSID]
    @="{F6D90F11-9C73-11D3-B32E-00C04F990BB4}"

    However, the following sub-key for this CLSID was not present on this system:

    [HKEY_CLASSES_ROOT\CLSID\{F6D90F11-9C73-11D3-B32E-00C04F990BB4}]

    The suggested workarounds listed above will re-register this CLSID, which has fixed this issue in the cases we have seen of this error so far.

  • Aaron Stebner's WebLog

    Possible fixes for IR receiver or remote problems after installing Update Rollup 2 for MCE 2005

    • 102 Comments

    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:

    1. Go to the Start menu, choose Run and type devmgmt.msc
    2. Expand the Human Interface Devices category
    3. Right-click on each of the items with eHome Infrared Transceiver in the name and choose Uninstall
    4. Unplug the IR device from the computer and wait for approximately 30 seconds
    5. Plug the IR device back into the computer and wait for Windows plug-and-play detection to kick in and re-install the device

    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:

    1. Delete the file named %windir%\inf\keyboard.pnf.  Please note that the correct file to delete ends in PNF - do not delete keyboard.INF.
    2. Go to the Start menu, choose Run and type devmgmt.msc
    3. Expand the Human Interface Devices category
    4. Right-click on each of the items with eHome Infrared Transceiver in the name and choose Uninstall
    5. Unplug the IR device from the computer and wait for approximately 30 seconds
    6. Plug the IR device back into the computer and wait for Windows plug-and-play detection to kick in and re-install the device

    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>

     

  • Aaron Stebner's WebLog

    .NET Framework cleanup tool now supports .NET Framework 4.5 and Windows 8

    • 42 Comments

    I have posted an updated version of the .NET Framework cleanup tool that supports cleaning up the .NET Framework 4.5. It has also been updated to correctly recognize when it is running on Windows 8. There is more information about how to download and use the .NET Framework cleanup tool in the user’s guide at http://blogs.msdn.com/b/astebner/archive/2008/08/28/8904493.aspx.

    As always, if you run into any issues or have any feedback about the .NET Framework cleanup tool, please let me know by posting a comment on one of my blog posts or using the contact form.

  • Aaron Stebner's WebLog

    How to change the temporary folder if you run out of space while burning a DVD in Media Center

    • 12 Comments

    I recently tried to burn a video DVD on my Media Center 2005 system.  I tried to fit 2 hours of recorded TV content on the DVD, and Media Center told me it would need to compress the content in order to fit it on the DVD.  I pressed OK and left my Media Center going overnight to burn the DVD for me.  Then, when I came back in the morning I found an error message stating that my system was out of disk space.  I have my system configured with a 10 gigabyte C drive where I installed the Media Center OS and and then a 200+ gigabyte D drive where I store my music, photos and recorded TV.

    After some further investigation, I found that the Sonic DVD burning software that is included with Media Center uses the default temporary folder (%temp%) when it transcodes recorded TV to compress it for burning to a video DVD.  In my case, I only have about 2-3 gigabytes free on my C drive, but I have 150+ gigabytes free on my D drive.  I found that I was able to change the default temporary folder location that Windows uses in order to allow my Media Center to use the D drive for temporary storage and correctly burn my video DVD.

    Here are the steps I used to change the default temporary folder location and fix the Media Center video DVD burning issue I was running into:

    1. Click on the Start menu, choose Run and type sysdm.cpl
    2. Click on the Advanced tab and click the Environment Variables button at the bottom
    3. Double-click on the User variable named TEMP and change it to a path on your D drive
    4. Double-click on the User variable named TMP and change it to a path on your D drive
    5. Double-click on the System variable named TEMP and change it to a path on your D drive
    6. Double-click on the System variable named TMP and change it to a path on your D drive
    7. Click OK to officially change these environment variables
    8. Restart your computer so that Media Center will pick up the changes to these folder locations
    9. Try to burn your television show to a video DVD again

     

  • Aaron Stebner's WebLog

    How to resolve "Windows - no disk" errors when launching Media Center 2005 on an HP machine

    • 28 Comments

    I have heard from a few folks (mostly via comments on this blog post) regarding an issue with HP Media Center 2005 machines.  On some HP machines, customers are seeing an error message pop up when launching Media Center.  This error message has the following information:

    • Title:  Windows - No Disk
    • Text:  There is no disk in the drive. Please insert a disk into drive
    • Buttons: Cancel, Try Again and Continue

    This error does not prevent Media Center from launching, but sits on the desktop until you exit Media Center.

    We were able to track this issue down to some kind of bug in the HP Image Zone for Media Center application that is pre-installed on HP Media Center systems that appears if you uninstal the Norton Anti-virus and/or System Security suite that also comes pre-installed on HP Media Center systems.  We reported this issue to HP and also some customers have reported it, and they have issued an update to Image Zone that addresses this issue.

    A customer was kind enough to post the response he received from HP about this issue.  According to the HP support team, you can find this update for Image Zone at this location, and that should allow you to resolve this No Disk error without needing to reinstall Norton or uninstall Image Zone (which are the possible workarounds suggested in the past).

    <update date="11/30/2005"> HP contacted me today with a new location for the fix, so I have updated the link in the text of this blog post </update>

    <update date="4/9/2006"> The previous link I had posted seemed to be unreliable for some people because it was pointed to the HP FTP server, so I have updated it to a better link location. HP also appears to have updated the package since I originally posted this as well to provide some additional fixes. </update>

     

  • Aaron Stebner's WebLog

    How to fix some 1935 errors with HRESULT 0x80070005 (access denied) when installing the .NET Framework

    • 41 Comments

    I was contacted by a customer this week who could not install the .NET Framework 1.1 due to a 1935 error that was not described in my previous blog posts (here and here for example).  The exact error was the following:

    MSI (s) (E0:80) [12:44:29:575]: Product: Microsoft .NET Framework 1.1 -- Error 1935.An error occurred during the installation of assembly 'Microsoft.Vsa.Vb.CodeDOMProcessor, Version="7.0.5000.0", PublicKeyToken="b03f5f7f11d50a3a", Culture="neutral", FileVersion="7.10.3052.4"'. Please refer to Help and Support for more information. HRESULT: 0x80070005. assembly interface: IAssemblyCacheItem, function: Commit, component: {7D4B5591-4C80-42BB-B0E5-F2C0CEE02C1A}

    As I described here, the HRESULT value 0x80070005 means "access denied".  Typically this happens due to a permission (ACL) problem on one of the directories under \windows\.  But in this case, the customer tried to reset the permissions and re-run setup but got the same error.

    I suggested looking at any anti-virus or anti-spyware software because they tend to lock down files and folders to prevent malicious programs from installing themselves, and it is very hard to detect the difference between a trusted setup program and a malicious one.  The customer found that they had the Sophos anti-virus program installed.  They were able to successfully install the .NET Framework 1.1 by stopping the Sophos service (sweepsrv.sys) and then running .NET Framework setup.

    Note that in this type of scenario, you should be very careful when stopping anti-virus and anti-spyware software.  What I typically do is the following:

    1. Download the setup package I want to install
    2. Disconnect from the network
    3. Stop anti-virus and anti-spyware software
    4. Install the software I downloaded in step 1
    5. Restart anti-virus and anti-spyware software
    6. Reconnect to the network

     

  • Aaron Stebner's WebLog

    Update regarding silent install of the VC 8.0 runtime (vcredist) packages

    • 44 Comments

    A while back, I posted this item on my blog that describes options for silent installation of the Visual C++ 8.0 runtime redistributable setup packages.  When I investigated this issue and wrote that blog post, I based the command line parameters on the versions of vcredist_x86.exe, vcredist_x64.exe and vcredist_ia64.exe that are included in the directory %ProgramFiles%\Microsoft Visual Studio 8\SDK\v2.0\Bootstrapper\Packages when installing Visual Studio 2005.

    However, a customer recently alerted me to an issue that I wasn't aware of previously.  The standalone versions of the VC runtime redistributable packages that are available for download via the web are packaged differently, and so the command lines that I previously documented for silent installation will not work with those versions of the packages.  Essentially, the standalone versions are wrapped in a second self-extracting EXE that displays a EULA before allowing extraction and execution of the main setup package, whereas the packages included as part of Visual Studio 2005 directly launch setup and are not doubly wrapped.

    Therefore, here are some amended silent install instructions for the VC 8.0 runtime redistributable packages.  If you are using the packages included as a part of Visual Studio 2005, you can continue to use the silent install switches from my previous blog post.

    However, if you have downloaded the standalone VC 8.0 redistributable packages, you will need to modify the command lines slightly.  The following command lines can be used to install the original release of the standalone VC 8.0 redistributable packages:

    • For x86: vcredist_x86.exe /q:a /c:"VCREDI~1.EXE /q:a /c:""msiexec /i vcredist.msi /qn"" "
    • For x64: vcredist_x64.exe /q:a /c:"VCREDI~2.EXE /q:a /c:""msiexec /i vcredist.msi /qn"" "
    • For ia64: vcredist_ia64.exe /q:a /c:"VCREDI~3.EXE /q:a /c:""msiexec /i vcredist.msi /qn"" "

    The following command lines can be used to install the Visual Studio 2005 SP1 release of the standalone VC 8.0 redistributable packages:

    • For x86: vcredist_x86.exe /q:a /c:"VCREDI~3.EXE /q:a /c:""msiexec /i vcredist.msi /qn"" "
    • For x64: vcredist_x64.exe /q:a /c:"VCREDI~2.EXE /q:a /c:""msiexec /i vcredist.msi /qn"" "
    • For ia64: vcredist_ia64.exe /q:a /c:"VCREDI~1.EXE /q:a /c:""msiexec /i vcredist.msi /qn"" "

    The following command lines can be used to install the Visual Studio 2005 SP1 ATL Security Update release of the standalone VC 8.0 redistributable packages:

    • For x86: vcredist_x86.exe /q:a /c:"VCREDI~3.EXE /q:a /c:""msiexec /i vcredist.msi /qn"" "
    • For x64: vcredist_x64.exe /q:a /c:"VCREDI~2.EXE /q:a /c:""msiexec /i vcredist.msi /qn"" "
    • For ia64: vcredist_ia64.exe /q:a /c:"VCREDI~1.EXE /q:a /c:""msiexec /i vcredist.msi /qn"" "

    If you would like to install the VC runtime packages in unattended mode (which will show a small progress bar but not require any user interaction), you can change the /qn switch above to /qb.  If you would like the progress bar to not show a cancel button, then you can change the /qn switch above to /qb!

    <update date="4/25/2007"> Added new command lines for the VS 2005 SP1 version of the VC 8.0 redistributable packages </update>

    <update date="7/29/2007"> Updated command line switches to distinguish between unattended install mode and silent install mode </update>

    <update date="10/16/2009"> Added information about the command lines for the VC++ 2005 SP1 ATL Security Update package. </update>

     

  • Aaron Stebner's WebLog

    What to do if Media Center Extender for Xbox 360 setup crashes

    • 64 Comments

    I have heard from a couple of customers who have tried to download and install the software to enable using Xbox 360 as an Extender for Media Center 2005 with Update Rollup 2, but have encountered a crash dialog from the DvcSetup.exe process at the beginning of setup.  I finally located a computer in our test lab that reproduced this issue and found a possible root cause and workaround in case anyone else runs into this.

    Problem description

    The Xbox 360 PC setup package crashes almost immediately after it is launched.  The error dialog indicates that DvcSetup.exe crashed, and it may ask if you want to debug the problem.

    Workaround

    I was able to use the following steps to clean up the machine in our test lab that exhibited this problem:

    1. Go to Add/Remove Programs and remove the .NET Framework 1.1 (and any .NET Framework 1.1 language packs if you have any installed)
    2. Download the .NET Framework cleanup tool, run it and choose to clean up the .NET Framework 1.1
    3. Reinstall the .NET Framework 1.1 
    4. Reinstall the .NET Framework 1.1 SP1

    Details about the root cause if you are interested

    On the machine I investigated, the .NET Framework 1.1 had been installed, but none of the files were correctly installed in the global assembly cache (GAC).  I found that there were folders created for each assembly (for example - %windir%\assembly\GAC\Accessibility\1.0.5000.0__b03f5f7f11d50a3a), but the folders did not actually contain the assembly.  I also saw the following entries in the verbose MSI log file for the .NET Framework 1.1 on this machine:

    MSI (s) (C8:D8): skipping installation of assembly component: {45B8FB98-2A6C-11D6-A551-0090278A1BB8} since the assembly already exists

    There is a bug in the version of Fusion that shipped with the .NET Framework 1.0 and 1.1 where it would skip installing an assembly to the GAC if the folder already existed, even if the file was not in the folder.  Windows Installer uses Fusion to try to install assemblies into the GAC, and as the log file shows, each of the .NET Framework 1.1 assemblies was skipped because Fusion thought they already existed.

    So far, I have only seen one scenario where empty folders exist in the GAC and cause this type of behavior for .NET Framework 1.1 setup.  If you have an operating system installed and have the .NET Framework 1.1 installed, and then you peform a clean install of your operating system to the same partition and choose not to format the partition, OS setup will create a new Windows directory for you.  When it does so, OS setup copies your Windows directory to a backup location and creates the same set of folders that previously existed in your Windows directory.  However, OS setup will not mirror any of the files because it assumes that you will want the copies of the files that are a part of the OS setup that you are currently installing.

    This type of OS install leaves your computer in a state where the .NET Framework 1.1 assembly folders exist in the GAC, but they are all empty, and then due to the bug in Fusion that I previously installed, reinstalling the .NET Framework 1.1 does not fix the problem.  The workaround I described above will work correctly because the .NET Framework cleanup tool will remove these empty directories, which will allow a reinstall of the .NET Framework 1.1 to correctly install the assemblies to the GAC.

     

  • Aaron Stebner's WebLog

    Updated versions of .NET Framework cleanup and verification tools that work with the .NET Framework 4

    • 18 Comments

    Over the past week or so, I finally found some time to update the .NET Framework cleanup and verification tools to support the recently released .NET Framework 4 product family.  I have uploaded new versions of both tools, and you can find more information about the tools and download links in their users guides.  Here are links for the users guides for each of these tools:

    As always, please let me know if you run into any bugs, questions or feature suggestions while using either of these tools.  I would prefer that you post a comment on the user’s guide blog posts so the comments will be visible to other users as well, but you can also send me an email.

  • Aaron Stebner's WebLog

    Info about the 1935 error with HRESULT 0x80131532

    • 42 Comments

    A little while back I posted a blog entry about some common 1935 errors that might happen during an MSI installation.  Since then, I have gotten a few questions about different types of 1935 errors that have HRESULTs not listed in my previous post.

     

    I wanted to talk about one specific interesting type of error.  The HRESULT for this error is 0x80131532, and the corresponding error code in the header file means COR_E_MISSINGMANIFESTRESOURCE.

     

    This error has a couple of possible causes.  Both of the causes I have encountered so far are rooted in errors during setup creation.

     

    Case 1 – incorrect file entry in the MsiAssembly table

     

    In the case of the customer that reported this HRESULT to me, the MSI was authored with an invalid file value in the File_Manifest column of the MsiAssembly table for one or more assemblies that are listed to be installed.  The fix is to make sure that the File_Manifest values for all assemblies in the MsiAssembly table refer to file entries that exist in the File table of the MSI.  The interesting thing (in a bad way) is that the customer who hit this problem reported that ICE validation suites did not catch this problem.  I haven’t had a chance yet to look into why ICEs would miss this because it seems like a relatively simple thing to validate.

     

    Case 2 – invalid assembly attributes in the MsiAssemblyName table

     

    The other cause that I have seen so far is specific to the .NET Framework 2.0 beta 1.  In this scenario a .NET assembly is authored with invalid attribute pairs in the MsiAssemblyName table of the MSI.  

     

    In the .NET Framework 2.0 beta 1, if in valid attribute pairs are found in the MsiAssemblyName table, installation fails with a 1935 error.  In the .NET Framework 2.0 beta 2 and later, this will be reverted back to the behavior seen in .NET Framework 1.0 and 1.1 - unknown assembly identity attributes will be ignored and not cause errors or failures.

     

    The following blog entry and bug report describe this instance of the problem in more detail.

     

     

  • Aaron Stebner's WebLog

    Visual Studio 2008 and .NET Framework 3.5 setup log files

    • 66 Comments

    The installers for the .NET Framework 3.5 and Visual Studio 2008 chain several different prerequisites and optional components behind the scenes.  If one of these setups fails, there are numerous possible causes due to the number of packages being chained behind the scenes.  The following provides a list of log files created by the setup wrappers for each product and the child packages that are chained in during installation. 

    .NET Framework 3.5 setup log files

    The following is a complete list of log files that can be produced during .NET Framework 3.5 setup.  This list may vary depending on what OS you are installing on, what processor architecture, and what prerequisite components were already installed on the system prior to running .NET Framework 3.5 setup.

    Logs produced by the .NET Framework 3.5 setup wrapper:

    • %temp%\dd_dotnetfx35install.txt
    • %temp%\dd_dotnetfx35error.txt
    • %temp%\dd_depcheck_netfx*.txt

    Logs produced by the packages chained during .NET Framework 3.5 setup:

    • RGB Rasterizer - %temp%\dd_RGB9Rast_*.txt
    • MSXML 6.0 - %temp%\dd_msxml6_*.txt
    • WIC - %temp%\dd_wic*.txt
    • .NET Framework 2.0 SP1 - %temp%\dd_net_framework20*.txt
    • .NET Framework 3.0 SP1 - %temp%\dd_net_framework30*.txt
    • .NET Framework 3.0 SP1 WCF custom action - %temp%\dd_wcf_retCA*.txt
    • .NET Framework 3.5 product MSI - %temp%\dd_net_framework35*.txt

    Visual Studio 2008 setup log files

    The following is a complete list of log files that can be produced during Visual Studio 2008 setup.  This list may vary depending on what OS you are installing on, what processor architecture, and what prerequisite components were already installed on the system prior to running Visual Studio 2008 setup.

    In addition to the logs listed below, Visual Studio 2008 setup can produce the logs listed above for the .NET Framework 3.5 because the .NET Framework 3.5 is a prerequisite that is chained in during Visual Studio 2008 setup if it is not already installed on the system.

    Logs produced by the Visual Studio 2008 setup wrapper:

    • %temp%\dd_install*.txt
    • %temp%\dd_error*.txt
    • %temp%\dd_depcheck*.txt
    • VSMsiLog*.txt - located in your %temp% directory during Visual Studio 2008 setup; moved to %ProgramFiles%\Microsoft Visual Studio 9.0\<product name>\Logs after a successful installation; left in %temp% after a failed installation and after uninstallation

    Logs produced by the packages chained during Visual Studio 2008 setup:

    • Windows Installer 3.1 - %windir%\KB893803v2.log
    • .NET Framework 3.5 - see the full list of logs at the top of this post
    • Visual Studio 2008 64bit Prerequisites - %temp%\dd_prereq*.txt
    • Document Explorer 2008 - %temp%\dd_dexplore*90*.txt
    • Web Designer Tools - %temp%\SetupExe(*).txt
    • .NET Compact Framework 2.0 SP2 - %temp%\dd_netcfsetupv2*.txt
    • .NET Compact Framework 3.5 - %temp%\dd_netcfsetupv35*.txt
    • Visual Studio Tools for Office Runtime 3.0 - %temp%\dd_vstor*.txt
    • Visual Studio 2005 Tools for the 2007 Microsoft Office System Runtime - %temp%\dd_vsto_ret20*.txt
    • SQL Server Compact Edition 3.5 - %temp%\dd_SSCERuntime*.txt
    • SQL Server Compact Edition 3.5 Design Tools - %temp%\dd_SQLCEToolsForVS2007*.txt
    • SQL Server Compact Edition 3.5 For Devices - %temp%\dd_SSCEDeviceRuntime*.txt
    • Windows Mobile 5.0 SDK R2 for Pocket PC - %temp%\dd_WMPPC_5_0*.txt
    • Windows Mobile 5.0 SDK R2 for Smartphone - %temp%\dd_WMSP_5_0*.txt
    • Device Emulator version 3.0 - %temp%\dd_64bitEmulator*.txt, %temp%\dd_EmulatorForWinXP*.txt and/or %temp%\dd_Emulator*.txt
    • SQL Server 2005 Express Edition - %programfiles%\Microsoft SQL Server\90\Setup Bootstrap\LOG\Files\*.*
    • Visual Studio 2008 Remote Debugger - %temp%\dd_rdbg*.txt
    • Windows SDK - %temp%\dd_winsdk*.txt
    • Visual Studio Performance Collection Tools - %temp%\dd_Performance_Collection_Tools*.txt
    • Crystal Reports - %temp%\dd_CrystalReports2007*.txt

    Logs produced by the packages chained during Visual Studio 2008 Express Edition setups:

    • Windows Installer 3.1 - %windir%\KB893803v2.log
    • .NET Framework 3.5 - see the full list of logs at the top of this post
    • SQL Server Compact Edition 3.5 - %temp%\dd_SSCERuntime*.txt
    • SQL Server Compact Edition 3.5 Design Tools - %temp%\dd_SQLCEToolsForVS2007*.txt
    • Visual Studio 2008 Remote Debugger Light - %temp%\dd_ExpRemoteDbg*.txt
    • Windows SDK - %temp%\dd_winsdk*.txt
    • MSDN for Visual Studio Express Editions - %temp%\dd_MSDNExp*.txt
    • Silverlight 1.0 - %temp%\Silverlight*.txt

    Logs produced by the MSDN for Visual Studio 2008 setup wrapper:

    • %temp%\dd_install_MSDN_VS_90*.txt
    • %temp%\dd_error_MSDN_VS_90*.txt
    • %temp%\dd_depcheck_MSDN_VS_90*.txt
    • VSMsiLog*.txt - located in your %temp% directory during MSDN setup; moved to %ProgramFiles%\MSDN\MSDN9.0\<product name>\Logs after a successful installation; left in %temp% after a failed installation and after uninstallation

    Logs produced by Visual Studio 2008 SP1:

    • %temp%\Microsoft Visual Studio 2008 SP1*.* 

    If you run into any issues while installing the .NET Framework 3.5, Visual Studio 2008 or MSDN for Visual Studio 2008 and plan to report setup issues to Microsoft via the product feedback site or the MSDN Forums, please locate and include any of the above log files if possible because it will make it easier for us to debug the failures and find root causes and workarounds.

    <update date="10/4/2007"> Added a log file to the .NET Framework 3.5 list for the WCF custom action that I missed previously </update>

    <update date="1/11/2008"> Added Silverlight log files to the list for VS 2008 Express Editions since it was added as a chained component between the time I wrote this blog post and the time that VS 2008 shipped. </update>

    <update date="5/23/2008"> Added log file information for Visual Studio 2008 SP1 </update>

    <update date="11/20/2009"> Fixed broken link to the product feedback site. </update>

     

  • Aaron Stebner's WebLog

    Possible workaround if .NET Framework setup hangs while registering System.EnterpriseServices.dll

    • 44 Comments

    We have run into a few cases where customers have been trying to install the .NET Framework 2.0 and have seen setup hang or fail while trying to register System.EnterpriseServices.dll.  I have heard from a couple of customers who ran into this particular issue and found a workaround that allowed them to successfully install, so I wanted to post the workaround here to make it easier for others to find.  The customers I have heard from found this workaround useful for the .NET Framework 2.0, but the same workaround may also be useful for installation failures in the .NET Framework 1.0 and 1.1.

    The command that registers System.EnterpriseServices.dll is implemented as a custom action that runs the command regsvcs.exe /bootstrapi.  This command can fail or hang indefinitely if the Microsoft Distributed Transaction Coordinator (MSDTC) service is in a broken state on the system.  If you see .NET Framework setup (1.0, 1.1 or 2.0) fail or hang during registration of System.EnterpriseServices.dll, the following steps may be useful to resolve this issue:

    1. Click on the Start menu, choose Run and type services.msc
    2. Locate the Distributed Transaction Coordinator service, right-click on it and choose Properties
    3. In the Startup type drop-down, select Disabled
    4. If the service status is currently listed as running, click the button to stop the service
    5. Close the Services control panel and try to install the .NET Framework again

    Note that I have written about other possible causes of this type of installation failure in the following blog posts, and if the above workaround does not succeed, these additional articles may be helpful:

     

  • Aaron Stebner's WebLog

    Mailbag: How to perform a silent install of the Visual C++ 2008 redistributable packages

    • 67 Comments

    Question:

    You previously posted a list of command line switches to perform silent and unattended installations of the Visual C++ 2005 runtime redistributable packages.  How can I perform silent and unattended installations of the Visual C++ 2008 runtime redistributable packages?

    Answer:

    The Visual C++ 2008 redistributable packages (vcredist_x86.exe, vcredist_x64.exe and vcredist_ia64.exe) support the following command line installation options.

    The same command lines are valid for the VC++ 2008 redistributable packages and the VC++ 2008 SP1 redistributable packages.

    The examples below use the file named vcredist_x86.exe, but you can substitute the 64-bit versions of the EXEs with equivalent command lines to achieve the same behavior for them as well. 

    Unattended install

    This option will run setup and display a progress dialog but requires no user interaction.

    <full path>\vcredist_x86.exe /qb

    For example, if you download vcredist_x86.exe to a folder named c:\vc2008redist, then the command line would look like this:

    c:\vc2008redist\vcredist_x86.exe /qb

    Unattended install with no cancel button

    This option is the same as the previous option, except that the user will not have the option to press cancel during installation.

    <full path>\vcredist_x86.exe /qb!

    For example, if you download vcredist_x86.exe to a folder named c:\vc2008redist, then the command line would look like this:

    c:\vc2008redist\vcredist_x86.exe /qb!

    Silent install

    This option will suppress all UI during installation.

    <full path>\vcredist_x86.exe /q

    For example, if you download vcredist_x86.exe to a folder named c:\vc2008redist, then the command line would look like this:

    c:\vc2008redist\vcredist_x86.exe /q

    Related links:

    <update date="7/7/2009"> Added information to indicate that you must provide the full path to the file vcredist_x86.exe when running the silent install command lines or they will display UI. </update>

     

  • Aaron Stebner's WebLog

    Mailbag: How can I customize an MSI in the Visual Studio setup/deployment project?

    • 108 Comments

    Question:

    I am using the Visual Studio setup/deployment project to create an MSI to install my application.  I would like to add some functionality to this MSI that does not appear to be supported in the Visual Studio IDE (such as modifying the default install path based on a registry value on the system).  I know how to do this by directly editing the MSI, but I don't want to have to manually edit the MSI each time I build.  Are there any other options I can use in this scenario?

    Answer:

    There is a limited set of customizations you can make to an MSI in the Visual Studio IDE UI for a setup/deployment project.  By limited, I mean that there are a lot of features that are natively supported in Windows Installer MSI format that are not exposed for customization in the Visual Studio IDE.  Examples include changing the default install path based on a registry value, advanced setup UI features such as updated banner text or a "launch my product" checkbox on the final screen, creating custom actions that reference external executable files, or setting various custom action attributes (among other things).

    If you would like to automate the ability to customize an MSI that is built by the Visual Studio setup/deployment project in a way that is not currently supported by the UI in the Visual Studio IDE, you can write a script that accesses the Windows Installer object model to perform these customizations.  Then you can create a post-build step in your Visual Studio setup/deployment project to run your script after the MSI has been built so that the final result each time you build will be an MSI package with your additional customizations made to it.

    As an example, you can use the sample script at this location to add a checkbox to your MSI's setup UI that will let the user choose whether or not to launch your product after setup finishes.

    If you would like to include this script as a post-build step in a Visual Studio setup/deployment project, you can use the following steps:

    1. Download the sample script and extract the contents to the directory that contains the Visual Studio setup project you are working on.

      Note: You should end up with the file EnableLaunchApplication.js in the same directory as the .vdproj file for your setup project.  The rest of these steps will not work correctly if you do not put EnableLaunchApplication.js in the correct location, so be careful about this step.

    2. Open the file EnableLaunchApplication.js in a text editor such as notepad, locate the variable at the top of the file that is set to the value WindowsApplication1.exe, and change it to the name of the EXE that is in your setup that you want to launch when the MSI is done installing
    3. Open the project in Visual Studio
    4. Press F4 to display the Properties window
    5. Click on the name of your setup/deployment project in the Solution Explorer
    6. Click on the PostBuildEvent item in the Properties window to cause a button labeled "..." to appear
    7. Click on the "..." button to display the Post-build Event Command Line dialog
    8. Copy and paste the following command line into the Post-build event command line text box:

      cscript.exe "$(ProjectDir)EnableLaunchApplication.js" "$(BuiltOuputPath)"


    9. Save your project
    10. Build your project in Visual Studio

    Note that the quotation marks in the command line in step 8 are very important because the script will not work correctly without them.  Make sure to double-check that you have put quotes in the proper places.

    You can find another example script that will update the MSI setup UI banner text in this MSDN forum post.

    <update date="8/23/2006"> Updated the steps needed to configure post-build commands in the Visual Studio UI because they are different for setup projects than for other Visual Studio project types </update>

    <update date="5/31/2007"> Updated steps to mention the need to rename WindowsApplication1.exe to the name of the EXE in each project that you want to launch.  Also fixed a typo in the variable BuiltOuputPath. </update>

    <update date="8/26/2008"> Updated steps to be more specific about what folder to save EnableLaunchApplication.js to </update>

    <update date="3/15/2009"> Fixed broken link to the sample script </update>

    <update date="7/26/2012"> Fixed bad HTML formatting and misnumbered steps </update>

     

  • Aaron Stebner's WebLog

    How to repair the .NET Framework 1.1 that ships as part of the OS on Windows Server 2003

    • 35 Comments

    The .NET Framework 1.1 ships as an OS component on the 32-bit Windows Server 2003 family of operating systems.  This .NET Framework component is a hidden, always-installed component with the exception of ASP.NET (which can be found as a selectable item underneath the Application Server item in the Add/Remove Windows Components control panel applet).

    I have seen cases where the .NET Framework 1.1 stops working correctly on Windows Server 2003 (often due to bugs in daily builds of the .NET Framework 2.0).  In those cases, it is useful to perform a repair to get the .NET Framework 1.1 back to a known good state.  However, it can be difficult to figure out how to repair .NET 1.1 in these scenarios because the component is hidden and because there is some specific logic in the setup DLL that installs this component that prevents uninstall and reinstall after OS setup has completed.

    In general, you can repair the .NET Framework 1.1 that ships with Windows Server 2003 by re-running OS setup and choosing to repair/reinstall, which will trigger the .NET Framework 1.1 component setup to rerun.

    In addition, the following steps can be performed in order to repair the .NET Framework 1.1 on Windows Server 2003 while also avoiding the need to run a full OS reinstall:

    1. Delete the registry value netfx under HKLM\Software\Microsoft\Windows\CurrentVersion\Setup\OC Manager\Subcomponents
    2. Create a file named netfx_repair.inf that contains the following text (or download it from here):

      [Version]
      Signature = "$Windows NT$"
      DriverVer=10/01/2002,5.2.3790.0
      [Components]
      netfx=netfxocm.dll,UrtOcmProc,netfxocm.inf,,7


    3. Open a cmd prompt and run the following command: sysocmgr /i:<full path to netfx_repair.inf>.

      This will bring up the Windows optional component installer wizard.  Press next and installation/repair of the .NET Framework 1.1 component will begin.  You will be asked for a path to install the files from if the location listed in the SourcePath value under HKLM\Software\Microsoft\Windows\CurrentVersion\Setup is not accessible or no longer contains the necessary OS source files.  If this happens, you will need to point the wizard to the i386 directory of the OS source disk or a network share that contains the files.  Keep in mind that if you have a version of Windows Server 2003 with a service pack integrated into it, you will need to use a source location that also includes the service pack.

    4. After the wizard completes installation, you will have to manually rerun a modified command line to install assemblies to the GAC because the command line used by the .NET Framework 1.1 component only works correctly when OS installation is in progress.  The command line is the following:

      "%windir%\Microsoft.NET\Framework\v1.1.4322\gacutil.exe" /f /il %windir%\Microsoft.NET\Framework\v1.1.4322\assemblylist.txt

      You should substitute %windir% with the actual Windows directory on your system.

    <update date="11/1/2005"> There is a Knowledge Base article that also describes how to troubleshoot .NET Framework 1.1 installation issues on Windows Server 2003 that can be useful in this type of scenarios.  You can find it at this location. </update>

    <update date="9/29/2008"> Added a note about using source files with integrated service packs if the OS was originally installed with a service pack integrated. </update>

     

  • Aaron Stebner's WebLog

    How to detect what .NET Framework 1.1 service pack is installed

    • 27 Comments

    I have seen a few questions on the newsgroups about how to determine whether or not the .NET Framework 1.1 SP1 is installed on your machine.  A colleague pointed me to a KB article that describes a method of looking at file versions to determine this.  We created a new registry hive that started getting installed in the .NET Framework 1.1 specifically to address this and a few other types of detection issues and make this simpler for 3rd party developers, so I wanted to quickly outline how to check for this in the .NET Framework 1.1 and new versions moving forward (it will take a bit for my request to have that KB article updated to go into effect on the live KB site).

    Basically you need to query for the existence of a registry value and then check the data in that value.  Here is where it is located:

    • Key Name: HKEY_LOCAL_MACHINE\Software\Microsoft\NET Framework Setup\NDP\v1.1.4322
    • Value: SP
    • Data type: REG_DWORD

    The data in this SP value tells you which service pack is installed for the .NET Framework 1.1.  For future versions of the .NET Framework, you will just need to change the part of the key named v1.1.4322 to be the version you are interested in.

    Note that this method cannot be used to tell you whether or not you have any QFE's or GDR's installed for the .NET Framework.  If anyone out there needs to be able to detect on this granular of a level, let me know via a comment or email and I can dig into this further.

    There are also other alternative ways of detecting the presence of the .NET Framework 1.0 service packs, I will post something about that when I figure out the exact details of how to do that.

    Hope this helps....

     

  • Page 2 of 48 (1,185 items) 12345»