Aaron Stebner's WebLog

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

February, 2007

  • Aaron Stebner's WebLog

    Final version of Microsoft Application Compatibility Toolkit (ACT) v5.0 available for download

    • 2 Comments

    A while back, I posted a set of instructions that can be used to suppress application compatibility warning dialogs that can appear when installing and/or running Visual Studio 2005 and SQL Server 2005 on Windows Vista.  Those instructions referenced a beta version of the Microsoft Application Compatibility Toolkit (ACT) v5.0.

    I just noticed that the final version of ACT v5.0 has been released.  The following links contain more information about what you can do with ACT v5.0 and where you can download it from:

    To summarize the above links, ACT v5.0 includes inventory and test tools and documentation to evaluate and mitigate application compatibility issues before deploying Microsoft Windows Vista, updates from Windows Update, or a new version of Internet Explorer on your systems.  I encourage you to check out this toolkit if you are evaluating Windows Vista and/or want to assess the readiness of your applications for new versions of Windows or Internet Explorer.

  • Aaron Stebner's WebLog

    Do not use ThumbnailURL when registering a Windows Vista Media Center application

    • 2 Comments

    I recently received a question from a friend of mine who is developing a Windows Vista Media Center application.  He was registering the application so that it would appear in the Start menu, but was running into a problem getting the application tile's thumbnail image to display correctly.  Instead of displaying the image that he specified in his registration XML file, it displayed a blank blue square.

    After reviewing the documentation included in the Windows Media Center SDK for Windows Vista and experimenting with a couple of scenarios, he found that this issue was caused by using the deprecated thumbnailUrl attribute instead of the imageUrl attribute in the entry point in his registration XML file.

    Unfortunately, he was using the Windows games that are included in Windows Vista Media Center as an example when creating his registration XML file.  These games all use the thumbnailUrl attribute instead of the imageUrl, as you can see if you look at an example of the chess game in the following location in the registry on a Windows Vista Home Premium or Ultimate system:

    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Media Center\Extensibility\Entry Points\{115EADF1-41C4-471b-8FE5-7A52B91BFE75}]
    ThumbnailUrl=%ProgramFiles%\Microsoft Games\Chess\ChessMCE.png

    Because of this use of the ThumbnailUrl value, you will see a blank application tile in the Start menu for these games by doing the following:

    • Launch Windows Vista Media Center
    • In the Online Media strip, select Program Library
    • Right-click on one of the games and select Add to Start Menu
    • Click Yes to confirm that you want to add it to the start menu
    • Return to the Media Center start menu and look at the tile created for the game

    For more information about options for configuring images for custom start menu tiles in Windows Vista Media Center, please refer to this blog post as well as the Windows Media Center SDK documentation.

     

  • Aaron Stebner's WebLog

    Mailbag: Can I update Visual Studio 2005 setup to install SQL Express 2005 SP2?

    • 2 Comments

    Question:

    I have been running silent installations of Visual Studio 2005 on Windows XP and Windows Server 2003.  However, I have been having trouble on Windows Vista.  I get application compatibility warning dialogs during Visual Studio 2005 setup when installing on Windows Vista.  One of those warnings is caused by the version of SQL Express that is chained in as a part of Visual Studio 2005 setup.  In order to workaround this issue, I have been setting the registry keys that you listed in this blog post prior to running VS 2005 silent install.

    I would like to avoid setting registry keys like this during my deployment process.  I saw a post on the SQL Server Express team blog announcing that SQL Express 2005 SP2 is now available for download.  This version of SQL Express has resolved the application compatibility issues and does not display any unwanted dialogs when I install it and run it on Windows Vista.

    Is it possible to update Visual Studio 2005 setup so that it will install the new SQL Express 2005 SP2 instead of the older version that originally shipped with it?

    Answer:

    Yes, you can replace the copy of SQL Express 2005 setup that is included in your Visual Studio 2005 install point and cause Visual Studio 2005 setup to install it instead.  The SQL Express setup package can be found in the \WCU\SSE folder in your Visual Studio install point.

    The command line parameters that Visual Studio setup uses to install SQL Express and the detection method it uses to determine whether or not it needs to install it and whether or not installation is successful both work correctly with the original release of SQL Express 2005 and with SQL Express 2005 SP2.

    One note regarding the Visual Studio 2005 Express Editions - if you use the web downloader to install the Visual Studio 2005 Express Editions, they contain a link in one of the setup data files that automatically downloads the original version of SQL Express 2005 during setup.  In order to swap in SQL Express 2005 SP2 in the Visual Studio 2005 Express Edition setup process, you will need to first create an installable layout by downloading the packages using steps like the ones that I previously posted in this article.

  • Aaron Stebner's WebLog

    Windows XP Embedded SP1 support ends on April 10, 2007

    • 0 Comments

    I noticed a post this morning on the Windows XP Embedded team blog that I wanted to link to here to make sure everyone notices so this issue won't catch you by surprise.  Official support from Microsoft for Windows XP Embedded SP1 is scheduled to end on April 10, 2007.

    You can find more information about this at the following locations:

  • Aaron Stebner's WebLog

    Windows Vista Media Center WebGuide sidebar gadget available for download

    • 2 Comments

    I came across an interesting post on Ian Dixon's blog a couple of days ago.  He reported that the developer of the WebGuide 4 application for Windows Media Center has just announced a Windows Vista sidebar gadget that can be used to access WebGuide functionality (such as viewing guide data, recorded show information, and scheduled recording information, schedule new recordings, access local and remote Media Center recording information).  Today, I noticed a new post from Ian indicating that the WebGuide sidebar gadget is now available for download.

    You can find more information about the features and a link to download this sidebar gadget at http://www.asciiexpress.com/webguide/VistaSidebarGadget/tabid/77/Default.aspx.

  • Aaron Stebner's WebLog

    Windows Vista Media Center MCMLookalike project now has downloadable source code and markup

    • 0 Comments

    I previoulsly posted an introduction to a new open source Media Center Markup Language (MCML) user interface widget library started by Steven Harding that is called MCMLookalike.  I found via Niall's blog and Ian's blog that the first downloadable code package is now available on the SourceForge project site for MCMLookalike at https://sourceforge.net/projects/mcmlookalike.

    I am really excited to see an effort like this getting started in the community.  One of the things that we did not have enough time for when creating the Windows Media Center SDK for Windows Vista was building up a library of reusable controls for developers to use in their applications.  The MCMLookalike project aims to fill this type of void so that developers can focus more of their effort on fine-tuning the UI and building really nice functional experiences instead of needing to implement a set of building block UI controls before they can get started with their unique experiences.

    If you haven't already, I encourage you to download the MCMLookalike project and take a look at the source code and markup (and contribute back new code/markup when you're able to).  The project includes not only MCML files, but also a Visual Studio 2005 project that appears to have been created with the project template we included in the Media Center SDK (and it is cool to see that this template is useful!).  The project also includes an installer template for a Visual Studio setup/deployment project so you can build an MSI and install this application to try it out within Windows Vista Media Center as well.

    A couple of notes about the MCMLookalike download after I spent a few minutes looking at it:

    • I strongly encourage you to use WiX v3.0 and the Votive Visual Studio 2005 add-in instead of the Visual Studio setup/deployment project to build installers for Windows Vista Media Center applications if possible.  I've created updated sample setup projects for the Q podcast sample application (here) and the Z sample application (here) that are a part of the Media Center SDK.  I understand that there is a learning curve for WiX that is a bit steeper than the built-in Visual Studio setup projects, but hopefully these samples and the accompanying blog posts can help get you past most of that.
    • The app.xml file included in the project doesn't contain the correct assembly strong name, so you cannot use that file with RegisterMceApp to register this application - registration will succeed but the application will crash when you try to launch it from within Media Center.  The assembly version number is incorrect and the strong name key value is missing.  If you're like me and tend to try to prototype your application during development and don't want to uninstall/reinstall an MSI every time, you can fix the app.xml and register the application that way instead of using the MSI (but only do this during development - shipping applications should be delivered as MSI-based installers).
  • Aaron Stebner's WebLog

    Tips for debugging Visual Studio package load failure errors

    • 0 Comments

    A while back, I posted a set of steps that can be used to help resolve package load failures in Visual Studio 2005.  These steps are only designed to resolve known issues we've seen on systems that previously had beta versions of Visual Studio 2005 installed.

    However, there are many possible causes of package load failures, and they can occur on systems that never had beta versions of VS 2005 installed.  Many of the errors I've seen are caused by bugs in the packages themselves and not by bugs in Visual Studio.  For example, this issue was caused by the package not correctly handling the scenario where VS was installed to a non-default path and had nothing to do with beta versions of VS 2005.

    I recently came across a link to an article on the Visual Studio Extensibility team blog that describes some techniques that are useful for debugging package load failures:

    http://blogs.msdn.com/dr._ex/archive/2006/12/14/debugging-package-load-failures.aspx

    This article is primarily aimed at developers who are creating their own Visual Studio packages, but the tips listed there are also useful for end users who are receiving Package Load Failure errors when launching or using the Visual Studio IDE.

    If you are encountering package load failures and other workarounds listed on the MSDN Forums and blogs haven't been helpful, it might help to try the debugging techniques described in this post.

  • Aaron Stebner's WebLog

    Another possible root cause of Visual Studio 2005 hanging while initializing

    • 2 Comments

    A while back, I wrote this blog post describing an issue where the Kaspersky anti-virus application can cause Visual Studio 2005 setup to hang while loading installation components.  Since then, I have heard from several other customers who have run into similar issues on systems that did not have Kaspersky anti-virus installed.

    One customer ended up contacting Microsoft technical support and they narrowed down the issue to a conflict with a different application - Tenebril SpyCatcher.  This anti-spyware application causes some files that are a part of Visual Studio 2005 setup to be quarantined, which then causes setup to hang.

    The customer tried to disable non-essential services using MsConfig and that allowed setup to launch, but then .NET Framework 2.0 setup failed.  The technical support specialist found that there were still some files being quarantined by Tenebril SpyCatcher in this scenario.

    In the end, the customer had to do the following:

    1. Uninstall Tenebril SpyCatcher
    2. Install Visual Studio 2005
    3. Re-install Tenebril SpyCatcher

    If you have Tenebril SpyCatcher installed on your system and are unable to launch Visual Studio 2005 setup or run into any problems installing the .NET Framework 2.0, you might want to try this workaround to see if it helps on your system.

  • Aaron Stebner's WebLog

    .NET Framework 1.1 hotfixes are not yet offered via Windows Update on Vista

    • 2 Comments

    I have heard from a couple of customers who noticed this issue, and I also experienced it on one of my systems yesterday, so I wanted to post an item to give anyone else reading my blog a heads up as well.  If you are running Windows Vista and install the .NET Framework 1.1, you will not currently see hotfixes or service packs for the .NET Framework 1.1 offered to your system if you visit Windows Update.

    I asked around and this is a known issue related to the Windows Update package authoring for .NET Framework 1.1 hotfixes and service packs.  Hopefully, we will be able to refresh the authoring for .NET Framework 1.1 items soon, but in the meantime, if you have the .NET Framework 1.1 installed on Windows Vista, please make sure to manually install service pack 1 and post-SP1 hotfixes.

    Here are a couple of links to make this easier for you:

  • Aaron Stebner's WebLog

    Building an MSI using WiX v3.0 that includes the VC 8.0 runtime merge modules

    • 17 Comments

    I was recently asked a question by a customer who was building an MSI using WiX v3.0 and the Votive add-in for Visual Studio 2005.  They were trying to consume the VC 8.0 runtime merge modules (MSMs) into their MSI, but were having trouble figuring out exactly how to configure their WiX project so that it would correctly consume these MSMs and install the VC 8.0 runtime files as part of their MSI-based setup.

    I looked around a little bit and found these instructions written by Nikola Dudar on the Visual C++ team here at Microsoft.  However, the instructions in that blog post are based on WiX v2.0, and the equivalent steps in WiX v3.0 are much more straightforward, so I decided to post a set of steps that can be used to create an MSI in WiX v3.0 and Votive that consumes the VC 8.0 runtime MSMs:

    1. Install Visual Studio 2005 Standard Edition or higher
    2. Download and install the latest build of WiX 3.0 from http://wix.sourceforge.net/downloadv3.html.  You need to install the ProjectAggregator2 MSI and then the WiX 3.0 MSI
    3. Launch Visual Studio 2005
    4. Choose File | New | Project...
    5. In the New Project dialog, select the WiX project type and then the WiX Project template to create a new WiX project
    6. In the WXS file that is created as part of the new project, add new <Merge> elements as children of the TARGETDIR <Directory> element for each one of the VC 8.0 runtime merge modules that you want to include in your MSI.  For example, to include MSVCRT, use the following items:

      <Merge Id="CRT" Language="0" SourceFile="c:\Program Files\Common Files\Merge Modules\microsoft_vc80_crt_x86.msm" DiskId="1" />


      Note: You will need to change the SourceFile attributes to point to the exact locations of the MSM file on your system.  This location depends on what partition you have your OS installed to.

    7. For each <Merge> element that you addded in step 6, add a <MergeRef> element under the appropriate <Feature> element.  For example:

      <MergeRef Id="CRT" />

    8. Add any other information that you want to include in your MSI, save the project and build it using Visual Studio

    When building an MSI that consumes the VC 8.0 runtime MSMs using Votive v3.0 in Visual Studio 2005, you may see several of the following types of warnings in your build output:

    1. WixProject1.wxs(10,0): Warning LGHT1055: The InstallExecuteSequence table contains an action 'SxsInstallCA' which cannot be merged from the merge module 'c:\Program Files\Common Files\Merge Modules\policy_8_0_Microsoft_VC80_ATL_x86.msm'. This action is likely colliding with an action in the database that is being created. The colliding action may have been authored in the database or merged in from another merge module. If this is a standard action, it is likely colliding due to a difference in the condition for the action in the database and merge module. If this is a custom action, it should only be declared in the database or one merge module.
    2. light.exe(0,0): Warning LGHT1076: ICE03: String overflow (greater than length permitted in column); Table: Component, Column: KeyPath, Key(s): downlevel_manifest.8.0.50727.762.98CB24AD_52FB_DB5F_FF1F_C8B3B9A1E18E
    3. light.exe(0,0): Warning LGHT1076: ICE30: The target file 'ansiatl.dll|ATL80.dll' might be installed in '[SystemFolder]' by two different conditionalized components on an LFN system: 'ansi_atl80.97F81AF1_0E47_DC99_FF1F_C8B3B9A1E18E' and 'nosxs.97F81AF1_0E47_DC99_FF1F_C8B3B9A1E18E'. If the conditions are not mutually exclusive, this will break the component reference counting system.
    4. light.exe(0,0): Warning LGHT1076: ICE82: This action SystemFolder.97F81AF1_0E47_DC99_FF1F_C8B3B9A1E18E has duplicate sequence number 6 in the table InstallExecuteSequence
    5. light.exe(0,0): Warning LGHT1076: ICE83: The keypath for Global Win32 SXS Assembly (Component_=uplevel.66332652_9C28_58B1_FF1F_C8B3B9A1E18E) SHOULD NOT be it's manifest file for assemblies other than Win32 Policy assemblies

    The first type of warning indicates that actions with the same name exist in multiple merge modules.  Windows Installer requires unique action names, and when attempting to merge MSMs that contain multiple actions with the same name, Windows Installer will exclude all but the first action.  In this case, the exact same SxsInstallCA and SxsUninstallCA actions exist in all of the VC 8.0 runtime MSMs, and so all but the first ones are excluded from the merging process.  However, all of these actions are identical and execute the same code behind the scenes, so it is safe to ignore this type of warning because you will not be losing any required functionality during the merge process.

    The second type of warning indicates that some identifiers are longer than the maximum values specified in the _Validation table of the MSI.  The documentation for ICE03 indicates that Windows Installer does not internally limit the column width to the specified value, so these warnings can be safely ignored.

    The third type of warning helps prevent authoring different components that install the same files to the same destination folder (which would violate Windows Installer component rules).  However, in the case of these VC 8.0 MSMs, the components have conditions that are mutually exclusive (Version9x and VersionNT < 501) so the component rules will not be violated and these warnings can be safely ignored.

    The fourth type of warning indicates that actions contain duplicate sequence numbers in the InstallExecuteSequence table.  When actions have duplicate sequence numbers, there is no guarantee about what order they will be run in.  However, in this case, the actions have no order dependencies and it is safe to ignore these warnings as well.

    The fifth type of warning helps prevent authoring incorrect keypath files for Win32 global assemblies that are installed to the WinSxS component store.  This warning indicates that they keypath should not be a manifest file unless the assembly is a Win32 policy assembly.  In this case, the assembly is a Win32 policy assembly, so these warnings can also be safely ignored.

    Note: it is possible to suppress the above warnings by configuring some settings in the WiX linker project property page in Visual Studio.  In general, however, I advise against doing that because if you enable suppressions, you might end up missing other warnings or errors in the same categories that are not safe to ignore.

    <update date="2/12/2008"> Added information about ICE03 warnings that can occur when merging the VC 8.0 MSMs that I missed when I originally wrote this post. </update>

    <update date="2/11/2009"> Removed references to policy MSMs because the general recommendation is to not include policy MSMs when redistributing the VC runtime files. </update>

     

  • Aaron Stebner's WebLog

    Media Center tips and how to share recorded TV on a domain in Windows Vista

    • 1 Comments

    Ian Dixon recently posted an item on his blog introducing a new Windows Media Center tips forum where people can share tips and tricks about configuring and using Windows Media Center.  You can find the Windows Media Center Tips forum at http://thedigitallifestyle.com/cs/forums/34/ShowForum.aspx, and it is already populated with a few useful items.

    I also stumbled across another potentially useful item on the Media Center Show Community forum that I don't see listed in the Tips forum (yet).  As most people are aware, Windows XP Media Center Edition 2005 did not support domain join functionality, but in Windows Vista Ultimate, that functionality is available along with Windows Media Center functionality.

    A user posted a list of steps that can be used to share recorded TV content with other computers that are connected to a domain.  You can find this post at http://iandixon.co.uk/cs/blogs/mike/archive/2007/01/30/how-to-share-recorded-tv-with-other-media-centers-domain-version.aspx.

  • Aaron Stebner's WebLog

    Uninstall VS 2005 update to support web application projects before installing VS 2005 SP1

    • 3 Comments

    I recently heard from a customer who tried to install Visual Studio 2005 SP1, but the installation was blocked with a message stating that the Visual Studio 2005 Web Application Project add-in needed to be uninstalled first.  However, the system did not have any items with that name in the Add/Remove Programs list.

    Microsoft released a new set of web application projects for Visual Studio 2005 after the final release of Visual Studio 2005, and they are now included as a part of VS 2005 SP1.  Because they are included in SP1, the standalone version must be uninstalled before installing SP1.  The tricky thing here is that there are 2 programs that have to be removed to fully uninstall the web application project add-in from Visual Studio 2005 to allow installing SP1 - the MSI-based add-in, and a Visual Studio 2005 hotfix to support web application projects.

    If you have the Visual Studio 2005 Web Application Project add-in installed and want to be able to install Visual Studio 2005 SP1, you can use the following steps to uninstall both of the programs that must be uninstalled:

    1. Click on the Start menu, choose Run, type appwiz.cpl and click OK
    2. In the Add/Remove Programs control panel, locate and remove the item named Microsoft Visual Studio 2005 Web Application Projects
    3. Check the box named Show updates at the top of the Add/Remove Programs control panel
    4. Under Microsoft Visual Studio 2005, locate the update named Update for Microsoft Visual Studio 2005 (KB915364) and choose to uninstall it

    After uninstalling both of the above packages, you should no longer receive a blocking dialog related to the Web Application Project add-in when trying to install VS 2005 SP1.

  • Aaron Stebner's WebLog

    Mailbag: How can I create a multilingual MSI-based setup?

    • 3 Comments

    Question:

    I am building an MSI-based setup for my application.  I would like the setup to contain UI strings in multiple languages, and then have setup detect the user's OS language at runtime and display setup UI in the same language.  How can I  create an MSI that will behave this way?

    Answer:

    There is not a way to embed different sets of UI strings in an MSI and have it decide at runtime which language to use.  To accomplish this type of behavior, you can use a setup.exe bootstrapper.

    The .NET Framework 2.0 setup accomplishes this by shipping a set of resource DLLs inside of the dotnetfx.exe package and then detecting the user's OS language when setup is launched and loading the UI resource DLL that matches the OS language.

    I have also heard of setups that ship with a series of transforms that contain UI strings in various languages.  In this scenario, the setup.exe bootstrapper detects the user's OS language when setup is launched and applies the appropriate transform to the base MSI to cause setup UI to display in the same language as the OS.

  • Aaron Stebner's WebLog

    Assemblies may be missing from the GAC or WinSxS cache after an MSI major upgrade

    • 15 Comments

    I recently read about an issue that affects Windows Installer products that use major upgrades and also install assemblies to the GAC or the WinSxS component store using the MsiAssembly and MsiAssemblyName tables.  This issue is documented in the Microsoft Knowledge Base article at http://support.microsoft.com/kb/905238.

    To summarize the issue, if you build an MSI that installs assemblies and includes major upgrade functionality, and then build a new version of the MSI that invokes a major upgrade, you may see the assemblies removed from the GAC or the WinSxS store after the major upgrade completes.  This happens if you do not change the assembly version for your assemblies and have not scheduled the RemoveExistingProducts action to occur after the InstallFinalize action.

    If you are running into this issue with your MSI, you can workaround this issue in one of the following 2 ways:

    1. Increment the assembly version number for each of your assemblies every time you deliver a new MSI that will be installed via a major upgrade
    2. Schedule the RemoveExistingProducts action to occur after the InstallFinalize action in your MSI

    If you change the scheduling, you do not necessarily need to increment the assembly version number for each of your assemblies.

    One important note here - the sample WiX files for the Q and Z sample applications that ship in the Windows Media Center SDK for Windows Vista are susceptible to this problem.  I have updated the downloadable WiX v3.0 projects for the Q application (that can be downloaded from this location and that is described here) and the Z application (that can be downloaded from this location and that is described here) to address this.  The specific change I made in q.wxs and z.wxs implements the 2nd option listed above by changing this line in each WXS file:

    <RemoveExistingProducts After="InstallInitialize" />

    To this:

    <RemoveExistingProducts After="InstallFinalize" />

    If you have the Media Center SDK installed and want to make this fix for the WiX v2.0 files that are installed as part of the SDK, you can make equivalent changes to the versions of q.wxs and z.wxs included there.

  • Aaron Stebner's WebLog

    Mailbag: Does an application built in VS 2005 SP1 require deploying the SP1 VC runtime files?

    • 1 Comments

    Question:

    I have built an application in Visual Studio 2005 that depends on the VC 8.0 runtime files being installed on the system.  I have recently installed VS 2005 SP1 on my development system, and when I rebuild my application, it appears that it now depends on the SP1 versions of the VC 8.0 runtime files.

    Is there a way I can build my application so that it will not depend on the SP1 versions of the VC 8.0 runtime files?  If not, do I have to distribute the SP1 version of the VC 8.0 runtime files with my application in this scenario, and how can I detect when I need to install the VC 8.0 runtime redistributable package on my users' systems?

    Answer:

    Applications built using Visual Studio 2005 SP1 that depend on the VC runtime files will require the SP1 versions of those files in order to run correctly.  You can avoid this dependency if necessary by maintaining a build machine that has Visual Studio 2005 without SP1 installed.

    If you decide to build your application using Visual Studio 2005 SP1 and it depends on the VC runtime files, you will need to include the SP1 version of the VC runtime files in your setup package.  I described some options for how to deliver the VC runtime files in this blog post.  To summarize, you can do one of the following:

    • Install the VC runtime redistribute package
    • Include the VC runtime MSM in your MSI package
    • Statically link to the VC runtime files at build time
    • Install the VC runtimes to a local folder

    If you choose to carry the VC runtime redistributable packages, you can use the detection logic described in this blog post to determine if the SP1 version of these packages are already installed on the user's system.

    Note: I also want to point out a couple of blogs that I recently found that are good resources for Visual C++ issues.  I encourage you to check them out if you have additional questions about the VC runtime files:

  • Aaron Stebner's WebLog

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

    • 44 Comments

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

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

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

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

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

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

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

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

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

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

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

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

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

     

  • Aaron Stebner's WebLog

    Warning dialog appears when launching Visual Studio 2005 SP1 on Windows Vista

    • 4 Comments

    As I'm sure many of you have noticed, Visual Studio 2005 SP1 was made available via Microsoft Update as a recommended update starting sometime last week.  I have opted my Windows Vista systems in to receive updates from Microsoft Update (by clicking the link at the bottom of the Windows Update control panel in Windows Vista and then accepting the license agreement on the Microsoft Update web site), and my Windows Vista systems are configured to automatically download and install critical and recommended updates.  As a result, I came into work on Monday and noticed that my systems now had Visual Studio 2005 SP1 installed.

    When I launched the IDE for Visual Studio 2005 and/or the Visual Studio 2005 Express Editions on my Windows Vista system for the first time after installing VS 2005 SP1, I noticed a new dialog that started appearing.  It contains the following text:

    Visual Studio 2005 Service Pack 1 requires the 2005 SP1 Update for Windows Vista and to be run with administrative permissions.

    This dialog looks like the following:

    The link in this dialog points to the Visual Studio on Windows Vista topic on MSDN.  Unfortunately, as of the time I am writing this blog post, the 2005 SP1 Update for Windows Vista is only available in beta form (via this download link).

    If you would like to prevent this dialog from appearing each time you launch Visual Studio, you can uncheck the Always show this message check box and click Continue.  Alternatively, you can set one of the following registry values if you need to automate the suppression of this dialog:

    • HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\8.0
      ShowWindowsAdminDlg = 0 (REG_DWORD)
    • HKEY_CURRENT_USER\Software\Microsoft\VBExpress\8.0
      ShowWindowsAdminDlg = 0 (REG_DWORD)
    • HKEY_CURRENT_USER\Software\Microsoft\VCExpress\8.0
      ShowWindowsAdminDlg = 0 (REG_DWORD)
    • HKEY_CURRENT_USER\Software\Microsoft\VCSExpress\8.0
      ShowWindowsAdminDlg = 0 (REG_DWORD)
    • HKEY_CURRENT_USER\Software\Microsoft\VJSExpress\8.0
      ShowWindowsAdminDlg = 0 (REG_DWORD)
    • HKEY_CURRENT_USER\Software\Microsoft\VWDExpress\8.0
      ShowWindowsAdminDlg = 0 (REG_DWORD)

    Note that there is a different registry value that must be set for each of the Visual Studio 2005 Express Editions, but only a single that must be set for all standard and higher editions of Visual Studio 2005.

    <update date="3/16/2010"> Fixed broken image link. </update>

     

  • Aaron Stebner's WebLog

    Pre-order available for Using Microsoft Vista Media Center book

    • 1 Comments

    Ian Dixon has been working on a book about Windows Vista Media Center with another author (Tony Campbell, the co-author of a book about Windows XP Media Center Edition).  This new book, titled Using Microsoft Vista Media Center, is now available for pre-order on the Amazon.com UK web site at the following link - http://www.amazon.co.uk/gp/product/0859345823?ie=UTF8&tag=httpthedigita-21&linkCode=as2&camp=1634&creative=6738&creativeASIN=0859345823.  That site lists the release date as March 15, 2007.  I encourage you to check out the link if you're interested in learning more details about the features in Windows Vista Media Center.

  • Aaron Stebner's WebLog

    Visual Studio 2005 SP1 failures can break existing applications

    • 0 Comments

    I have heard from a couple of customers who tried to install Visual Studio 2005 SP1, only to have it fail (possibly due to one of the known installation issues or some other reason that has not yet been documented).  After SP1 setup failed and rolled back, the customers who contacted me started running into failures while using Visual Studio 2005 or other products on the system that depend on the VC 8.0 runtime files.

    For example, attempting to start Visual Studio 2005 might cause a dialog to appear with the title Application Error and text that reads:

    The application failed to initialize properly (0xc0150004). Click on OK to terminate the application.

    Even worse, if you attempt to repair or uninstall Visual Studio 2005 or the .NET Framework 2.0, you might see an error that reads,

    Error 25007.Error occurred while initializing fusion. Setup could not load fusion with LoadLibraryShim(). Error: The handle is invalid.

    We just ran into a similar issue internally, and Heath Stewart was able to debug it and determine the root cause.  He described the cause and a couple possible workarounds on his blog at http://blogs.msdn.com/heaths/archive/2007/02/05/visual-studio-2005-service-pack-1-rollback-breaks-some-applications.aspx.

    Visual Studio 2005 SP1 includes an update to the VC 8.0 runtime files.  In some cases, when VS 2005 SP1 setup fails, the VC runtime policy files are left behind in the WinSxS component store, but the binaries that the policy files point to are rolled back.  This causes applications that depend on the VC runtime files to attempt to load non-existent versions of these binaries, and they fail to do so.

    If you are running into problems running Visual Studio 2005 or other applications that depend on the VC runtime files after a failed install of VS 2005 SP1, I encourage you to check out Heath's blog post and follow the instructions listed there.

    <update date="2/20/2007"> Adding more details to hopefully improve web searches for this issue </update>

     

  • Aaron Stebner's WebLog

    How to workaround install problems with MSN Remote Record on Windows Vista x64

    • 7 Comments

    An updated version of MSN Remote Record that works with Windows Media Center for Windows Vista has been released for download.  The following links contain more information about the MSN Remote Record service:

    The Green Button forum post also contains some customer comments about download and installation issues that have been encountered so far.  There are a couple of specific issues that affect the ability to download and install MSN Remote Record on Windows Vista x64 systems, and I wanted to post a workaround that can be used along with more information about what is causing these issues behind the scenes.

    How to download and install on Windows Vista x64

    1. Click on the Start menu, choose All Programs, then Accessories, then right-click on the Command Prompt item and choose Run as administrator
    2. Click Continue to grant permission to launch a cmd prompt with administrator privileges
    3. Run the command reg add "HKLM\Software\Microsoft\Windows\CurrentVersion\Media Center\Service\Remote Record" /f
    4. Click on the Start menu, choose All Programs, then Internet Explorer (64-bit)
    5. Navigate to http://tv.msn.com/tv/rr/rrsetup.aspx
    6. Click on the Install Remote Record button to download and install MSN Remote Record

    What can cause the Install button to not appear?

    The web page at http://tv.msn.com/tv/rr/rrsetup.aspx uses some information from the web browser user agent string to determine whether or not it should offer an Install Remote Record button.  This is done to prevent users from being able to download and attempt to install MSN Remote Record on a system that does not have Windows Media Center.  Therefore, if you browse to this web page on a system that does not have Windows XP Media Center Edition 2005 or Windows Vista Home Premium or Ultimate, you will not see an Install button.

    In addition, there is another issue that only affects Windows Vista x64 systems.  Windows Vista x64 includes both 32-bit and 64-bit versions of Internet Explorer, but the 32-bit version is used by default unless you specifically go to the Start menu shortcut or the folder that it is located and launch the 64-bit version.  The 32-bit version of Internet Explorer only reads user agent information from the 32-bit registry.

    Windows Media Center for Windows Vista only installs native 64-bit files and registry information on Windows Vista x64.  Therefore, the browser user agent string will be different depending on what version of the registry Internet Explorer is looking at.  The following are example user agent strings from the 32-bit and 64-bit registry on my 64-bit test system:

    • 32-bit: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; WOW64; SLCC1; .NET CLR 2.0.50727; .NET CLR 3.0.04506)
    • 64-bit: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; Win64; x64; .NET CLR 2.0.50727; SLCC1; Media Center PC 5.0)

    You'll notice above that only the 64-bit user agent string reports that the system contains Windows Media Center.  This difference in user agent strings prevents the Install button from being presented on Windows Vista x64 Home Premium and Ultimate unless you browse to the MSN Remote Record site from a 64-bit instance of Internet Explorer.

    Why does installation fail on Windows Vista x64?

    If you attempt to install MSN Remote Record on Windows Vista x64 Home Premium or Ultimate without first creating the registry value listed in step 3 of the steps listed above, you will likely encounter an error dialog that states the following, and then setup will rollback and fail:

    The installer failed to connect with the MSN Remote Record service.  Please make sure your Internet connection is working and try installing again.

    The issue here is that the MSN Remote Record MSI is a 32-bit MSI.  Because of that, when it installs, it uses the Windows Installer Registry table to create an empty registry key in the 32-bit registry hive (the WOW64 reflected hive) in the following location:

    HKEY_LOCAL_MACHINE\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Media Center\Service\Remote Record

    There is a custom action inside of the MSN Remote Record MSI called ClientServiceInitHelper.exe that attempts to create some service connection registry values.  During a failing x64 install, you can see several warning entries in the application event log that indicate that this custom action is attempting to write to the 64-bit registry in the following location:

    HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Media Center\Service\Remote Record

    It turns out that this custom action code will fail with an error if the sub-key it is trying to create values under does not exist.  Since the MSI is 32-bit, the Remote Record sub-key is written to a different location than the custom action code is expecting, and the custom action fails, which causes setup to rollback.

    The workaround listed above creates the Remote Record sub-key in the location expected by the custom action, and installation succeeds on Windows Vista x64 Home Premium and Ultimate.

  • Aaron Stebner's WebLog

    Mailbag: Can I anchor a custom strip on the Media Center start menu?

    • 0 Comments

    Question:

    I would like to add a new strip to the Windows Vista Media Center start menu.  I have followed the instructions in your previous blog post and in the Windows Media Center SDK for Windows Vista, and the start menu strip is created as expected in my test scenarios.

    However, the user is able to remove this strip by going to Settings | General | Program Library Options | Edit Start Menu and unchecking the application name.  In addition, once a user installs additional applications that also create start menu strips, the strip that I create will no longer appear on the start menu because it only shows the 2 most recently installed strips.

    How can I author my Windows Vista Media Center start menu strip so that it will always appear on the start menu, regardless of what other applications the user installs on the system?

    Answer:

    There is not a way to force a custom strip to always appear on the Windows Vista Media Center start menu.  Users are always allowed to change/remove tiles and strips that are added by Media Center applications.  Only strips and tiles that are included as part of the standard Windows Media Center functionality on Windows Vista are "anchored" to the start menu so that they will always appear regardless of what additional application the user installs on the system.

  • Aaron Stebner's WebLog

    Error installing .NET Framework 1.0 and 1.1 on Windows Vista caused by Data Execution Prevention (DEP)

    • 5 Comments

    A while ago, I described a .NET Framework 1.0 and 1.1 installation failure that can be caused by the Data Execution Prevention (DEP) feature that was introduced in Windows XP SP2.  My previous blog post about this topic stated that this DEP issue can affect .NET Framework 1.0/1.1 setup on Windows XP SP2.  However, this issue can cause installation failures on all operating systems that include the DEP feature, including Windows Server 2003 SP1 and Windows Vista.

    As I described in my previous blog post, the DEP feature was introduced after the .NET Framework 1.0 and 1.1 shipped, and the original releases of the .NET Framework 1.0 and 1.1 are not compatible with DEP.  This DEP compatibility bug has been fixed in the .NET Framework 1.0 SP3 and 1.1 SP1.  However, this issue can cause the initial installation of the .NET Framework 1.0 and 1.1 to fail and rollback, and you cannot install the service pack without first getting the product installed (unless you use a method like creating a combined administrative install point, which will work but is not "officially" supported).

    To workaround this issue, you can temporarily disable DEP, install the .NET Framework 1.0 or 1.1 and then re-enable DEP.  The method of disabling DEP on Windows XP SP2 is described in the previous blog post, but it has been changed in Windows Vista.

    The following steps can be used to disable Data Execution Prevention (DEP) on Windows Vista:

    1. Click on the Start menu, choose All Programs, then Accessories, then right-click on the Command Prompt item and choose Run as administrator
    2. Click Continue to grant permission to launch a cmd prompt with administrator privileges
    3. Run the command bcdedit.exe /set nx AlwaysOff
    4. After running the command, you should see a message in the cmd prompt stating The operation completed successfully
    5. Restart the computer

    The following steps can be used to re-enable Data Execution Prevention (DEP) on Windows Vista:

    1. Click on the Start menu, choose All Programs, then Accessories, then right-click on the Command Prompt item and choose Run as administrator
    2. Click Continue to grant permission to launch a cmd prompt with administrator privileges
    3. Run the command bcdedit.exe /set nx OptIn
    4. After running the command, you should see a message in the cmd prompt stating The operation completed successfully
    5. Restart the computer

    Note - this issue will not affect all Windows Vista systems.  DEP is hardware-enforced and not all CPUs are compatible with it.  However, if you are having trouble installing the .NET Framework 1.0 or 1.1 on Windows Vista and installation fails while trying to register System.EnterpriseServices.dll, it is worth trying the above workaround in case you do have a DEP-compatible system.

    <update date="11/13/2008"> Updated bcdedit.exe command lines slightly.  They used to say bcdedit.exe /set {current} nx AlwaysOff and bcdedit.exe /set {current} nx OptIn.  However, the {current} switch can be omitted and bcdedit.exe will automatically apply the setting change to the boot entry for the currently running OS. </update>

     

  • Aaron Stebner's WebLog

    Mailbag: Benign errors appear in the log file when uninstalling Visual Studio 2005

    • 0 Comments

    Question:

    I recently uninstalled Visual Studio 2005 from one of my systems, and I am trying to determine if the uninstall completed successfully.  The setup UI reports success, but when I look at the verbose uninstall log (located at %temp%\vsmsilog*.txt), I see several error messages that look like the following:

    Action start 10:04:36: DDSE_CA_Uninstall_InstallExecuteSequenceStarts.
    01/25/07 10:04:36 DDSet_Status: LANGID: 1033
    01/25/07 10:04:36 DDSet_Entry: ImmediateDispatch: DDSE_CA_Uninstall_InstallExecuteSequenceStarts entry
    01/25/07 10:04:36 DDSet_Status: patch uninstall Directory = 'C:\Program Files\Common Files\Microsoft Shared\SE\VS_PRO_1033_X86_CD_8_0'
    01/25/07 10:04:36 DDSet_Status: LoadLibrary('C:\Program Files\Common Files\Microsoft Shared\SE\VS_PRO_1033_X86_CD_8_0\worker.dll')
    01/25/07 10:04:36 DDSet_Warning: Setup failed to load the DLL at 'C:\Program Files\Common Files\Microsoft Shared\SE\VS_PRO_1033_X86_CD_8_0\worker.dll'. System error: The specified module could not be found.

    What do these errors mean, and will they cause any problems on my system?

    Answer:

    Any warnings that refer to a file named worker.dll are benign and do not have any effect on the Visual Studio uninstall process.  There are a series of custom actions included in Visual Studio setup that attempt to load a DLL and perform some processing to help configure hotfixes and service packs.  This mechanism is designed to be a hook in case we find some problematic hotfix install/uninstall problems that can only be fixed by writing some custom code that will be run during setup.  If/when we find a scenario where we need to do this, we will include a copy of worker.dll in the hotfix installation process, and then when that hotfix is uninstalled or Visual Studio itself is uninstalled, the code in the worker.dll will be executed.

    If we do not end up finding any scenarios where we need to ship a worker.dll, then uninstalling Visual Studio will simply log the failure to load that DLL and continue on with the uninstall process.

  • Aaron Stebner's WebLog

    Media Center Show Awards 2006 winners announced

    • 1 Comments

    Ian Dixon has posted the Media Center Show #93 where he and Ed Bott unveiled the winners of the Media Center Show Awards 2006.  You can see the winners in the transcript at this location and you can listen to the show at this location.

    One of the things that you'll notice when you listen to this episode is that my blog won for the category of Best Microsoft Employee Media Center Blog.  I wanted to say that I'm very honored and humbled to be recognized by the community in this way.  I was hoping and expecting that Charlie Owen would win, so this is kind of a surprise, but in a good way! 

    My goal for the upcoming year is to encourage further community involvement from Media Center experts within Microsoft so that there will be a lot more candidates to choose from in this category next year.

    In the meantime, I will proudly display this banner on my blog:

Page 1 of 1 (24 items)