Aaron Stebner's WebLog

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

March, 2007

  • Aaron Stebner's WebLog

    Windows Installer PowerShell extensions project now available on CodePlex

    • 0 Comments

    Heath Stewart recently wrote a blog post at http://blogs.msdn.com/heaths/archive/2007/03/14/introducing-windows-installer-powershell-extensions.aspx that introduces a new project that he published on CodePlex - the Windows Installer PowerShell Extensions (also known as PSMSI) project.

    The initial version of this project, located at http://www.codeplex.com/psmsi, contains cmdlets that can be used within PowerShell to query product and patch information for installed MSI-based products.  I've talked to Heath about this project, and his longer term vision includes many additional cmdlets so that these extensions can be used for a variety of Windows Installer troubleshooting tasks.

    If you use PowerShell at all and/or are involved in setup development or troubleshooting, I encourage you to take a look at this project to see if you can use these extensions (and possibly contribute to enhancing them as well).

  • Aaron Stebner's WebLog

    New Windows Vista Media Center application - Showtime Interactive

    • 0 Comments

    As Niall and Ian noted in their blogs earlier this week, there is a new Windows Vista Media Center application available in the Explore tile of the Online Media strip (the area known as Online Spotlight in previous versions of Media Center).

    This application is built using Media Center Markup Language (MCML) and is a locally installed application (as opposed to a Media Center Presentation Layer web application).  This means that you have to download an installer and run it on your system before you can start using this application.  Also, the application is only available on systems in the United States.

    Here are a couple of links to more detailed information about this application if you are interested in learning more about it:

  • Aaron Stebner's WebLog

    How to manually reset Digital Rights Management (DRM) in Windows Vista

    • 5 Comments

    Question:

    I have a system with Windows Vista and have been using Media Center to watch DRM-protected content for a while.  Recently, I upgraded some hardware on my system, and now I can no longer view any DRM-protected content in Media Center.  After some web searches, I found one of your old blog posts that describes a similar type of error message in Update Rollup 2 for Windows XP Media Center Edition 2005.  However, that post and the knowledge base article it refers to appear to be specific to older versions of Windows.

    I have read that some types of hardware upgrades can cause DRM to stop working in Windows, and I suspect that is what is happening to me.  How can I reset DRM on my system so that I can view protected content inside of Windows Vista Media Center again?

    Answer:

    The knowledge base article linked in that old blog post (located at http://support.microsoft.com/?kbid=891664) contains information that is applicable to Windows Vista as well as older versions of Windows, but it does not specifically state that it applies to Windows Vista.

    According to this knowledge base article, you can reset DRM by deleting the files in the DRM folder on your system (but make sure to not delete the DRM folder itself because that can cause other problems on your system).

    The default location of the DRM folder in Windows Vista is c:\ProgramData\Microsoft\Windows\DRM, but it might not be in the same location on every system.  To reliably determine the location of the DRM folder on your system, you can look up the data in one of the following registry values:

    For 32-bit versions of Windows Vista:

    [HKEY_LOCAL_MACHINE\Software\Microsoft\DRM]
    DataPath

    For 64-bit versions of Windows Vista:

    [HKEY_LOCAL_MACHINE\Software\WOW6432Node\Microsoft\DRM]
    DataPath

    Note - the DataPath value is in binary format, so you will have to double-click on the DataPath value in regedit.exe and look at the right-hand column of the Edit Binary Value dialog box that appears to see the plain text version of the path.

  • Aaron Stebner's WebLog

    Mailbag: How to perform silent installs of Visual Studio hotfixes and service packs

    • 1 Comments

    Question:

    I am trying to create a script that will install Visual Studio 2005 SP1 in silent mode.  I haven't been able to find any official documentation about supported command line switches, so I downloaded the SP1 setup package and ran it with the /? switch to view the usage information.  Doing that displayed a dialog with the following information:

    The following options are provided in addition to the existing Windows(R) Installer command line options. For Windows Installer command line options, run "msiexec /help" to learn details.

        <update executable file name> [/Option] [Optional Parameter]
    Options
        </help | /h | /?>
            Display this usage dialog box.
        </extract> [<directory>][/q | /quiet]
            Extract the .msp package to the specified directory.
        </uninstall>
            Uninstall the patch from all applicable products.

    Consult Windows Installer SDK for additional documentation on the command line syntax: http://msdn.microsoft.com/library/

    I see a quiet switch listed here, but it appears to be an optional parameter associated with the extract switch.  How can I perform a silent install of Visual Studio 2005 SP1?

    Answer:

    The information in this usage dialog is a little bit misleading.  Visual Studio 2005 SP1 (and all Visual Studio and .NET Framework update packages) support installing in silent mode by passing in the /q or /quiet flag.  That flag is not only applicable for extraction.  It can be used for installation, extraction or uninstallation, depending on what combination of other switches is passed in along with /q or /quiet.

    Note: there is also a documented list of command line switches for Windows update packages at http://support.microsoft.com/kb/262841.  Visual Studio update packages do not use the same installation wrapper, but it does support some of the same switches in an effort to offer a consistent update deployment experience.

  • Aaron Stebner's WebLog

    How to repair the .NET Framework 2.0 and 3.0 on Windows Vista

    • 185 Comments

    NOTE - this blog post was originally written for the .NET Framework 2.0 and 3.0 on Windows Vista.  Since then, Windows 7 has shipped, and it includes the .NET Framework 2.0, 3.0 and 3.5 as OS components.  The steps in this blog post apply equally to Windows 7 as well. 

    Since the Windows Vista public launch in January 2007, I have been receiving questions about how to repair the .NET Framework 2.0 and 3.0 to try to resolve various bugs.  As I previously described here, the 2.0 and 3.0 versions are installed as OS components on Windows Vista and do not appear in the Programs and Features (formerly known as Add/Remove Programs) control panel.

    Many of the customers I have heard from have tried to use the .NET Framework cleanup tool, but it does not list the .NET Framework 2.0 as a valid removal option when it is run on Windows Vista.  This is by design - the cleanup tool does not offer the option to remove any version of the .NET Framework that is an OS component on the OS it is being run on.

    Windows Vista OS files and registry information (including those that are a part of the .NET Framework 2.0 and 3.0) are protected by Windows Resource Protection (WRP) in Windows Vista.  This means that only the OS installer service (named TrustedInstaller) has permission to modify/remove these files or registry keys unless you specifically take ownership of the files/keys and add additional user accounts to the access permission list (which you should not need to do except in extraordinary circumstances).

    If you run into problems using .NET Framework applications on Windows Vista, and you suspect that files or registry entries that are a part of the .NET Framework 2.0 or 3.0 are corrupt, you can use the instructions listed below to attempt to repair them.

    Repairing .NET Framework 2.0/3.0 files on Windows Vista

    You can use the following steps to repair the files that are a part of the .NET Framework 2.0 and 3.0 on Windows Vista and Windows Server 2008:

    1. Click on the Start menu, choose All Programs, then Accessories, then right-click on the Command Prompt item and select Run as administrator
    2. Click Continue to authorize opening a command prompt with administrative privileges
    3. Run this command in the cmd prompt: sfc /scannow
    4. The cmd prompt should list text stating "Beginning system scan. This process will take some time."
    5. Wait for the scan to complete (this can take several minutes so be patient).  This command will scan all protected system files and replace incorrect versions with correct Microsoft versions
    6. When the scan completes, the SFC tool will indicate whether or not it found any problems and whether or not it was able to fix them
    7. If any errors are reported that SFC was unable to fix, there are steps in this knowledge base article and this how-to guide that explain how to locate and attempt to fix the errors

    Repairing .NET Framework 2.0/3.0 registry entries on Windows Vista

    Unfortunately, there is not an easy way of repairing the registry keys/values that are installed by Windows Vista like there is for files.  If you want to try to repair the registry keys/values that are a part of the .NET Framework 2.0 and 3.0, you will need to run Windows Vista OS setup again and repair the OS.

    <update date="9/8/2008"> Added a link to a knowledge base article with instructions that can be used to fix errors reported by sfc.exe on Windows Vista and Windows Server 2008. </update>

    <update date="10/7/2008"> Clarified what SFC does behind the scenes in more detail. </update>

    <update date="8/9/2009"> Fixed broken link to knowledge base article in step 7. </update>

    <update date="3/10/2010"> Added a note about Windows 7. </update>

     

  • Aaron Stebner's WebLog

    Article about how to use McmlPad during UI development

    • 0 Comments

    Charlie Owen has posted an in-depth article over on the Media Center Sandbox site that I wanted to provide a link to here:

    http://blog.mediacentersandbox.com/UserInterfaceDevelopmentWithTheMCMLPreviewToolMCMLPad.aspx

    This article describes techniques for using the Media Center Markup Language Preview Tool (also known as McmlPad) during the MCML UI development process.  He discusses some of the key differences between how the standalone version of McmlPad behaves versus how the Media Center application host behaves (specifically - UI rendering, layout evaluation and page variables).

    In addition, he uses the Z sample application to provide a nice example about how to create a UI test harness for an MCML application and configure settings in Visual Studio 2005 projects so they will launch McmlPad when pressing F5 in the Visual Studio IDE.

    If you are developing a Windows Vista Media Center application using MCML, I encourage you to take a look at this article and download and try out the sample test harness Visual Studio project.

  • Aaron Stebner's WebLog

    MSDN community content sites now available in several languages

    • 0 Comments

    The online MSDN documentation library has introduced a feature called MSDN Community Content.  This feature provides the ability for anyone in the community to contribute to the content by providing supplemental information, correcting inaccurate or confusing steps, etc.  It is intended to be used in a way similar to traditional Wiki pages.

    The English version of MSDN has supported Community Content for a little while.  In the past week or so, the Chinese (Traditional), French, Italian, Japanese and Korean versions of MSDN Community Content have also gone public.

    Here are the links to all versions of MSDN that have Community Content enabled so far:

    If you are reading MSDN documentation in the future and have additional information to add, I encourage you to do so by using the Community Content section that appears at the bottom of many of the topics.

  • Aaron Stebner's WebLog

    Congratulations to Ian Dixon on his 100th episode of the Media Center Show

    • 1 Comments

    Yesterday, Ian Dixon posted his 100th episode of the Media Center Show.  You can view a summary transcript and download the episode from this blog post - http://iandixon.spaces.live.com/blog/cns!36983156CAA83EA9!1909.entry.  Ian's guest on this episode is Charlie Owen, and they spend some time talking about Media Center applications and developer tools.

    I also wanted to congratulate Ian on this milestone.  As he outlines in this blog post, a lot has happened since he started using and blogging about Media Center.  I've had the honor of being on his show twice now, and had a great time talking to him about various aspects of using and developing applications for Media Center.

    Here's to 100 more....

  • Aaron Stebner's WebLog

    Tenebril SpyCatcher can cause .NET Framework setup to hang

    • 1 Comments

    A little while back, I wrote a blog post describing an interaction issue between Visual Studio setup and the Tenebril SpyCatcher application.  Since then, I have heard from multiple customers who have experienced problems installing the .NET Framework that they have traced back to this same application.  As a result, I wanted to post a separate item that is specific to .NET Framework setup in the hopes that it will start appearing in web searches.

    If you run into an issue where the .NET Framework setup (1.0, 1.1 or 2.0) hangs while registering System.EnterpriseServices.dll, you could be running into an interaction caused by an over-aggressive anti-spyware application named Tenebril SpyCatcher.  If this happens to you and you have this application installed, I suggest trying the following steps:

    1. Uninstall Tenebril SpyCatcher
    2. Install the .NET Framework
    3. Re-install Tenebril SpyCatcher

    It is important to note that in the cases I've seen so far, closing or disabling Tenebril SpyCatcher is not enough to resolve this issue.  The customers I have talked to have had to fully uninstall Tenebril SpyCatcher in order to get the .NET Framework to install successfully.

    Please note also that there are several root causes of .NET Framework setup failures that occur while registering System.EnterpriseServices.dll.  If you do not have Tenebril SpyCatcher on your system, then this workaround will not help.  One of these other workarounds might help though, so I encourage you to look at them as well:

  • Aaron Stebner's WebLog

    MSDN Magazine article describing how to integrate WiX v2.0 with MSBuild

    • 0 Comments

    The March 2007 edition of MSDN Magazine contains an in-depth article describing how to use WiX v2.0 and MSBuild to integrate setup into the overall software development lifecycle.  You can find the article at this location:

    http://msdn.microsoft.com/msdnmag/issues/07/03/wixtricks/default.aspx

    This MSDN Magazine article is a nice complement to an older MSDN article that Rob Mensching wrote about how to use WiX to integrate setup into your development process.  The main differences are that Rob's article describes how to use NMAKE instead of MSBuild to automate the WiX build process, and Rob spends more time describing the importance of treating setup the same as other source code for a software project.

    If you are a setup developer or a developer on a team that produces MSI-based setup packages to deploy your code, I encourage you to take a look at both of these articles.

    One additional note that I wanted to mention here - WiX 3.0 has much more seamless MSBuild integration than what is described in this MSDN Magazine article courtesy of the Votive Visual Studio add-in.  I previously posted an article describing how to use Votive and WiX v3.0 and Votive to create MSI-based installers for Windows Media Center applicaitons, and the concepts described there can be adapted to all types of MSI-based installers with minimal effort.

  • Aaron Stebner's WebLog

    Updated sample code to detect the .NET Framework 3.0

    • 1 Comments

    I've received a few questions recently about how to programmatically detect whether or not the .NET Framework 3.0 is installed on a system.  As a result, I decided to update the sample code I previously published (here and here) to include logic to detect the .NET Framework 3.0 in addition to the previous logic for .NET 1.0, 1.1 and 2.0.

    Where to download the sample code

    You can find the updated sample code at the following locations:

    Detection logic used in the sample code

    The new code that I added to the above samples to check for the presence of the .NET Framework 3.0 searches for the following registry value (as described in the .NET Framework 3.0 deployment guide):

    [HKEY_LOCAL_MACHINE\Software\Microsoft\NET Framework Setup\NDP\v3.0\Setup]
    InstallSuccess=1

    Detecting pre-release builds of the .NET Framework 3.0

    However, we have seen some false positives if an application only searches for this registry value because this value is set in pre-release builds of the .NET Framework 3.0 in addition to the final release version.  In order to narrow down the detection even further and exclude pre-release builds, I added logic to the sample code that also looks at the following registry value:

    [HKEY_LOCAL_MACHINE\Software\Microsoft\NET Framework Setup\NDP\v3.0\Setup]
    Version

    This Version value contains REG_SZ data that represents a 4-part version string of the form #.#.#####.##.  The final release version of the .NET Framework 3.0 contains the following version value:

    • On Windows Vista - 3.0.04506.26
    • On downlevel operating systems - 3.0.04506.30

    The updated sample code contains a function named CheckNetfx30BuildNumber that contains the following logic:

    1. Attempt to read the Version registry value
    2. If the value is found, split the string into 4 parts using a period as a delimiter
    3. Convert each part of the string into integers
    4. Compare against the final release version number values
    5. If the value stored in the registry is greater than or equal to the final release version number, return true
    6. If any of the above fail, return false

    This additional version validation is not "officially" documented anywhere, but is useful to provide a safeguard if you would like to prevent your application from installing on a system that has a pre-release build of the .NET Framework 3.0 installed.

    As always, please let me know if you have any trouble building or running these samples or incorporating them into your product setup logic.

  • Aaron Stebner's WebLog

    New version of Media Center Cutter for Windows Vista announced

    • 0 Comments

    Niall Ginsbourg posted an item on his blog this weekend describing a new Media Center Markup Language (MCML) application for Windows Vista Media Center that was unveiled recently at the Cebit 2007 conference - Media Center Cutter.

    Olcay Buyan, a developer from MCEDev.com, has been working on this application, which allows you to edit DVR-MS files directly within Windows Vista Media Center using a storyboard-style visual editor.  In addition, Media Center Cutter includes several features that are above and beyond standard video editing functionality (from the list on Niall's blog post):

    • Automatically converts videos to other formats for use with portable devices such as Zune or iPod
    • Allows creating automatic conversion rules (for example - "always convert new series recordings to WMV format so I can watch them on my Zune")
    • Allows repositioning of segments within the final file
    • Automatically corrects, resets and updates pre and post-padding within the DVR-MS metadata
    • Automatically scans your Media Center recorded TV folders so you can quickly find recordings to edit
    • Retains all DVR-MS metadata added by Media Center so the information displayed in the Recorded TV gallery in Media Center will appear correctly

    You can check out more information about Media Center Cutter, including some example screenshots, in Niall's blog post at http://mobilewares.spaces.live.com/Blog/cns!78533A1A2E078194!340.entry.  Hopefully there will be a downloadable version of this tool available in the near future for folks to try out.

  • Aaron Stebner's WebLog

    How to repair Media Center files and registry entries on Windows Vista and Windows 7

    • 58 Comments

    Note - this post was originally written for Windows Vista, but it also applies to Windows 7.

    Since the Windows Vista public launch in January 2007, I have been receiving questions more frequently about how to repair Windows Media Center to try to resolve various bugs.  Many of the customers I have heard from have tried some of the repair steps I have previously posted for Windows XP Media Center Edition (such as this, this or this), but ran into problems getting them to work.

    I want to emphasize that OS repair techniques that I have previously documented for Windows XP Media Center Edition will not work on Windows Vista or Windows 7 and should not be used on these versions of Windows.  The underlying installation technology for OS components is completely new in Windows Vista, so install/repair techniques for Windows XP OS components will not continue to work on Windows Vista and higher.  Also, some of the registration utilities that shipped with previous versions of Media Center are not included in Windows Vista or higher because they are no longer needed.

    Windows Vista and Windows 7 Media Center files and registry information are protected by Windows Resource Protection (WRP) in Windows Vista.  This means that only the OS installer service (named TrustedInstaller) has permission to modify/remove these files or registry keys unless you specifically take ownership of the files/keys and add additional user accounts to the access permission list (which you should not need to do except in extraordinary circumstances).

    If you run into problems while using Windows Vista or Windows 7 Media Center and you suspect that files or registry entries that are a part of the Media Center feature are corrupt, you can use the instructions listed below to attempt to repair them.

    Repairing Windows Vista and Windows 7 Media Center files

    You can use the following steps to repair the files that are a part of Windows Vista Media Center:

    1. Click on the Start menu, choose All Programs, then Accessories, then right-click on the Command Prompt item and select Run as administrator
    2. Click Continue to authorize opening a command prompt with administrative privileges
    3. Run this command in the cmd prompt: sfc /scannow
    4. The cmd prompt should list text stating "Beginning system scan. This process will take some time."
    5. Wait for the scan to complete (this can take several minutes so be patient).  This command will scan all protected system files and attempt to replace incorrect versions with correct Microsoft versions
    6. When the scan completes, the SFC tool will indicate whether or not it found any problems and whether or not it was able to fix them
    7. If any errors are reported that SFC was unable to fix, there are steps in this knowledge base article and this how-to guide that explain how to locate and attempt to fix the errors 
    8. After fixing any errors that are found, try to use Windows Vista Media Center again

    Disabling and re-enabling Windows 7 Media Center

    You can use the following steps to disable and re-enable Windows Media Center on Windows 7.  These steps do not apply to Windows Vista.

    1. Click on the Start menu, type optionalfeatures.exe and press Enter to launch the Windows Features control panel
    2. In the Windows Features control panel, expand the item named Media Features
    3. Uncheck the items named Windows Media Center and Windows Media Player
    4. Click OK, wait for the process to finish, and reboot your computer
    5. Click on the Start menu, type optionalfeatures.exe and press Enter to launch the Windows Features control panel
    6. In the Windows Features control panel, expand the item named Media Features
    7. Check the items named Windows Media Center and Windows Media Player
    8. Click OK, wait for the process to finish, and reboot your computer

    Repairing Windows Vista and Windows 7 Media Center registry entries

    Unfortunately, there is not an easy way of repairing the registry keys/values that are installed by Windows Vista and higher like there is for files.  If you want to try to repair the registry keys/values that are a part of Windows Vista and Windows 7 Media Center, you will need to run Windows setup again and repair the OS.

    <update date="10/7/2008"> Added a link to a knowledge base article about SFC and how to find errors that it reports during its repair process. </update>

    <update date="8/17/2009"> Fixed broken link to knowledge base article. </update>

    <update date="2/24/2011"> Added a note about how to disable and re-enable Windows Media Center on Windows 7. </update>

    <update date="2/25/2011"> Updated the note I added yesterday to also include Windows Media Player. </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

    What can happen when advertising COM information in an MSI

    • 0 Comments

    A long time ago (January 2005 to be exact), I wrote a blog post describing a Windows Installer resiliency repair scenario that we used to see in some old daily builds of Visual Studio 2005.  In that post, I recommended not using the Class or ProgId tables for COM registration and instead using Registry table authoring.  However, I had a hard time defending that recommendation because I didn't have a lot of knowledge about those tables at the time.

    Yesterday, I noticed that Rob Mensching posted a really nice explanation on his blog (including example MSIs) to demonstrate interaction issues and resiliency repairs that can be triggered by advertising COM information in an MSI using the Class and ProgId tables.

    I personally agree with Rob's recommendation, but I also understand there are certain scenarios where it might make sense for a setup developer to do this.  I strongly encourage anyone using or thinking of using COM advertisement in an MSI via the Class and ProgId tables to read Rob's blog post in order to get a better understanding of the ramifications of doing this and then weigh the trade-offs of these setup design options.

  • Aaron Stebner's WebLog

    Links to more detailed information about using the VC runtime files in VS 2005 SP1

    • 0 Comments

    I have previously posted a few items about deploying the Visual C++ 8.0 runtime redistributable packages as a prerequisite for other setup packages:

    Since then, I have started to get more in-depth questions about how the Visual Studio 2005 SP1 version of the VC runtime files affects application building and deployment.  Most of these questions have been specific to how the VC runtime files themselves manage forward and backwards compatiblity and I don't have very much knowledge about how this works behind the scenes.

    Fortunately, Nikola Dudar, a program manager on the VC team, recently sent me some really helpful links with more information about how Visual Studio 2005 SP1 impacts application development and deplopyment scenarios when the application in question depends on the VC runtime files.  If you are a developer building and deploying applications that use the VC 8.0 runtime files, and you are evaluating Visual Studio 2005 SP1 for your development environment, I strongly encourage you to review the content in both of these links in order to better understand the ramifications of putting SP1 on your build machine:

  • Aaron Stebner's WebLog

    New Media Center applications - MCEMailbox, MAMECenter and Harmony 2007

    • 1 Comments

    Recently, I've come across a few blog posts announcing new Windows Vista Media Center applications.  All of the applications below are written in Media Center Markup Language (MCML), and it is exciting to see the new Media Center platform features in Windows Vista start to gain some momentum.  I wanted to post links here so you can take a look if you're interested in learning more.  Also, if you're interested in getting started creating your own Media Center application, I encourage you to check out the Windows Media Center SDK for Windows Vista.

    MCEMailbox

    I found a post on Ian Dixon's blog with links and screenshots for MCEMailbox.  This application is written in MCML for Windows Vista Media Center that allows users to check POP3 and secure POP3 email boxes, and be notified inside of Media Center when new mail arrives.  Here are some links to more information about MCEMailbox:

    Anthony Park, the developer of MCEMailbox (and also the developer of MCEBrowser) is scheduled to appear on an upcoming episode of the Media Center Show, so make sure to keep an eye out for that.

    MAMECenter

    Steven Harding posted the following blog post about a week ago:  http://thedigitallifestyle.com/cs/blogs/developer/archive/2007/03/06/just-to-prove-i-m-not-completely-full-of-it.aspx.  In it, he introduces an alpha version of a Multi Arcade Machine Emulator (MAME) application for Windows Vista Media Center that he has been working on.

    The application, named MAMECenter, is written in Media Center Markup Langauge (MCML), and a downloadable MSI and some screenshots are available via the blog post.  I tried it out on my system and the UI launched but a list of games never appeared.  However, this appears to be because I don't have any ROMs downloaded to the folder that the MAME application is looking for them at.  I've also heard from a couple of other people who tried it out and were able to successfully use it within Media Center. 

    Harmony 2007

    Domia has been working on a new Media Center interface in MCML for their Harmony home automation software.  They have posted a video of a beta version of Harmony 2007 in the blog post at http://www.domia.eu/blog/PermaLink,guid,2752d05b-0f02-4b8b-a75b-a0cfeec5f176.aspx.  The beta program for this application is already closed because of the large number of subscribers, but the video is really impressive so hopefully there will be a future version that is available for more folks to try out.

    <update date="3/18/2007"> Updated the information about MAMECenter.  After talking to Steven Harding, I realized I didn't know enough about how the MAME application actually worked behind the scenes.  The reason I wasn't seeing any ROMs in MAMECenter inside of Media Center is that I needed to manually download some ROMs and copy them to the MAME folder on my system. </update>

     

  • Aaron Stebner's WebLog

    Visual Studio 2005 IDE tips and tricks article

    • 0 Comments

    I recently found an article on MSDN written by James Lau, a program manager who works on the core Visual Studio IDE.  The article lists some cool tips and tricks that are not as widely known that can help boost developer productivity in the Visual Studio IDE.

    You can check out the article on MSDN at http://msdn2.microsoft.com/en-us/library/bb245788(vs.80).aspx.  It includes the following topics:

    • Visual Studio keyboard shortcuts - commonly used shortcuts; sample code to list all possible shortcuts; how to customize keyboard shortcuts; how to export/import keyboard shortcut settings
    • Using the window layout selector
    • Creating and using code snippets
    • Customizing the Visual Studio start page
    • Using team development settings
    • The devenv.exe /resetuserdata command line switch

    Even if you've used Visual Studio 2005 extensively, I'd suggest taking a look at the article to see if there is anything useful for your scenarios.  I found a couple of tips in there when I read the article this past weekend that I've already started using to improve my own productivity.

  • Aaron Stebner's WebLog

    Another workaround for Visual Studio Common IDE Package load failures in Visual Studio 2005

    • 0 Comments

    I recently heard from a customer who was running into a Visual Studio Common IDE Package load failure error in Visual Studio 2005.  They tried all of the steps listed in my blog post about how to resolve package load failures caused by previous beta versions of Visual Studio 2005 but did not have any luck.  The customer reported that they found a solution to this problem in the following 2 posts on the MSDN Forums:

    I took a look back at the setup for a few of the beta versions of Visual Studio 2005 and the data files for the cleanup tool that I posted in my blog post and found that there were a couple of problematic registry values that the cleanup tool did not remove.  I wanted to post instructions describing how to manually remove these problematic registry values in case anyone else runs into a similar issue:

    1. Close Visual Studio 2005
    2. Click on the Start menu, choose Run, type cmd and click OK
    3. Run the following command in the cmd prompt: reg delete "HKLM\SOFTWARE\Microsoft\MSDN\8.0\Packages\{6E87CFAD-6C05-4adf-9CD7-3B7943875B7C}" /v CodeBase /f
    4. Run the following command in the cmd prompt: reg delete "HKLM\SOFTWARE\Microsoft\MSDN\8.0\Packages\{6E87CFAD-6C05-4adf-9CD7-3B7943875B7C}\SatelliteDll" /f
    5. Restart Visual Studio 2005

    Note: if running the above steps on Windows Vista, you will need to use an elevated cmd prompt.  You can open an elevated cmd prompt on Windows Vista by clicking on the Start menu, choosing All Programs, then Accessories, then right-clicking on the Command Prompt item and choosing Run as administrator.

    I have also updated the version of the Visual Studio 2005 beta cleanup tool on my file server to include steps to remove the above registry values as well.

    Please note that the above issue only affects systems that previously had a beta version of VS 2005 installed.  The registry values listed above are not created by the final version of VS 2005, so unless a beta version was installed at some point in the past, there is no way for those registry values to be created on your system.

  • Aaron Stebner's WebLog

    Creating an administrative install point for the .NET Framework 2.0 on Windows Vista

    • 0 Comments

    I previously posted a set of instructions for creating an administrative install point for the .NET Framework 2.0 using the install.exe external UI handler.  I recently heard from a customer who attempted to use these instructions on Windows Vista and received an error message stating "This product is already installed as part of the operating system."

    I looked into this in more detail and found that some of the prerequisite conditions in the external UI handler are being evaluated in administrator mode and incorrectly blocking this scenario on Windows Vista.  The .NET Framework 2.0 MSI-based setup does not allow installing on Windows Vista because the .NET Framework 2.0 is a part of the OS on Windows Vista.  However, you should be able to create an administrative install point on Windows Vista as long as you plan to only install from that install point on other operating systems.

    Here are an updated set of instructions that will allow you to create an administrative install point for the .NET Framework 2.0 on any operating system that has Windows Installer 2.0 or later installed:

    1. Download the .NET Framework 2.0 redistributable package from http://msdn2.microsoft.com/en-us/netframework/aa731542.aspx
    2. Click on the Start menu, choose Run, type cmd and click OK
    3. Run the following command to create an administrative install point for the .NET Framework 2.0:  dotnetfx.exe /c:"msiexec /a netfx.msi TARGETDIR=<path>"

    Note - the <path> value in the command above should be set to the exact path that you want to stage the administrative install point to.

  • Aaron Stebner's WebLog

    Final version of the Visual Studio 2005 SP1 update for Windows Vista now available

    • 1 Comments

    I noticed this afternoon that the final release of the Visual Studio 2005 SP1 update for Windows Vista has been released on the Microsoft Download Center.  You can find more information at these locations:

    If you had the beta version of the SP1 update for Windows Vista, you will need to remove it first.  You will also need to make sure that you have install VS 2005 SP1 on your Windows Vista before installing this SP1 update package.

    One other note - installing this SP1 update will finally cause all of the compatibility dialogs that I previously blogged about (here and here) to go away on Windows Vista.

  • Aaron Stebner's WebLog

    Beta version a new MCML web application is now available for download - MCStart

    • 0 Comments

    I noticed a post on the Big Screen Blog over the past weekend about a beta version of a new Windows Vista Media Center application that is now available for download.  The application is an updated version of MCStart, a program that can be used to browse events and attractions that has previously been available as an HTML application for Windows XP Media Center Edition 2005.  The Windows Vista version is written in Media Center Markup Language (MCML) and is a web application.  You can find more information about this application at the following locations:

    I downloaded the installer and took a look, and it is built using WiX v2.0.  Also, it appears to be modeled after the sample setup packages for the Q and Z applicatoins that are included in the Windows Media Center SDK for Windows Vista.  I'm happy to see that folks are finding these samples useful.

    Another interesting thing I noticed about the installer is that because it is a MCML web application, the XML registration file included in the installer contains the URL to the application.  This allows you to be able to try out the application without installing it by using McmlPad (if you have the Windows Vista Media Center SDK installed).  To do that, simply browse to the URL http://www.mcstart.nl/vista/index.php.

    Note that there is some functionality that will not work within McmlPad.  Specifically, there is a button that appears to allow you to return to Media Center (but I am not sure because I don't speak Dutch).  However, clicking on that button causes McmlPad to crash because McmlPad does not instantiate a page stack for the application like Media Center does when you directly register and launch the application.

    Finally, I wanted to mention something about this application that is probably only interesting to setup developers.  The setup UI is built using the WiX UI dialog sets, and it is translated entirely into Dutch.  WiX v2.0 contains full translations of the setup UI dialog sets in English, German, Spanish, Hungarian and Dutch, which makes it easy to create non-English MSI-based setup packages in these languages.  You simply need to pass in the WXL file for the language you would like to use to light.exe using the -loc command line parameter when you link your MSI.  You can look at the build scripts named build_q.bat or build_z.bat in the Windows Vista Media Center SDK for example syntax for English and make corresponding changes to create MSIs with setup UI in these non-English languages.

  • Aaron Stebner's WebLog

    Links to Windows Vista global development information

    • 3 Comments

    Back in January, I wrote a blog post with links to information about the multi-lingual user interface features available in Windows Vista.  Since then, some additional information has been published about developing world-wide applications for Windows Vista, and I wanted to post those links as well:

    I encourage you to take a look at the information in the above links if you are developing applications for Windows Vista.  Even if you are not specifically targeting Windows Vista, I encourage you to keep global development in mind while designing and building Windows applications.

  • Aaron Stebner's WebLog

    How to NGEN files in an MSI-based setup package using WiX

    • 6 Comments

    As described in this blog post, a set of custom actions was added to the WiX toolset last year to make it easy to create native images for managed assemblies in an MSI-based setup using the .NET Framework 2.0 version of NGEN.exe.  Native images are created to improve the performance of managed applications, and some of the details about the benefits they provide can be found in this MSDN Magazine article.

    Prior to these WiX custom actions, it was relatively difficult and error prone to add NGEN to an MSI-based setup, but it is simple and straightforward now.  I wanted to demonstrate just how easy it is to use the WiX NGEN custom actions to encourage setup developers to use WiX and the NGEN custom actions for managed assemblies.

    For this demonstratation, I'm going to modify the sample WiX files for the Q sample application that is shipped in the Windows Media Center SDK for Windows Vista.  I'm going to use the WiX v3.0 files that I introduced in this blog post as the basis for adding NGEN functionality.  Please note that the NGEN custom actions exist in both WiX v2.0 and WiX v3.0 so you are not limited to using WiX v3.0 in this scenario even though that is what I chose to demonstrate.

    How to add NGEN custom actions to a WiX-based setup project

    At a high level, you must make the following changes to your WiX project in order to add NGEN custom actions to an MSI built with WiX:

    1. Add a reference to the extension named WixNetFxExtension.dll, either by adding it to the References list in the Votive Visual Studio add-in or by passing it to candle.exe and light.exe directly using the -ext command line argument
    2. Add an XML namespace declaration that refers to the WiX NetFxExtension.  For example: xmlns:netfx="http://schemas.microsoft.com/wix/NetFxExtension"
    3. Add NativeImage elements as children of any files that you want to create native images for using NGEN.exe.  For example:  <netfx:NativeImage Id="q.dll" Platform="32bit" Priority="1"/>

    WiX NativeImage configuration options

    I created an updated set of WiX source files that include custom actions to run NGEN for Q.dll and Interop.Microsoft.Feeds.Interop.dll, and you can download them from this location - http://play.mediacentersandbox.com/tools/qsetup_wixv3_with_ngen.zip

    This example includes only 32-bit NGEN, so you will need to update the Platform attribute if you want to create a 64-bit installer.  Also, this example performs synchronous NGEN by setting the Priority attribute to 1.  This will cause setup to wait for each native image to be generated before continuing with installation.  It is possible to change the Priority value to 3 to schedule an NGEN action to occur in the background using the NGEN service after setup completes.  This will speed up installation performance, but the native images will be compiled at some later point by the NGEN service on the system, which means that the native images may not be present the first time a user launches your application after installing it.

    You can find full documentation about the attributes that can be set for NativeImage elements in the WiX documentation (wix.chm that is installed as part of the WiX toolset) or by using IntelliSense within the Visual Studio IDE after installing the WiX toolset.

    The steps below will allow you to create an MSI for the Q sample application that includes NGEN functionality for the managed assemblies that are installed as a part of Q setup.

    Building an MSI for Q that contains NGEN functionality by calling WiX tools directly

    1. Install Windows Vista Home Premium or Ultimate Edition
    2. Install Visual C# 2005 Express Edition or Visual Studio 2005 standard or higher
    3. Install the Windows Media Center SDK for Windows Vista
    4. Install the latest version of WiX 3.0 from http://sourceforge.net/project/showfiles.php?group_id=105970&package_id=168888. You need to install the ProjectAggregator2 MSI and then the WiX 3.0 MSI
    5. Download this zip file with updated Q setup files and extract the contents to the Q project directory. The Q project will be installed to %programfiles%\Microsoft SDKs\Windows Media Center\v5.0\Samples\Windows Media Center Presentation Layer Samples\Q if you installed the Windows Media Center SDK to the default location
    6. Right-click on the shortcut for Visual Studio 2005 or Visual C# 2005 Express Edition, choose Run as administrator and click Continue to launch Visual Studio with elevated privileges
    7. Open Q.sln - it will be installed to %programfiles%\Microsoft SDKs\Windows Media Center\v5.0\Samples\Windows Media Center Presentation Layer Samples\Q if you installed the Windows Media Center SDK to the default location
    8. Right-click on the Q project in the Solution Explorer and choose Properties
    9. Select the Build Events tab
    10. Add a new entry to the Post-build event command line text box that says "$(ProjectDir)\SetupWiXv3\build_q.bat" $(ConfigurationName)
    11. Click on the File menu and choose Save All
    12. Click on the Build menu and choose Rebuild Solution to build the Q binaries and then run build_q.bat

    The above steps will produce an MSI named Q_Podcast_Client.msi that includes NGEN custom actions in %programfiles%\Microsoft SDKs\Windows Media Center\v5.0\Samples\Windows Media Center Presentation Layer Samples\Q\bin\release (or \bin\debug\ for the Debug version of the Q application).

    Building an MSI for Q that contains NGEN functionality using Votive

    The following steps can be used to build an MSI for the Q sample application directly from Visual Studio 2005 using the Votive WiX add-in:

    1. Install Windows Vista Home Premium or Ultimate Edition
    2. Install Visual Studio 2005 standard or higher
    3. Install the Windows Media Center SDK for Windows Vista
    4. Install the latest version of WiX 3.0 from http://sourceforge.net/project/showfiles.php?group_id=105970&package_id=168888. You need to install the ProjectAggregator2 MSI and then the WiX 3.0 MSI
    5. Download this zip file with updated Q setup files and extract the contents to the Q project directory. The Q project will be installed to %programfiles%\Microsoft SDKs\Windows Media Center\v5.0\Samples\Windows Media Center Presentation Layer Samples\Q if you installed the Windows Media Center SDK to the default location
    6. Right-click on the shortcut for Visual Studio 2005, choose Run as administrator and click Continue to launch Visual Studio with elevated privileges
    7. Open QWiXv3.sln - it will be installed to %programfiles%\Microsoft SDKs\Windows Media Center\v5.0\Samples\Windows Media Center Presentation Layer Samples\Q if you installed the Windows Media Center SDK to the default location
    8. In the Visual Studio Build menu, choose Batch Build...
    9. Select the configurations you want to build and click the Rebuild button to build them

    The above steps will produce an MSI named Q_Podcast_Client.msi that includes NGEN custom actions in %programfiles%\Microsoft SDKs\Windows Media Center\v5.0\Samples\Windows Media Center Presentation Layer Samples\Q\QWiXv3\bin\release (or \bin\debug\ for the Debug version of the Q application).

  • Aaron Stebner's WebLog

    Mailbag: How can I create a loading page for an MCML application?

    • 0 Comments

    Question:

    I am building a Windows Media Center application for Windows Vista using Media Center Markup Language (MCML).  My application performs some initialization tasks that are somewhat time intensive, so I would like to display a page with a loading animation so the user will know that something is happening behind the scenes.  Once the application initialization is complete, I would like to navigate to the main page for my application.

    Is it possible to architect my MCML application so that it has a loading page to give the user a sense of progress, then navigates to a new page when loading is complete?  Also, is it possible to prevent Media Center from showing the loading page if the user presses back from the main application page?

    Answer:

    The HistoryOrientedPageSession class is derived from the PageSession class.  The PageSession class contains a LoadPage method that can be used to display a page that will not be added to the Media Center back stack.  The LoadPage method is protected, so you cannot instantiate a HistoryOrientedPageSession object and call LoadPage directly.

    However, you can create a sub-class of HistoryOrientedPageSession and then call LoadPage from your sub-class.  This will allow your application to navigate to a page that will not appear on the back stack and then transition to another page that will appear on the back stack.

    In addition, you can create a property in your application code and fire a property change event when your application initialization is complete.  Then you can add a Rule to your MCML page that listens for this property change event and navigates to the main page of your application.

    The Q podcast application included as a sample in the Windows Media Center SDK for Windows Vista demonstrates how to implement all of the above logic.  It contains a loading page that does not re-appear when the user presses back within Media Center, and it fires a property change event and uses a rule to navigate to the main application page after loading is complete.

    If you have the Media Center SDK installed to the default path, you can take a look at the following files to look at the exact implementation details:

    • QAddIn.cs (located at C:\Program Files\Microsoft SDKs\Windows Media Center\v5.0\Samples\Windows Media Center Presentation Layer Samples\Q) - this file contains a class named QAddInPageSession that sub-classes HistoryOrientedPageSession and implements the LoadPage method to load the MCML file named Loading.mcml that is embedded into the Q application DLL as a managed resource
    • FeedLoader.cs (located at C:\Program Files\Microsoft SDKs\Windows Media Center\v5.0\Samples\Windows Media Center Presentation Layer Samples\Q\Code\RssFeedHandling) - this file fires an IsComplete property change that the MCML markup in the application has a rule to react to in order to navigate to the main page of the application (Q.mcml)
    • Loading.mcml (located at C:\Program Files\Microsoft SDKs\Windows Media Center\v5.0\Samples\Windows Media Center Presentation Layer Samples\Q\Markup) - this file contains the MCML markup to display a loading page and wait for the IsComplete property change to be fired by the application.  Once the property change is fired, the loading page uses a Navigate element to navigate to the main page of the application

    It is important to note that the algorithm described above only works for locally installed MCML applications.  Windows Media Center web applications do not have any locally installed code, so it is not possible to sub-class HistoryOrientedPageSession and fire property changes as described above.

    It is possible to dynamically change the Source property on a Host view item in your markup file (similar to what is demonstrated in the AdvancedMarkup.HostViewItem.mcml sample in McmlSampler in the SDK) to create a loading page in an MCML web application that will navigate to the main page of the application.  However, doing this will cause the loading page to be placed on the back stack.  This means that the loading page will re-appear when pressing back after your application navigates to the main page.

Page 1 of 1 (25 items)