Aaron Stebner's WebLog

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

February, 2006

  • 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

    Miscellaneous Update Rollup 2 issues and how to work around them

    • 20 Comments

    I wanted to list a few miscellaneous issues that have been found recently with Update Rollup 2 for Media Center 2005 and describe how to workaround them.  Some of these have already been described individually elsewhere, but I wanted to make it more likely that they are found in search engines by posting them again.

    1.  DVB radio tuning causes a blue No TV Signal overlay

    Peter Rosser described this issue and workaround in more detail in this blog post.  He lists the registry value that needs to be changed to workaround this problem until it is released in a future Media Center rollup package.  As a convenience, here is a command line that you can run to update this registry value do you do not have to use regedit:

    1. Click on the Start menu, choose Run and type cmd
    2. Run reg add "HKLM\Software\Microsoft\Windows\CurrentVersion\Media Center\Service\Video\Tuners\DVR" /v NearUnderflowCheckMillis /t REG_DWORD /d 4000 /f

    Note: You can copy and paste this command into the cmd prompt by highlighting it in this blog post, pressing Ctrl + C, then right-clicking on the cmd prompt window and choosing Paste.  Make sure that you copy the entire command as it is listed above, including the space between Media and Center, and do not add any extra carriage returns in the middle of the command line or it will not work correctly.

    2.  High-definition (ATSC) tuners stop working after uninstalling Update Rollup 2

    Peter Rosser also described this issue in his blog, and you can find more information in this post.  Here is a set of steps that will delete the registry value that is needed to restore ATSC tuner functionality if you uninstall Update Rollup 2:

    1. Close Media Center
    2. Click on the Start menu, choose Run and type cmd
    3. Run net stop ehsched and net stop ehrecvr
    4. Run reg delete "HKLM\Software\Microsoft\Windows\CurrentVersion\Media Center\Service\Video\Tuners" /f
    5. Restart Media Center

    Note: Like in the issue described above, you can copy and paste this command into the cmd prompt by highlighting it in this blog post, pressing Ctrl + C, then right-clicking on the cmd prompt window and choosing Paste.  Make sure that you copy the entire command as it is listed above, including the space between Media and Center, and do not add any extra carriage returns in the middle of the command line or it will not work correctly.

    3.  Media Center will not correctly enter standby mode if the TV tuner was used prior to going into standby

    This is a recently discovered regression introduced in Update Rollup 2 that we are currently working on a fix for.  Once a fix is ready, it will likely be included in the next Media Center hotfix rollup package.  The only known workaround at this time is to disable Media Center sounds by navigating to Settings | General | Visual and Sound Effects and unchecking the box labeled Play sounds while navigating Media Center.

    4.  ATSC minor channels are listed incorrectly in the Media Center television guide

    Peter Rosser described this issue in his blog in this post.  This is a known issue that will be fixed in the next hotfix rollup for Media Center 2005, but unfortunately there is not a way to workaround this issue in the meantime.

     

  • Aaron Stebner's WebLog

    Mailbag: How can I deploy the .NET Framework 2.0 using Group Policy?

    • 19 Comments

    Question

    You previously posted a set of instructions that can be used to run the .NET Framework 2.0 setup by calling the MSI directly.  The instructions in that post describe a command line parameter named ADDEPLOY that needs to be passed to msiexec.exe to allow the MSI to install correctly.

    I want to deploy the .NET Framework 2.0 in my network using Group Policy.  I cannot specify a command line parameter like ADDEPLOY in the Group Policy deployment package creation UI.  How can I deploy the .NET Framework 2.0 MSI on my network using Group Policy?

    Answer

    The following example steps can be used to create a Group Policy object to deploy the .NET Framework 2.0 in a network:

    1. Click on the Start menu, choose Run and type cmd
    2. Create an administrative install point for the .NET Framework 2.0 by running dotnetfx.exe /c:"install.exe /a" and stepping through the wizard UI
    3. Add the netfx.msi that is created in the administrative install point created above to the Group Policy object.  The path to netfx.msi must be located on a share that is accessible from all computers where it will be deployed to, not on a local path (example - \\server\share\netfx20\netfx.msi not C:\netfx20\netfx.msi)

    It is important to note that the .NET Framework 2.0 only supports deployment by machine assignment, not by user publishing. This is because the user may not be an administrator on the machine in the advertised scenario, and because the .NET Framework is a per-machine and not a per-user application.

    Behind the scenes, the .NET Framework 2.0 MSI has a custom action named CA_BlockDirectInstall_GUIH_SKU_URT that is used to prevent users from installing by double-clicking on the MSI directly.  This custom action has the following complex condition statement in the InstallExecuteSequence table:

    ( NOT (ADDEPLOY = 1 OR USING_EXUIH = 1 OR USING_EXUIH_SILENT = 1 OR ADVERTISED = 1 OR ProductState >= 1) ) AND ( NOT (ADDEPLOY = 1 OR USING_EXUIH = 1 OR USING_EXUIH_SILENT = 1 OR ADVERTISED = 1 OR ProductState >= 1) )

    The ADVERTISED property will be automatically set if you create a Group Policy object to deploy the .NET Framework 2.0 MSI to a network by machine assignment.

     

  • Aaron Stebner's WebLog

    Digital Audio Service overlays on Media Center systems with AVerMedia tuners

    • 14 Comments

    We have found another possible root cause of Digital Audio Service overlays in Update Rollup 2 for Windows XP Media Center Edition 2005.  There are tuners manufactured by AVerMedia that are being shipped with certain types of Media Center systems that we are able to consistently reproduce Digital Audio Service errors with in our test lab.

    The Media Center systems we have seen so far that ship this brand of tuner are built by Shuttle but there may be others.  Unfortunately, this appears to be a driver issue with this particular tuner, and we are working with the manufacturers currently to try to help them resolve this issue and provide updated drivers.  In the meantime, the only workarounds that we know of are to uninstall Update Rollup 2 or to use an alternate program such as Windows Media Player to playback your recorded TV content.

    Note - if you are seeing Digital Audio Service overlays and your system does not have an AVerMedia tuner, you can find other Digital Audio Service troubleshooting suggestions at the following locations:

     

  • Aaron Stebner's WebLog

    How to build a managed assembly that contains Win32 resources using Visual Studio 2005

    • 12 Comments

    A few weeks ago, I started working on a sample Media Center add-in using the test builds of the February CTP version of the Media Center SDK.  During this process, I needed to figure out how to create a project in Visual Studio 2005 that could build Win32 resources and include them as part of a managed assembly.

    I struggled for a while as I looked through the documentation for Visual Studio 2005 and tried different scenarios.  Eventaully I asked a friend of mine who works on the MSBuild team and his advice along with a little further experimentation got me to a working solution.  Since I struggled for a while with this scenario, I decided to document it here as well in the hopes that it will save some effort on the part of anyone who searches for help about this topic later on.

    Here are the steps I followed to add Win32 resources to a managed assembly in Visual Studio 2005.

    1.  Create a .RC file to represent the resources

    If you know the syntax, you can create a .RC file directly in a text editor such as notepad.  You can also use Visual C++ and choose Add Resources to create a .RC file, or you can use an example from another application you have already created and modify it in notepad.

    2.  Compile the .RC file into a .RES file

    You can use resource compiler tool (named rc.exe) that is available in %ProgramFiles%\Microsoft Visual Studio 8\VC\Bin if you have Visual Studio 2005 installed to the default location.  The command line is rc.exe /r <path to the .RC file>.  This will create a .RES file with the same name as the .RC file in the same location as the .RC file.

    You can also configure your .csproj file to automatically compile the .RC file into a .RES file as a pre-build task.  In order to accomplish this, open the .csproj file in a text editor such as notepad, uncomment the section at the bottom of the .csproj file that includes the BeforeBuild target and author a target similar to the following as a BeforeBuild step:

    <Target Name="BeforeBuild" Inputs="my_resource_file.rc" Outputs="my_resource_file.res">
        <Exec Command="&quot;C:\Program Files\Microsoft Visual Studio 8\VC\bin\rc.exe&quot; /r my_resource_file.rc" />
    </Target>

    Note that this command line assumes that you have Visual Studio 2005 installed to the default location on your system.  You may need to adjust the command line as appropriate based on where rc.exe exists on your system.

    If you decide to manually edit your .csproj file, I suggest making a backup copy in case you run into syntax errors and need to revert to a known-good copy and start over.

    3.  Build your managed assembly with a reference to the .RES file included

    You can associate a .RES file to a Visual C# project in Visual Studio 2005 by right-clicking on the project in the Solution Explorer, choosing the Application tab, clicking the Resource File radio button and then specifying the .RES file in the text box.  The .RES file must already exist in order to specify it in the Visual Studio UI.

    Alternatively, you can open your .csproj file in a text editor such as notepad and add the following line to the <PropertyGroup> section at the top of the file:

    <Win32Resource>my_resource_file.res</Win32Resource>

    Visual Studio will pass the file listed in the <Win32Resource> tag to the C# compiler (csc.exe) using the /win32res:<file> command line parameter if it finds that tag in your .csproj file.

    Media Center-specific side notes if you're interested:

    • The February CTP version of Media Center supports loading resources using the Win32 res:// protocol but not the managed code resx:// protocol, which is why I needed to figure out this scenario in the first place
    • If you have the February CTP version of the Media Center SDK, you can look at the project located at %ProgramFiles%\Microsoft SDKs\Windows Media Center\v5.0\Samples\Mcml Samples\HelloMcml for a live, working example of the technique described above.  I used the steps listed above when I created that sample.

     

  • Aaron Stebner's WebLog

    Mailbag: How can I perform an unattended uninstall of the .NET Framework?

    • 11 Comments

    Question

    You have written blog posts in the past describing the command line parameters that can be used to install the .NET Framework in silent or unattended mode (here, herehere and here for example).  What are the command line parameters required to perform a silent or unattended uninstall of the .NET Framework?

    Answer

    The following command lines can be used to perform silent uninstall of the .NET Framework redistributable.  This is a fully automated uninstall with no visible UI and no user interaction required.

    • .NET Framework 1.0 - dotnetfx.exe /q:a /c:"install.exe /u /p Microsoft .NET Framework Full v1.0.3705 (1033) /q"
      Note - this command line varies depending on what language version of the .NET Framework 1.0 you have installed.  You will have to change 1033 to be the 4 digit language code of the language of the .NET Framework 1.0 you have installed
    • .NET Framework 1.1 - dotnetfx.exe /q:a /c:"install.exe /u /q"
    • .NET Framework 1.1 language pack - langpack.exe /q:a /c:"inst.exe /u /q"
    • .NET Framework 2.0 - dotnetfx.exe /q:a /c:"install.exe /u /q"
    • .NET Framework 2.0 language pack - langpack.exe /q:a /c:"install.exe /u /q"

    The following command lines can be used to perform unattended uninstall of the .NET Framework redistributable.  This is a fully automated uninstall with visible progress UI but no user interaction required.

    • .NET Framework 1.0 - Unattended mode was not supported in 1.0
    • .NET Framework 1.1 - dotnetfx.exe /q:a /c:"install.exe /u /qb"
    • .NET Framework 1.1 language pack - Unattended mode was not supported in 1.1 language packs
    • .NET Framework 2.0 - dotnetfx.exe /q:a /c:"install.exe /u /qb"
    • .NET Framework 2.0 language pack - langpack.exe /q:a /c:"install.exe /u /qb"

    The following command line can be used to perform silent uninstall of the .NET Framework SDK (the same command line will work for versions 1.0, 1.1 and 2.0):

    setup.exe /q:a /c:"install.exe /u /q"

    The following command line can be used to perform unattended uninstall of the .NET Framework SDK 1.1 and 2.0 (unattended mode was not supported in 1.0):

    setup.exe /q:a /c:"install.exe /u /qb"

     

  • Aaron Stebner's WebLog

    Getting started with Media Center development with the Windows Vista February CTP

    • 7 Comments

    The Windows Vista February 2006 community technology preview (CTP) is now available, and with it comes a version of the Media Center SDK that contains tools and samples that you can use to get started developing Media Center add-ins using the new Media Center Presentation Layer and Media Center Markup Language.

    You can check out these instructions that will walk you though the end to end process of downloading the Vista February CTP, the Media Center SDK February CTP, and installing and configuring both on your computer so you can start developing Media Center applications using this new technology.

    Also, Charlie Owen posted some details and screenshots of the tools and samples that I encourage you to take a look at.  Hopefully reading this will get you as excited as I am about the platform enhancements that will be available to developers in Media Center for Windows Vista.

     

  • Aaron Stebner's WebLog

    How to transfer guide data from one Media Center to another

    • 6 Comments

    Given the number of people that I have heard from who have been having trouble getting guide download functionality to work correctly with their ISP (particularly the Direcway satellite internet provider), I thought it might be useful to post some steps that can be used to transfer downloaded guide data from one Media Center PC to another.

    First, you will need to copy all of the values from the following registry hive from a machine that has downloaded guide data to the one you want to transfer it to:

    HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Media Center\Services\EPG

    This only needs to be done once, and can be achieved using the following steps:

    1. Click on the Start menu, choose Run and type regedit
    2. Navigate to HKEY_LOCAL_MACHINE, then Software, then Microsoft, then Windows, then CurrentVersion, then Media Center, then Services in the tree control
    3. Right-click on the EPG sub-key and choose Export
    4. Save the contents of this sub-key to a file with a .reg extension
    5. Copy the .reg file to the computer you want to transfer the data to
    6. Double-click on the .reg file and choose Yes to merge it into the registry on the second computer

    Note that the source computer and the destination computer must have the same directory structure and system drive (meaning the OS is installed on the same drive letter and the Documents and Settings and Windows folders are all in the same path on both computers, etc)

    After you have performed this one-time transfer of the registry settings listed above, you will need to perform the following additional steps each time you want to transfer the guide data to the destination computer:

    1. Close Media Center
    2. Click on the Start menu, choose Run and type cmd
    3. Type net stop ehsched
    4. Type net stop ehrecvr
    5. Look at the registry value named currentEPG in the above listed registry location to determine the full path to the guide database file
    6. Copy the file from the location listed in the currentEPG registry value from the source computer to the same folder location on the destination computer
    7. Restart Media Center

    Note that you will need to repeat this second set of steps at least once every 2 weeks if you want to continue to have valid guide data on the destination computer.

     

  • Aaron Stebner's WebLog

    Where to report tuning issues for HD channels in Media Center

    • 5 Comments

    I noticed a post on Matt Goyer's blog today that I wanted to post here as well to help improve discoverability.  Like him, I hear from customers via the contact form on my blog fairly frequently, and one of the common issues I hear is that one of the high-definition (HD or ATSC) channels that has been working correctly suddenly stopped tuning correctly on a user's Media Center.

    One of the folks on the TV team explained the underlying cause of most of these issues to me:

    Typically the reason this happens is that a broadcaster starts broadcasting on some other frequency, and Media Center no longer receives the signal. Media Center uses a tuning table that is supplied by our metadata provider (which they get directly from the FCC), to know which channels are broadcast on which frequencies.

    When broadcasters change frequencies (either because they switch from a test feed to a live production feed or for some other reason), Media Center has no way to know about it unless the FCC knows and updates the database that the metadata provider gets its data from. Media Center does not perform exhaustive channel scanning the way that a TV, or some other TV applications, do.

    There is a web page where you can report tuning issues like this - the Electronic Program Guide (EPG) issue submission form.  I encourage you to report issues that you see via this form as soon as you find them to help speed up the turnaround time for providing updated guide/channel data for your Media Center system.  If you send issues to me, I can try to help, but in most cases the information ends up going into this same submission form.

     

  • Aaron Stebner's WebLog

    How to fix a Document Explorer Unknown Error dialog box that appears when launching the Visual Studio IDE

    • 5 Comments

    I heard from a customer who received an error message while trying to install Visual Studio 2005.  The dialog box had the title Document Explorer and the text Unknown error.  The customer pressed OK and the dialog did not cause setup to fail.  However, the same error appeared again when attempting to launch the VS IDE, and pressing OK caused the IDE to exit and be unusable.

    It turns out this error can be caused by a product named Icon Packager being installed on the system.  The customer found this MSDN Forum post that described his scenario, and the workaround listed there fixed this error.  I wanted to post a link to it on my blog as well to hopefully make it easier for others to find it.

    The workaround is to do one of the following:

    1. Uninstall the Icon Packager product
    2. Unregister one of the Icon Packager DLLs by running regsvr32.exe /u iprepair.dll

     

  • Aaron Stebner's WebLog

    What controls the information that appears in Add/Remove Programs for installed programs

    • 4 Comments

    I stumbled across an interesting item posted a while back by Raymond Chen about the Add/Remove Programs control panel that I wanted to link to here.  He describes the algorithm used by the Add/Remove Programs control panel to populate some of the information for each installed application, including estimated size, last used date, frequency of use, etc.

    A related article on MSDN describes how Windows Installer will automatically populate some of the registry values used by Add/Remove Programs during installation of an MSI-based setup package.  One of the items that is notably absent from the list of entries that Windows Installer populates is the DisplayIcon.  This is why you will occasionally see applications in Add/Remove Programs with a completely unrelated icon next to the product name.

     

  • Aaron Stebner's WebLog

    Mailbag: Why does VS 2003 setup install the .NET Framework 1.1 if 2.0 is already installed?

    • 3 Comments

    Question

    I am running the Windows Vista December Community Technology Preview, which includes the .NET Framework 2.0 as part of the OS.  When I try to install Visual Studio .NET 2003 on this system, setup tries to install the .NET Framework 1.1 even though .NET 2.0 is already there.  Why?

    Answer

    Each version of the .NET Framework is designed to co-exist side-by-side with all other versions of the .NET Framework.  That means you can have the .NET Framework 1.0, 1.1 and 2.0 on your system at the same time.  In addition, each version of Visual Studio is tightly coupled with a specific version of the .NET Framework, and the setup for Visual Studio will always try to install the exact version it is coupled with if it is not already installed on the machine.  In this scenario, the system has the .NET Framework 2.0 installed but not 1.0 or 1.1.  Visual Studio .NET 2003 is coupled with .NET 1.1, so setup will install it.

     

  • Aaron Stebner's WebLog

    Media Center guide download and error code 13

    • 2 Comments

    I have gotten several comments in blog posts and emails from customers who have been running into error code 13 while trying to download television guide data in Media Center.  As a result, I decided to create an article that can serve as a central repository of all currently known information and suggested workarounds for this error.  You can find the new article that I created at this location.

    Unfortunately, this list of suggestions is all that I currently know of to try to troubleshoot this type of failure, and the log files that I have previously requested in earlier blog posts have not been helpful in identifying additional root causes.  As our team discovers new issues and workarounds, I will add them to the article.  I apologize for the inconvenience that this issue is causing you if you are running into it  :-(

     

  • Aaron Stebner's WebLog

    How to quickly create an MSI-based setup for a Media Center add-in

    • 2 Comments

    After spending some time reading Media Center SDK documentation regarding setup and deployment of Media Center add-ins, I decided to document a simpler way to create add-in setup packages (especially after reading this really scary list of 26 steps to create an MSI for an add-in in Visual Studio).

    Although it took longer than I was originally hoping due to other things I've been busy with, I am happy to say that I'm finished with phase one of this project, and as a result I posted an article tonight that describes how to use the WiX toolset to create an MSI-based setup package for a Media Center add-in.  You can find the article at this location

    This article includes a link to a sample WiX source file that you can use as a reference and as the basis for creating your own setup package.  I encourage you to take a look if you have attempted to deploy a Media Center add-in in the past or are planning on doing so in the future.

    I have spent some time looking through currently published Media Center add-ins available at the various add-in repositories on the internet.  It appears that the large majority of current add-ins take the form of hosted HTML applications - probably because the Media Center add-in is limited to only be able to display message boxes and cannot display other UI to the user within Media Center.

    The example that I outline in this article focuses how to create a setup package for a Media Center add-in as opposed to a hosted HTML application.  I will cover an example setup for a hosted HTML application in the near future.

    However, the setup for the example add-in described in the article will become much more useful in the Windows Vista version of Media Center because we are introducing the ability to create add-ins using Media Center Presentation Layer, which will allow for full access to the Media Center UI framework.  New Vista add-ins that use the Media Center Presentation Layer will be setup in a way that is essentially the same as current Media Center add-ins.  So, I think that makes this article a useful read even if you are planning to wait for Vista to start creating and deploying Media Center add-ins.

    As always, let me know if you have any comments or questions based on the information in the article.

     

  • Aaron Stebner's WebLog

    New tool - graphical UI to view fsnap output

    • 1 Comments

    I previously posted an article describing how to use the tool fsnap.exe to list all files installed in a specific path on a computer.  This tool can be useful in many scenarios, such as locating orphaned files left behind by Visual Studio 2005 beta build.

    Frank Dzaebel posted a comment on one of my blog posts this morning with a pointer to a tool he wrote that provides a graphical user interface front end to make the output generated by fsnap.exe easier to understand and sort.  The tool looks pretty nice, and he provides downloadable source code as well.  You can check out that tool at this location.

     

  • Aaron Stebner's WebLog

    Additional causes for 1308 or 1309 errors while installing Visual Studio

    • 1 Comments

    I previously posted a set of instructions that can be used to copy Visual Studio installation CD/DVD media to a local hard drive to try to eliminate 1308 and 1309 errors that can happen while installing Visual Studio.

    One of the customers who found that previous post found an additional known issue in the Visual Studio readme with another possible workaround that I had forgotten about when I posted that other blog item, so I wanted to provide a link to it here as well.  Ironically, I was the person who investigated that issue when it was originally reported during the VS .NET 2003 beta program, but I forgot to list the workaround as an option in my previous blog post.  :-)

    Visual Studio setup will show 1308 or 1309 error dialogs in 2 scenarios:

    1.  When attempting to install from a shared CD-ROM drive.

    In this scenario, you have 2 systems - one system with a CD-ROM drive that is shared out and that contains the Visual Studio installation CD, and another system that is connected to the shared drive that you launch setup on.

    You can start Visual Studio and start installing, but when setup gets to the point where it needs the first file from CD2, it will show a 1308 error dialog instead of a disk swap request dialog.

    In this scenario, you can go to the system where the CD-ROM is physically located, swap CD2 into the CD-ROM drive, and then go back to the system that you are installing Visual Studio on and press retry on the 1308 dialog and setup should proceed normally.  You will need to follow this procedure for each disk swap that is needed during the installation process.

    2.  When attempting to install from a system that has multiple CD-ROM drives where CD1 is in one drive and CD2 is in another drive

    In this scenario, you have a single system that has multiple CD-ROM (or DVD-ROM) drives installed, and you are attempting to install in a jukebox-like fashion.  Windows Installer has an issue that prevents it from supporting jukebox installations for a multi-CD setup.  This issue will appear if you have CD1 in one CD-ROM drive on a system and CD2 in a different CD-ROM on the same system.  Instead of showing a disk swap request dialog, it will show a 1308 error dialog.

    In this scenario, you can remove CD2 from the other CD-ROM drive, put it into the CD-ROM drive where CD1 is currently located, then press retry on the 1308 dialog nad setup should proceed normally.

     

  • Aaron Stebner's WebLog

    Why is there a RegisterMceApp.dll and a RegisterMceApp.exe?

    • 0 Comments

    One of the things I noticed when I first started looking into the Media Center SDK to try to build a Media Center add-in was that the SDK includes a file named RegisterMceApp.dll that is designed to be used in MSI-based setup packages that install Media Center add-ins.  I also noticed that the core Media Center product includes a file named RegisterMceApp.exe that we tell customers to use to register add-ins.  The natural question that came to my mind was - why do we have a DLL and an EXE that appear to do the same thing according to our own documentation.

    After talking to the developer who originally wrote RegisterMceApp.dll and looking at the source code, I found that RegisterMceApp.dll is essentially a DLL-based wrapper around the same API calls used in RegisterMceApp.exe.  There are 2 key behavioral differences in the DLL:

    1. The DLL uses MSI API calls to determine if the setup being run is a per-user or per-machine installation and runs the per-user or per-machine version of the RegisterMceApp APIs.  Because it uses MSI APIs, the DLL can only be run as a custom action inside an MSI-based setup and not via a stand-alone non-MSI process
    2. The DLL ignores the return codes received by the RegisterMceApp APIs and returns 0 in all cases.  I presume that this is done to avoid the problems presented when trying to use RegisterMceApp.exe in a setup package that I described in this blog post.

    The interesting thing about these behavioral differences is that they can be handled by using RegisterMceApp.exe and correctly authoring the logic in an MSI setup, which would eliminate the need to have a separate DLL.

    To address the first issue, you can author separate custom actions to run RegisterMceApp.exe in per-user mode and in per-machine mode and then condition them to check the ALLUSERS property and run at the appropriate times.

    To address the second issue, you can author a custom action to unregister the add-in prior to trying to register it.  This gives you the added benefit of being able to correctly fail and roll back your add-in setup if registration fails (which is impossible with the DLL because it always returns a success error code).

    Authoring the custom actions in the manner I describe above is relatively straightforward in general, but it doesn't appear to be easy to accomplish in the UI of a Visual Studio setup/deployment project.   I am working on an example MSI package using WiX to demonstrate how to create a well-behaving Media Center add-in, and I will be using the strategies that I describe above in that package.  Stay tuned for more info....

     

  • Aaron Stebner's WebLog

    Additional information about using ARPSYSTEMCOMPONENT in an MSI

    • 0 Comments

    By default, an MSI-based setup will appear in Add/Remove Programs when it is installed on a system.  The ARPSYSTEMCOMPONENT property can be used to hide the default Add/Remove Programs entry so that you can mark your MSI as a system component or create a separate entry that points to a wrapper setup.exe.

    There are several factors to weigh before deciding to use this property in an MSI-based setup.  A while back, I linked to a couple of blog posts written by Heath Stewart about design considerations to keep in mind if you decide to use the ARPSYSTEMCOMPONENT property in an MSI-based setup.

    I just noticed that Heath has posted a blog article where he links to several additional posts he has written about the ARPSYSTEMCOMPONENT property.  He covers topics including reasons for using this property, logistical considerations when implementing a setup that uses it, the dangers of using it, and some implications it has for patching/servicing.  I encourage you to check out this article if you are using or thinking of using this property in your MSI-based setup.

     

  • Aaron Stebner's WebLog

    Mailbag: Why is Visual Studio.NET Baseline installed on my system?

    • 0 Comments

    Question

    I ran an MSI inventory tool on my system and it showed an item named Visual Studio.NET Baseline - English installed.  I have Visual Studio .NET 2003 installed, but I cannot find this particular item in Add/Remove Programs.  What is this item for?

    Answer

    The Visual Studio.NET Baseline product is a small MSI-based setup package that is installed as part of the prerequisites in Visual Studio .NET 2002 and Visual Studio .NET 2003.  It appears in the list of prerequisites during VS 2002 and 2003 setup with the name Setup Runtime Files.

    This package originally installed files needed to display setup UI when we first started working on VS 2002.  Since then, the operating systems that VS will install on contain those files, so the final shipping version of this setup runtime files package installs some system-wide debugger components.  The same debugger components are included in the main vs_setup.msi, but we included them in the prerequisites in order to front-load reboots that could be caused by the debugger files being in use on the system.

    This package uses the ARPSYSTEMCOMPONENT property to install itself in such a way that it does not create an Add/Remove Programs entry, but it will appear when performing an MSI inventory on a system with VS 2002 or 2003 installed.

     

  • Aaron Stebner's WebLog

    Mailbag: How can I determine what beta products need to be removed before installing .NET Framework 2.0?

    • 0 Comments

    Question

    I noticed that the .NET Framework 2.0 is being offered on Windows Update the last time I checked for optional updates, so I tried to install it.  However, it failed with error code 4113.  I found your previous blog post with a list of error codes for the .NET Framework 2.0, and this error code means "Beta components have been detected on the machine that must be uninstalled before installation can proceed."

    I did have a previous beta of Visual Basic 2005 Express on my system, but I uninstalled it from Add/Remove Programs and I still get this error code when I try to install the .NET Framework 2.0 from Windows Update.  How can I figure out what needs to be uninstalled so I can proceed with installation of .NET 2.0?

    Answer

    Windows Update launches the .NET Framework 2.0 setup in silent mode, which suppresses all setup UI.  You can download and run .NET Framework 2.0 setup directly from this link and the setup UI will list the exact beta products that it has detected on your system that need to be removed before installation can proceed.

    Alsternatively, there is a log file created during .NET Framework 2.0 setup named %temp%\dd_netfx20ui*.txt (where * is a randomly generated ending).  That log file will contain a list of the beta products that need to be uninstalled.  Each product will be listed as a separate log string and will contain the phrase BETA CHECK: Found <product name>

     

  • Page 1 of 1 (20 items)