Aaron Stebner's WebLog

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

November, 2007

  • Aaron Stebner's WebLog

    Link to information about a .NET Framework 3.5 setup verification tool

    • 1 Comments

    One of my colleages, Aaron Ruckman, has created and posted a tool that can be used to verify the installation state of the .NET Framework 3.5 and let you know more details about any potential problems that it finds on your system.  Here are links with more information:

  • Aaron Stebner's WebLog

    Updated sample code that can detect the .NET Framework 3.5

    • 23 Comments

    Now that the .NET Framework 3.5 has been released, I have posted an updated version of the .NET Framework detection sample code that I previously published.  The updated version includes logic to detect the presence of the .NET Framework 3.5 and also .NET Framework 3.0 service packs, which was missing from previous versions of this sample code.

    You can download updated versions of the sample code at the following locations:

    For reference, the registry locations used in this sample code to detect the .NET Framework 3.0 service pack level and the .NET Framework 3.5 are listed below.

    To detect the .NET Framework 3.0 service pack level:

    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v3.0]
    SP = <value>

    Note - this SP value will not exist at all if you only have the original release of the .NET Framework 3.0.  This value was added starting in the .NET Framework 3.0 SP1 and will be updated for future service packs.

    To detect the .NET Framework 3.5 final release:

    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v3.5]
    Install = 1
    Version = 3.5.21022.08

    To detect the .NET Framework 3.5 service pack level:

    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v3.5]
    SP = <value>

    Note - this SP value does exist in the final release of the .NET Framework 3.5, and will be set to 0.  Future service packs will increment this value as appropriate.

    <update date="4/8/2009"> Fixed broken links to the sample code. </update>

     

  • Aaron Stebner's WebLog

    New CTP of Visual Studio Team System Code Name Rosario now available with built-in WiX support

    • 1 Comments

    Jeff Beehler posted an item on his blog today announcing the availability of the Visual Studio Team System Code Name "Rosario" November CTP for download.  The introductory page for this CTP can be found at http://go.microsoft.com/fwlink?LinkID=96097

    This introductory page contains a bullet point with the following information:

    Integrated support to build setup packages using Windows Installer XML technology.

    More information about WiX in the Rosario November 2007 CTP

    Rob Mensching posted an in-depth description on his blog in question and answer format with some background information about how it came about that WiX is being integrated into Visual Studio, what the planned scope of WiX support is in the Rosario release, and how the WiX bits in Rosario compare to the community WiX bits available on SourceForge.

    There is some initial documentation regarding WiX in Rosario at http://msdn2.microsoft.com/en-us/teamsystem/bb879916.aspx, and a link to the Rosario November 2007 CTP version of the WiX documentation at http://go.microsoft.com/fwlink/?linkid=101532.

    One note about the link to the WiX documentation - downloading this CHM file on a non-Windows Server 2003 system will cause all of the content to appear blank by default.  You can use the following steps to work around this issue:

    1. Go to the link at http://go.microsoft.com/fwlink/?linkid=101532 and save the file to your hard drive
    2. Go to the location where you saved the CHM file to in step 1, right-click on it and choose Properties
    3. In the General tab, click the Unblock button
    4. Click OK to dismiss the Properties dialog
    5. Double-click on the file and it will now open and the contents will display correctly

    More information about the Rosario November 2007 CTP

    The following links contain more detailed information about the Rosario November 2007 CTP:

    Here are some other useful links for Visual Studio Team System codename Rosario:

  • Aaron Stebner's WebLog

    VS 2008 Media Center Application project template installation issue in the Media Center SDK 5.3

    • 2 Comments

    There is a bug in the installation logic for the recently released Windows Vista Media Center SDK 5.3 that was briefly mentioned in this Media Center Sandbox blog post, and I wanted to link to it here as well in case anyone runs into it.

    Description of the issue

    The installation logic for the Visual Studio 2008 project templates has an error that causes the Windows Media Center Application (that implements the Media Center application step-by-step instructions) to not appear in Visual C# 2008 Express or Visual Studio 2008 unless the system also has one or more edition of Visual Studio 2005 also installed.

    This means that if you have a development system that only has Visual Studio 2008 installed, you will not see this Media Center step-by-step application project template in the VS 2008 new project dialog after installing the Windows Vista Media Center SDK 5.3.

    How to work around this issue

    There are a few options that will allow you to work around this issue if you run into it when installing and using the Windows Vista Media Center SDK 5.3.

    Option 1 - Install a VS 2005 edition and repair the SDK

    1. Close Visual Studio 2008 if it is running on your system
    2. Install any edition of VS 2005 (such as VC# 2005 Express Edition, Visual Studio 2005 Professional, etc)
    3. Go to Add/Remove Programs and choose to repair the product named Microsoft Windows Media Center SDK 5.3

    Option 2 - Manually copy and register the project template for use in VS 2008

    1. Close Visual Studio 2008 if it is running on your system
    2. Download the Windows Media Center Application project template zip file from http://astebner.sts.winisp.net/Tools/MediaCenterAddIn.zip
    3. Copy it to the project template location for the version(s) of VS 2008 that you have installed on your system.  For example:

      For Visual C# 2008 Express Edition - C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\VCSExpress\ProjectTemplates

      For Visual Studio 2008 up-level editions - C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\ProjectTemplates\CSharp\Windows Media Center
    4. Click on the Start menu, choose All Programs, then Accessories, then right-click on the item named Command Prompt and choose Run as administrator to open an elevated cmd prompt
    5. In the elevated cmd prompt, re-register the project templates by running the appropriate commands depending on the versions of VS 2008 that are installed on the system:

      For Visual C# 2008 Express Edition - "C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\VCSExpress.exe" /setup

      For Visual Studio 2008 up-level editions - "C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\devenv.exe" /setup

    Note - the exact paths listed in steps 3 and 5 above will need to change if you have VS 2008 installed to a non-default path or non-default drive letter.

    Option 3 - Install the supplemental project template MSI

    1. Close Visual Studio 2008 if it is running on your system
    2. Download and install the supplemental Windows Media Center project templates (described in more detail here) from http://astebner.sts.winisp.net/Tools/mce_project_templates.zip
  • Aaron Stebner's WebLog

    Voting now open for the Media Center Show Awards 2007

    • 1 Comments

    Ian Dixon posted an item on his blog indicating that the voting for the Media Center Show Awards 2007 is now open.  This year, the Media Center Show Awards has the following categories:

    • Best open source Media Center project
    • Best free (or free beta) Media Center application
    • Best commercial Media Center application
    • Media Center design award
    • Best Media Center enthusiast blog
    • Best Media Center community resource

    I encourage you to visit the voting page at http://thedigitallifestyle.com/awards07/default.aspx and submit your votes for the Media Center Show Awards 2007.

  • Aaron Stebner's WebLog

    Visual Studio setup /createtransform mode fails when the source files are marked read-only

    • 4 Comments

    Recently, a customer reported an issue to me with Visual Studio 2005 setup, and I have verified that this issue exists in both Visual Studio 2005 and Visual Studio 2008 setup.  I want to describe the details about this issue and how to work around it in case anyone else runs into it while trying to deploy VS 2005 and/or VS 2008 on their networks.

    Description of this issue

    Both Visual Studio 2005 and Visual Studio 2008 setup have an administrator install mode that allows you to create a Windows Installer transform (MST) to enable deployment of Visual Studio via a Group Policy object in an Active Directory environment.  This mode is invoked by running <VS Install Path>\setup\setup.exe /CreateTransform <path to MST file> (an example is described in the Visual Studio 2005 deployment readme.

    Behind the scenes, when VS setup is run with the /CreateTransform switch, it copies the original MSI file (vs_setup.msi) to the %temp% directory in order to modify it and create a transform based on those modifications.  However, it does not modify the file attributes when copying the MSI to %temp%.

    This means that if the MSI is marked as read-only, it will be copied to %temp% as a read-only file, and then setup will fail because it cannot modify the read-only MSI file in order to to create the transform in this scenario.

    The most common case where this bug is encountered is by running setup with the /CreateTransform switch directly from a VS installation CD or DVD.  In most cases, the files are copied to %temp% with read-only attributes when setup is run from CD/DVD media.  This bug can also occur if you run VS setup from a network path where the files staged to the network have been marked as read-only.

    How to work around this issue

    In order to work around this bug, you will need to make sure that the VS setup files are not marked as read-only before running setup with the /CreateTransform switch.  The easiest way to achieve this is to copy the contents of the installation CDs/DVD to a network share and then verify that the files are not marked read-only by right-clicking on the root folder and verifying that the read-only attribute is unchecked.

  • Aaron Stebner's WebLog

    Visual Studio 2008 SDK and Visual Studio 2008 shell now available for download

    • 0 Comments

    Earlier this week, the final versions of Visual Studio 2008 and the .NET Framework 3.5 were released.  I just noticed that the Visual Studio 2008 SDK and the Visual Studio 2008 shell have also been released.

    The VS 2008 SDK includes documentation, samples and tools that can be used to create extensions for Visual Studio 2008.

    The VS 2008 shell is a set of 2 redistributable package that allows you to build and deploy Visual Studio 2008 extensions without requiring users to install a full edition of Visual Studio 2008 in order to use them.  You can choose the integrated VS 2008 shell, which will allow your extensions to automatically appear in other editions of VS 2008 that are installed on the system, or the isolated VS 2008 shell, which will allow your extensions to run side-by-side and not automatically integrate with other editions of VS 2008 that are installed on the system.

    Here are download links for the VS 2008 SDK and VS 2008 shell:

    Here are some other useful links with information about Visual Studio 2008 extensibility:

  • Aaron Stebner's WebLog

    Visual Studio and .NET Framework setup log collection tool

    • 5 Comments

    I previously wrote about a log collection tool that will automatically gather and cab up Visual Studio 2008 and .NET Framework 3.5 log files to make it easier to troubleshoot installation issues.  The folks who created this tool have posted an updated version at http://go.microsoft.com/?LinkId=8967043.

    In addition to gathering and cabbing the log files listed in this blog post, the updated version of the tool also contains the following new functionality:

    • It gathers some additional types of log files to help troubleshooting some more types of setup failures
    • It gathers a list of installed MSI-based products on the system using logic that is mostly the same as the logic performed by the MsiInv tool
    • It uses the MsInfo tool to gather some hardware and OS version information about the computer to aid in troubleshooting

    As a reminder from my previous blog post, here is information about where to download the log collection tool, how to use it, and where the output from the tool is created:

    The tool can be downloaded from http://go.microsoft.com/?LinkId=8967043.  It is a Win32 console application, so you can extract it from the zip file and double-click on it to run it.  It will create a file named %temp%\vslogs.cab on your system after it has gathered all of the log files.

    Note - after the tool finishes running, you can get to your %temp% folder to find the file vslogs.cab by clicking on the Start menu, choosing Run, typing %temp% and clicking OK.

    <update date="6/2/2008"> Updated link to the log collection tool to point to the most up-to-date version. </update>

    <update date="8/12/2009"> Fixed broken link to the log collection tool. </update>

    <update date="3/1/2011"> Updated title to reflect that this tool works for all versions of Visual Studio and the .NET Framework - not just Visual Studio 2008 and the .NET Framework 3.5. </update>

     

  • Aaron Stebner's WebLog

    XNA Game Studio 2.0 beta now available for download

    • 2 Comments

    As noted in this post on the XNA team blog, the XNA Game Studio 2.0 beta is now available for download.  You can get started by checking out the overview information at http://creators.xna.com/beta/betahome.aspx.  This page includes links to information about how to get started installing and using the beta and how to install and use the project migration wizard to migrate your XNA Game Studio Express 1.0 and 1.0 refresh project files to the 2.0 format.  The page also includes links to a set of downloadable samples that demonstrate XNA Game Studio 2.0 features.  Notably, the samples include a beta version of a new starter kit for a game called Net Rumble that demonstrates some of the new networking features in XNA Game Studio 2.0.

    Here are some useful links to help you get started learning about XNA Game Studio 2.0:

    Here are links to use to download the beta and report bugs found while installing and using the beta:

    I encourage you to try out the XNA Game Studio 2.0 beta, including the project migration wizard (if you have any XNA Game Studio Express 1.0 project files) and the new sample content.  Also, please make sure to report any issues you find on the Connect site so we can make improvements in future releases of XNA Game Studio.

  • Aaron Stebner's WebLog

    Windows Vista Media Center SDK version 5.3 now available for download

    • 5 Comments

    A refreshed version of the Windows Vista Media Center SDK (version 5.3) has been released for download this afternoon.  The download location is the same as the previous versions of the Windows Vista Media Center SDK - http://www.microsoft.com/downloads/details.aspx?FamilyID=A43EA0B7-B85F-4612-AA08-3BF128C5873E.  If you have any previous version of the Windows Vista Media Center SDK installed, you can run the MSI for version 5.3 and it will automatically upgrade the older versions for you.

    The features of version 5.3 of the Windows Vista Media Center SDK are described in more detail in this post on the Media Center Sandbox blog.  The following is a summary of the key changes described in that post:

    • New automation model for the MCML Preview Tool (McmlPad) - this allows some programmatic interactions with McmlPad to do things like loading MCML files, refreshing the current view when the underlying MCML files are changed, locating the position of an existing instance of McmlPad in order to drive the UI using automation, etc
    • New standalone tool named MCML Animation Explorer - it provides a more graphical environment for experimenting with many of the types of animations supported in MCML
    • Additional documentation about building animations
    • Project templates now work with Visual Studio 2008 in addition to Visual Studio 2005.  SDK setup will automatically integrate with whatever editions of VS 2005/2008 it detects are installed on your system
    • New C# project templates for a simple MCML application and a Media Center background application

    The last 2 bullets related to project templates essentially incorporate the information in the supplemental project template MSI that I posted via this blog post into the SDK.  If you install version 5.3 of the Windows Vista Media Center SDK, there is no longer any need to install that supplemental project template MSI.

    If you're a Windows Vista Media Center developer or thinking about getting started, I encourage you to download this new version of the SDK and check it out.

  • Aaron Stebner's WebLog

    Additional .NET Framework 2.0 SP1, 3.0 SP1 and 3.5 download links

    • 23 Comments

    Earlier today, I posted an item on my blog with a list of links that can be used to download the final release of the .NET Framework 3.5 and Visual Studio 2008.  Since then, I found some additional links for .NET Framework packages that were also released as a part of the .NET Framework 3.5 release.  Here is a complete list of download information for the .NET Framework 3.5 products released today:

  • Aaron Stebner's WebLog

    Final release of Visual Studio 2008 and .NET Framework 3.5 now available

    • 10 Comments

    As noted this morning in this post on Soma's blog, the final release of Visual Studio 2008 and the .NET Framework 3.5 (previously codenamed Orcas) are now available for download.  You can the .NET Framework 3.5 at the following locations:

    You can download various editions of Visual Studio 2008 at the following locations:

    Here are links to some additional information about Visual Studio 2008 and the .NET Framework 3.5:

    <update date="11/19/2007"> Updated the list of links with a new post I created that has some additional .NET Framework 2.0 SP1 and 3.0 SP1 download locations that I found out after initially writing this post. </update>

    <update date="11/26/2007"> Added a note that the full download package for the .NET Framework 3.5 includes ia64 in addition to x86 and x64. </update>

     

  • Aaron Stebner's WebLog

    Using WiX 3.0 to create a per-user MSI that does not prompt for elevation on Windows Vista

    • 6 Comments

    A while back, I posted a summary of some information I learned about how Windows Installer interacts with UAC on Windows Vista.  Included in that blog post is a list of steps that must be taken to create a per-user MSI that will not cause a Windows Vista UAC elevation prompt when installing it.

    Since then, I've gotten a few questions about exactly how to create an MSI that implements those guidelines.  As a result, I decided to create an example MSI to demonstrate these concepts, and also post the setup authoring for this example (created using a recent build of WiX 3.0).  Hopefully, this example will help translate the per-user MSI creation guidelines into real-world MSI concepts so that anyone who wants to create their own per-user MSIs will be able to do so relatively easily.

    For this example, I chose to create a per-user installer for a Windows Media Center Presentation Layer Web application because this type of application does not require installing any per-machine resources (as long as you do not user the /allusers switch when calling RegisterMceApp as a custom action during setup to register the application with Media Center).  However, the general concepts demonstrated in this example will work for other types of per-user applications and not just per-user Media Center applications.

    Where to download the example files

    You can download the example MSI and setup authoring from the following locations:

    How to build the example MSI

    I included a copy of the built MSI in the sample zip file, but you may also want to modify the source and rebuild the MSI to experiment with some of the settings.  To build the MSI using the source files included in this example, you can use the following steps:

    1. Download and install wix3.msi from the latest build of WiX 3.0 at http://wix.sourceforge.net/releases
    2. Download and extract the contents of the example zip file from http://cid-27e6a35d1a492af7.skydrive.live.com/self.aspx/Blog%7C_Tools/example%7C_per%7C_user%7C_msi.zip
    3. Make any desired changes to the sample setup authoring files
    4. Run the file build.bat to compile and link the MSI using the Candle and Light tools included in WiX 3.0

    Details about how the example was implemented

    Rather than walk through the entire WXS file, I have included comments in the text of the WXS file to explain the purpose for each of the blocks of code in the file.  In addition, I want to specifically highlight a few key parts of the setup authoring that are needed in order to build an MSI that will not cause a UAC prompt to appear during installation on Windows Vista.  These highlighted items match the requirements for creating an MSI that will not prompt for elevation that are enumerated in this MSDN topic and that I summarized in my previous blog post.

    1.  Ensure that no actions performed in your MSI require elevation

    This means that all files and registry must be created in a per-user location and no custom actions can require administrator privileges.  In this example, the directory that the application files are installed to is located under the per-user application data folder.  This is defined in the following authoring:

    <Directory Id="LocalAppDataFolder" Name="AppData">
        <Directory Id="AppRootDirectory" Name="MyApplication"/>
    </Directory>

    In addition, the component that includes the payload for this example MSI includes a CreateFolder entry, a RemoveFolder entry and a HKEY_CURRENT_USER registry entry that is marked as the key path.  This is defined in the following authoring:

    <DirectoryRef Id="AppRootDirectory">
        <Component Id="Registration.xml" Guid="f671ee4d-dd0a-4f7f-a4d1-1d181d2f3002" DiskId="1">
            <CreateFolder/>
            <RemoveFolder Id="RemoveAppRootDirectory" On="uninstall" />
            <File Id="Registration.xml" Name="Registration.xml" Source="Registration.xml" Checksum="no" />
            <File Id="Application.png" Name="Application.png" Source="Application.png" Checksum="no" />
            <RegistryKey Root="HKCU" Key="Software\MyCompany\MyApplication" Action="createAndRemoveOnUninstall">
                <RegistryValue Name="Version" Value="[ProductVersion]" Type="string" KeyPath="yes"/>
            </RegistryKey>
        </Component>
    </DirectoryRef>

    These settings are included in this setup authoring in order to eliminate ICE38 and ICE64 errors when building the MSI.

    The example package includes some custom actions to register the application with Media Center, but these custom actions do not require administrative privileges so they will work correctly in a per-user MSI that does not run with elevated privileges.

    One other note - the build script included with this example includes a command line argument to suppress errors and warnings related to ICE91 when running Light.  This ICE validation test reports warnings if any resources are installed to a per-user location in an MSI.  However, in this example, the warning can be safely ignored because the MSI is specifically designed to be per-user, and as we will see in step 2 below, we will also enforce that the MSI can only be installed per-user.

    2.  Set the ALLUSERS property to an empty string

    The following syntax defines the ALLUSERS property but does not assign a value to it so it will be set to blank during installation:

    <Property Id="ALLUSERS" Secure="yes"/>

    Since this property is a Windows Installer public property, it could be changed by the user when they install the MSI via command line.  As an extra precaution, I added a launch condition to this WXS file so that the MSI will not allow you to install if you try to set the ALLUSERS property to something other than blank or 0.  This WiX authoring is used to implement this block:

    <Condition Message="!(loc.LaunchCondition_AllUsers)">
        NOT ALLUSERS
    </Condition>

    The error message that appears when this block is invoked is defined in this entry in the WiX localization (WXL) file named Setup-en-us.wxl that is included in the zip file:

    <String Id="LaunchCondition_AllUsers">Setting the ALLUSERS property is not allowed because [ProductName] is a per-user application. Setup will now exit.</String>

    3.  Set bit 3 of the Word Count summary property to 8 to indicate that elevated privileges are not required

    This is accomplished in WiX by setting the InstallerPrivileges attribute to "limited" in the Package element.  In this example, the Package element looks like the following:

    <Package Description="!(loc.Package_Description)"
             Comments="!(loc.Package_Comments)"
             InstallerVersion="200"
             Compressed="yes"
             InstallPrivileges="limited"
    />

    The build script included with this example includes a command line argument to suppress errors and warnings related to ICE39 when running Light.  This ICE validation test checks the contents of the Summary Information Stream in the MSI.  Bit 3 of the Word Count summary property is a part of the Summary Information Stream, and it is a new value introduced in Windows Installer 4.0.  Unfortunately, the ICE validation test file (darice.cub) does not currently recognize this new bit, and an MSI that attempts to set it will fail ICE39 tests even though it is authored correctly.  Ignoring ICE39 errors is safe in this case because if an MSI that includes it is installed using an older version of Windows Installer that does not recognize it, Windows Installer will ignore it.

    <update date="1/10/2008"> Removed a reference to the syntax ALLUSERS=0 because Windows Installer only specifically recognized ALLUSERS values of blank, 1 and 2 according to the documentation </update>

    <update date="8/13/2009"> Fixed broken link to the sample files used in this blog post. </update>

     

  • Aaron Stebner's WebLog

    XNA Game Studio 2.0 beta will be available soon

    • 2 Comments

    I noticed an item on the XNA team blog that was posted today, and I wanted to link to it here as well.  There will be a beta version of XNA Game Studio 2.0 available for download in the near future.  You can check out the entire post here - http://blogs.msdn.com/xna/archive/2007/11/15/xna-game-studio-2-0-beta-available-soon.aspx.

    This beta will integrate into Visual C# Express 2005 and Visual Studio 2005 standard and higher, and the beta will only support deploying Windows games.  If you are interested in checking out the XNA Game Studio 2.0 beta, make sure to check back for updates on the XNA team blog.  Also, you can check out this blog post for more information about some of the key new features that will be available in XNA Game Studio 2.0.

  • Aaron Stebner's WebLog

    How to avoid OS reboot prompt when installing the .NET Framework 3.5 on Windows Vista

    • 31 Comments

    Description of the issue

    When installing the .NET Framework 3.5 or Visual Studio 2008 on Windows Vista RTM, some people have noticed that a Windows Update dialog box pops up to indicate that the system must be restarted in order to complete installation of OS updates.  The dialog box looks something like the following:

    What is happening behind the scenes

    Windows Vista includes the .NET Framework 2.0 and 3.0 as OS components.  The .NET Framework 3.5 includes Windows Vista OS hotfix packages for the .NET Framework 2.0 SP1 and 3.0 SP1, and both of these hotfixes require reboots in order to complete installation.  The .NET Framework 3.5 setup wrapper contains logic to handle these reboot requests and notify the user, but the Windows Update service in Windows Vista also runs in the background and listens for this type of reboot request and pops up dialog boxes like this to notify the user that a reboot is needed as the result of installing an OS update.

    Unfortunately, if this dialog appears during the .NET Framework 3.5 setup or during installation of a product that installs the .NET Framework 3.5 as a prerequisite (such as Visual Studio 2008), and the user chooses to restart using the Restart Now button on this dialog, it can cause the system to reboot even if the .NET Framework 3.5 or Visual Studio 2008 setup is still running.  This can leave the system in an unknown state if these setups are installing something at the time of the reboot.

    How to work around this issue

    The Visual Studio 2008 readme will include an item suggesting that the user dismiss or ignore this Windows Update dialog if it is seen during .NET Framework 3.5 or Visual Studio 2008 setup.  However, the readme is not always easily found by end users, and this issue can potentially happen for any application that includes the .NET Framework 3.5 setup as a prerequisite on Windows Vista or during unattended deployment of the .NET Framework 3.5.

    You can programatically prevent this dialog from appearing when deploying the .NET Framework 3.5.  This logic can be included in the script used for unattended deployment or within a setup process that includes the .NET Framework 3.5 as a prerequisite.

    Use Windows Update Agent (WUA) APIs to pause the Windows Update service

    To implement this solution, whatever script or process you are using to launch the .NET Framework 3.5 setup will use the Pause and Resume APIs on the IAutomaticUpdates interface in the Windows Update Agent (WUA) API set to temporarily pause and resume Windows Update functionality on the system.

    You can use steps like the following to accomplish this:

    1. Call the Pause API to pause the Windows Update service
    2. Install the .NET Framework 3.5
    3. Reboot the system if the .NET Framework 3.5 setup returns exit code 3010
    4. Call the Resume API to resume the Windows Update service if the .NET Framework 3.5 setup does not return 3010

    If you call Pause without calling Resume, the operation will eventually time out (the default time out value is 8 hours).  Rebooting the system will also cause the Windows Update service to resume without needing to call the Resume method.

    <update date="12/13/2007"> Removing option suggesting that users disable the wuauserv service to workaround this issue.  Doing this can cause failures during .NET Framework 2.0 SP1 or 3.0 SP1 installation on Windows Vista and should not be used.  The valid workarounds are to ignore the reboot prompt or use the WUA Pause and Resume APIs </update>

     

  • Aaron Stebner's WebLog

    How to work around product key issue with new Visual Studio 2008 silent switches

    • 2 Comments

    I previously wrote a blog post describing some new silent install switches that have been introduced in Visual Studio 2008 setup.  Unfortunately, an issue was recently found with these switches that can cause installation to fail.

    To summarize the issue, if you attempt to use the /q and /full switches for Visual Studio 2008 setup, and the copy of Visual Studio 2008 that is being installed is not configured to have a pre-populated product key, then setup will fail during the CA_SetPidProps custom action that runs as a part of the main vs_setup.msi.

    There are a couple of options that will allow you to work around this issue:

    Option 1 - Pass the product key via command line when running setup

    You can provide an additional command line parameter to the Visual Studio 2008 setup.exe to specify the product code that will be used during installation.  The command line will look like the following:

    <VS install location>\setup\setup.exe /q /msipassthru=BEGIN" PIDKEY=xxxxxxxxxxxxxxxxxxxxxxxxx "END

    You need to replace xxxxxxxxxxxxxxxxxxxxxxxxx in the above example command line with the actual 25-character product key for your copy of Visual Studio 2008 with no dashes included.

    Option 2 - Add a pre-populated product key to the VS setup data file

    You can use the following steps to add a product key to the appropriate Visual Studio 2008 setup data file in order to cause the key to be automatically pre-populated during unattended Visual Studio 2008 setup:

    1. Copy the VS installation files to a location that you have write permission to
    2. Open the file <VS install location>\setup\setup.sdb in a text editor such as Notepad
    3. Go to the end of the file and locate the section named [Product Key]
    4. Press enter and add the product key to the line immediately after [Product Key] so it looks like the following:

      [Product Key]
      xxxxxxxxxxxxxxxxxxxxxxxxx
    5. Save and close setup.sdb
    6. Run <VS install location>\setup\setup.exe /q to install silently and have setup use the product key specified in setup.sdb

    You need to replace xxxxxxxxxxxxxxxxxxxxxxxxx in step 4 above with the actual 25-character product key for your copy of Visual Studio 2008 with no dashes included.  You do not need to modify setup.sdb if you already see a 25-character product key listed in this file.

  • Aaron Stebner's WebLog

    Forum that can be used to report EPG data issues for Windows Vista Media Center

    • 2 Comments

    A while back, I posted some links to EPG data error reporting sites for Windows XP Media Center Edition (here and here).  Recently, I have heard from a couple of folks who have had trouble reporting EPG issues for Windows Vista Media Center using these sites.

    The Windows Media Center team is aware of these submission issues and is working on getting them fixed.  In the meantime, you can use the forum at http://thegreenbutton.com/forums/90/ShowForum.aspx to report EPG data issues for Windows Vista Media Center.

    If you use this forum, please make sure to use the template that is listed in the post pinned to the top of this forum (also located at this link - http://thegreenbutton.com/forums/thread/201523.aspx).

  • Aaron Stebner's WebLog

    Updated version of the .NET Framework verification tool now available

    • 6 Comments

    I have posted an updated version of the .NET Framework setup verification tool this weekend.  It contains the following changes:

    1. Some false positives were being reported when verifying the .NET Framework 1.1 on Windows Vista.  Previously, the tool would report that 12 files with incorrect version information and the overall verification process would state that it failed.  I investigated these issues on a couple of Windows Vista systems and found that they were not valid failures, so I updated the data file for the .NET Framework 1.1 so the verification tool will check the file versions for these 12 files but will no longer verify the exact checksums.
    2. I fixed a couple of bugs that prevented the tool from working correctly in a couple of silent install scenarios.  As a reminder, the supported silent install switches are described in this blog post.
    3. I updated the tool so that it will return error codes indicating failure instead of a return code of 0 (which typically indicates success) if an invalid combination of command line parameters is passed in.  Previously, passing in an invalid product name or invalid language when running the tool in silent mode would cause it to incorrectly return 0.

    The .NET Framework setup verification tool has been updated at the same location it has previously been available at.  You can download an updated version from http://astebner.sts.winisp.net/Tools/netfx_setupverifier.zip.

  • Aaron Stebner's WebLog

    How to work around Visual Studio 2005 and 2008 unattended install bug related to Windows Installer 3.1

    • 20 Comments

    While helping an internal Microsoft team work on deployment scripts to install Visual Studio 2008 to the systems in their test lab, we found a bug in the VS 2005 and VS 2008 unattended setup logic that I wanted to describe here and provide a workaround for.

    Description of the issue

    If you are creating and using an unattended INI file to deploy VS 2005 or VS 2008, and the target system is Windows XP or Windows Server 2003 and has a version of Windows Installer that is newer than version 3.1.4000.2435, then setup will incorrectly attempt to install Windows Installer 3.1 even though a later version is already on the system, and then eventually setup will fail silently.

    For reference, VS 2005 and VS 2008 setup look at the file version of the file %windir%\system32\msi.dll to determine what version of Windows Installer is present on the system.

    How to work around the issue

    If you are running into this scenario while deploying VS 2005 and/or VS 2008, you can use the following steps to work around this issue:

    1. Launch Visual Studio 2005 or 2008 setup by running <VS install location>\setup\setup.exe /createunattend vs_unattend.ini
    2. Select the components that you want to install in the VS 2005 or 2008 setup feature tree and save the INI file
    3. Open the INI file in a text editor such as Notepad
    4. Locate the [PreInstallOrder] section and remove the line gfn_mid windows installer 3.1
    5. Locate the [InstallOrder] section and remove the line gfn_mid windows installer 3.1
    6. Locate the [PostInstallOrder] section and remove the line gfn_mid windows installer 3.1
    7. Locate the [gfn_mid windows installer 3.1] section and change the line that says InstallActionInteger=5 to say InstallActionInteger=1
    8. Save and close the INI file
    9. Run <VS install location>\setup\setup.exe /unattendfile vs_unattend.ini

    One additional note - if you are using the new silent install switches (/q and /full) to deploy VS 2008 instead of creating an INI file, then you will not see this behavior, even if you have a version of Windows Installer that is newer than 3.1.4000.2435 installed on your system.

    <update date="2/4/2008"> This issue affects both VS 2005 and VS 2008, so I updated the text to indicate that it can happen for either product family. </update>

     

  • Aaron Stebner's WebLog

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

    • 65 Comments

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

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

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

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

    How to work around this issue

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

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

    More details about the root cause of this issue

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

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

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

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

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

Page 1 of 1 (20 items)