Visual Studio Setup
Installation and containerization of the Visual Studio family of products
Latest posts
Configure Visual Studio across your organization with .vsconfig
Add a .vsconfig file to your solution root directory to configure Visual Studio consistently across your organization.
Older versions of Visual Studio 2017 will not install in Windows Server 2019 containers
If you try to install Build Tools for Visual Studio 2017 into a Windows Server 2019 or newer container image, such as or , the install will quickly terminate without error and without installing anything. This is due, in part, to changes to the Windows Server container image to reduce size and improve startup performance. To install into Windows Server Core 2019 or newer, please download Visual Studio 2017 version 15.9 or newer, including Visual Studio 2019 Preview 1. Note: all previous Windows container images are now available in the Microsoft Container Registry (MCR), and all new container images includ...
Workaround for 0x8007007e when trying to to locate an instance of Visual Studio
We are investigating how a particular rare problem occurs that can prevent clients like VSIXInstaller.exe, vswhere.exe, and others from finding any Visual Studio instance that results in an error similar to the following: This is the CLSID for the Visual Studio Installer query API, and despite being registered the COM server DLL is missing. Workaround The easiest way to work around this problem is to repair any instance of Visual Studio. Warning: this will reset your Visual Studio settings: Along with resetting your Visual Studio settings, this can take quite a while to complete. A faster wa...
Docker recipes available for Visual Studio Build Tools
Use or contribute your own Dockerfiles on GitHub to help others build similar workloads with Visual Studio Build Tools.
No container image for Build Tools for Visual Studio 2017
The size and permutations of Build Tools 2017 container images are too great to publish official images, but here's how you can create your own tailored images.
vswhere now supports -utf8 to override console code page
You can now force vswhere to output JSON using the UTF-8 encoding.
Updated documentation for Visual Studio Build Tools container
The .NET Framework may not be correctly installed into a Windows Server Core container, and managed code - like the compilers - may fail. The documentation was updated with how to work around this.
vswhere now supports -requiresAny to find instances with one or more components installed
You can now use -requiresAny with vswhere to specify that any component ID passed to -requires will satisfy the query.
Set both x86 and x64 registry views for custom setup policy
Due to a bug in older versions of Visual Studio 2017, you should set the CachePath policy in both 32- and 64-bit views of the registry.
How to install Builds Tools in a Docker container
Preview new documentation for how to install Build Tools for Visual Studio 2017 into a Docker container.
New vswhere: now with more properties!
Read about all the new properties output by vswhere.
Installing Build Tools for Visual Studio 2017 in a Docker container
Follow this guidance to install Build Tools for Visual Studio 2017 into a Docker container and save the image for later.
Cleaning up corrupt Visual Studio instances
When older versions of Visual Studio 2017 report an error about not being able to load the instance, follow these instructions to clean up corrupt instances and re-install.
vswhere version 2.0 released
A new major version of vswhere is released with the breaking change to filter out preview releases by default.
Disabling or moving the Visual Studio 2017 package cache is now generally available
With the release of Visual Studio 2017 version 15.2, the ability to disable or move the package cache is now generally available and documented. Basically, payloads are removed after being installed or repaired, and we will download them again if ever needed (like when repairing the product instance). This does mean if you work offline and need to repair you will need to re-connect to the internet or from wherever you installed Visual Studio (like a network layout). See our release notes for more information about what's new in 15.2 and download today!
Documentation now live for moving or disabling the package cache
I previously wrote about moving or disabling the package cache for Visual Studio 2017, which is a feature in the latest preview of Visual Studio 2017 and will be generally available update 15.2 is released. We have now published the documentation along with related material for administrators or developers looking to take more control of their installations, including: If you're in the Preview channel please give the no-cache policy and send us feedback using the Feedback tool. If you're not in the Preview channel and interested in trying features early, please visit https://www.visualstudio.com/vs/pr...
vswhere is now installed with Visual Studio 2017
Starting in the latest preview release of Visual Studio version 15.2 (26418.1-Preview), you can now find vswhere installed in "%ProgramFiles(x86)%\Microsoft Visual Studio\Installer" (on 32-bit operating systems before Windows 10, you should use "%ProgramFiles%\Microsoft Visual Studio\Installer"). While I initially made vswhere.exe available via NuGet and Chocolatey for easy acquisition, some projects do not use package managers nor do most projects want to commit binaries to a git repository (since each version with little compression would be downloaded to every repo without a filter like git LFS). So starting...
Cleaning up the Visual Studio 2017 package cache
With the ability to disable or move the package cache for Visual Studio 2017 and other products installed with the new installer, packages are removed for whatever instance(s) you are installing, modifying, or repairing. If you have a lot of instances and want to clean all of them up easily from the command line - perhaps scripting it for users in an organization - you can combine tools such as vswhere or the VSSetup PowerShell module with the installer at %ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vs_installer.exe. Batch script with vswhere You can get the installation path for all instances and ...
Moving or disabling the package cache for Visual Studio 2017
In the latest preview release of Visual Studio we are introducing the ability to disable (or re-enable) the package cache, or move it to another drive. This can be done using the command line or the registry, which can be deployed on a domain using group policy. This will be generally available in Visual Studio in a few weeks - scheduled for the 15.2 update - but we want to give you a preview and collect feedback on the feature. Command line If you pass to the installer - even if just starting the installer - the cache policy is set to disable caching of packages, and any modification or repair of an instance wi...
vswhere now searches older versions of Visual Studio
One of the top requests I kept hearing for vswhere was to also search older versions of Visual Studio. You can now do that starting with the latest release. Even if you don't have Visual Studio 2017 or newer installed - which means the query API is not even registered - you can use vswhere to find the installation root directory for Visual Studio 2010 and newer. There are some caveats: All the other vswhere parameters that control the output format and selection still work. For example, if you wanted to find the path to the latest version of Visual Studio 2010 through Visual Studio 2014. O...
Fast acquisition of vswhere
I introduced vswhere last week as an easy means to locate Visual Studio 2017 and newer, along with other products installed with our new installer that provides faster downloads and installs - even for full installs (which has roughly doubled in size with lots of new third-party content). vswhere was designed to be a fast, small, single-file executable you could download and even redistribute in a build pipeline or for other uses. To make this easy to acquire, I've published both a NuGet package and made vswhere available via Chocolatey. [code gutter="false"]choco install vswhere vswhere -latest -products * -re...
vswhere Available
After feedback on the VSSetup PowerShell module to query Visual Studio 2017 and related products, I'm pleased to say that a native, single-file executable is available on GitHub: vswhere. The VSSetup PowerShell module is also available on GitHub and provides a number of benefits for PowerShell scripts, but build tools and CMake and deployment scripts wanted a simple executable they could redistribute without spawning PowerShell. You can enumerate instances with optional demands on which products, workloads, and components; and on which versions you require. Results can be printed in a variety of formats - curren...
Visual Studio Setup PowerShell Module Available
To make the new setup configuration APIs more accessible to developers, we have published the "VSSetup" PowerShell module on powershellgallery.com, making it quick and easy to install. If you have Windows Management Framework (WMF) 5.0 or newer - installed with Windows 10 - or PowerShellGet for PowerShell 3.0 or 4.0, you can run the following from even an unelevated PowerShell host: You can also install for all users if you leave off the parameter entirely. You can also download and extract a ZIP archive from our Releases page on the project page. After installing, you can quickly enumerate all launchable ins...
Documentation available for the Setup Configuration API
Visual Studio 2017 has brought big changes to extensibility that allow developers to install extensions to different instances and install dependencies. In support of multiple instances, a fast API was required that tools can use to find and launch Visual Studio and related tools, or to install extensions. I previously published some samples, and now documentation for these APIs is available. The documentation is based on the runtime-callable wrapper (RCW) - the .NET interop assemblies - for the native configuration API. The main difference is that the native API will return an while the RCW will throw a where...
Changes to Visual Studio “15” Setup
We've listened to feedback over the years, and while each new release brought changes to the setup experience of Visual Studio and related products, none have been more significant than what we're doing for Visual Studio "15". New setup engine With Visual Studio supporting so many platforms and toolkits, one of the goals for Visual Studio "15" is to provide choice and install just what you need. To make it easier for our partners to author component packages for Visual Studio while making sure you get all the required components, an underlying engine needs to provide granularity and cohesion with dependencies. Ex...
Insert GUIDs directly into Visual Studio Code
Let me preface this by stating I love Visual Studio Code! While I think its big, older brother Visual Studio is great for large solutions or even small projects where project files are managed automatically by the IDE, Code work great for small, loose projects and is very fast. I still use Vim for a lot of quick edits in a console (I spend a lot of time in powershell.exe even when using Visual Studio for development) but Code has quickly been filling that niche for source code in various languages. But when frequently having to author GUIDs for something-or-other, my routine of generating GUIDs in different form...
Get the Windows Installer PowerShell Module easier with WMF 5.0
Many years ago when PowerShell was first in beta, I saw an opportunity to write cmdlets that I could string together in different ways rather than writing and maintaining a bunch of one-off Windows scripts for various day-to-day tasks and customer diagnostics. I created the Windows Installer PowerShell Module to fill that role. These cmdlets are now used heavily in many tasks internally and, I hope, in the wild.Fast-forward to today – with the release of the Windows Management Framework 5.0, which includes PowerShell and a host of other great administrative features – you can get new versions of the m...
Failure when upgrading from VS2015 RTM to VS2015 with Update 1
If you have Visual Studio 2015 RTM installed and attempt to install Visual Studio 2015 with Update 1, you may see a failure like the screenshot that reads, KB3022398 This action is only valid for products that are currently installed. This is a fatal error that occurs when upgrading from VS 2015 RTM to the VS 2015 slipstream release. The slipsteram is RTM + VSU1 merged together for a faster install – especially for new customers wnated to install the latest VS2015. Solution If you encounter this error, you need only repair the product and setup will continue normally. Descrip...
Removing Visual Studio components left behind after an uninstall
When you install Visual Studio and related content like Windows Kits or some add-ons, most packages that comprise those bundles are reference counted to make sure they are not removed prematurely. Uninstalling Visual Studio and related content should eventually remove those packages (i.e. last one out the door turns off the light). Contrast with older releases where almost everything was left installed because we couldn’t be sure which other products still required them.Some packages, however, do get left behind. Some are packages that do not participate in package ref-counting – often those that we d...
How to install Visual Studio to another directory when a pre-release is installed
If you’ve installed pre-release versions of Visual Studio – or even another edition of the same release – you may find you can’t change the installation target directory. This is because once a set of shared components is installed, we install all the other components to the same directory structure. When you have multiple editions installed, this save disk space since shared files occupy the same location on disk – not to mention results in faster install times since Windows Installer doesn’t copy the same bits again. And while we do support build-to-build upgrades, those shar...
Redirect the Package Cache using registry-based policy
Visual Studio can require a lot of space on the system drive, and previous methods of redirecting the Package Cache can be tricky for some people to set up or even maintain as junctions across volumes may be removed on boot. The cache is there for good reasons and has significantly reduced the failure rate, but for people with smaller system drives or partitions it can be a barrier. Deleting the cache directory in its entirety can also lead to problems. So a design change was made to the WiX setup chainer, Burn, to support setting a registry-based policy to redirect the cache to another partition. This registry ...
Visual Studio 2013 continuously repairs producing many small log files
If you have Microsoft Visual Studio 2013 Professional, Premium, or Ultimate editions installed and are finding many small MSI*.log files in your %TEMP% directory, you may find you are running low on disk space because of how many of these files are created. While they may only be about 3MB, what causes these files to be produced can do so often enough that it may not take long to fill up the drive where %TEMP% resides. Workaround We are consistently seeing this issue caused by a missing directory, C:\Windows\Microsoft.NET\Framework\URTInstall_GAC (or %SystemRoot%\Microsoft.NET\Framework\URTInstall_GAC). To work ...
Detection keys for Visual Studio 2015
Administrators and developers who need to detect whether Visual Studio 2015 is installed can use similar registry keys as with past releases. This time around, though, we’ve made some changes to the lineup of products but the registry scheme remains the same. Most of the detection keys are found in the 32-bit registry hive – the ones you’ll typically want to detect, anyway. Following is a table of the products we’ve announced. The biggest change to the detection keys is that Enterprise replaces Premium and Ultimate. Community is also a subset of Professional which is a subset of Enterprise, so if you yo...
Workaround for when Visual Studio Update says it doesn’t apply
I previously blogged about a problem some customers were running into that prevented Visual Studio Update from installing. You might see a dialog like the one to the right and an error message that read something like, Update 2 does not apply, or is blocked by another condition on your computer. At least for many people, they had an applicable Visual Studio installed. From the logs alone, however, we were unable to determine the root cause and certainly never ran into it during countless tests across not only the division but dogfooding across the company…until recently. One cause of this problem is when...
Workaround for when Visual Studio Update says it doesn’t apply
I previously blogged about a problem some customers were running into that prevented Visual Studio Update from installing. You might see a dialog like the one to the right and an error message that read something like, Update 2 does not apply, or is blocked by another condition on your computer. At least for many people, they had an applicable Visual Studio installed. From the logs alone, however, we were unable to determine the root cause and certainly never ran into it during countless tests across not only the division but dogfooding across the company…until recently. One cause of this problem is when the...
How to register your program for file extensions shared with other programs
One frequently asked question is, “how do we register our program for a file extension when other versions (or programs) that handle it might also be installed?” The overarching question is really about how to have non-shared resources both write to a shared resource. But in the case with the Windows registry and file associations in general, your file can only be associated with one program. That is, double-clicking on the file can only open one program unless some other intermediate system decides otherwise. Windows Vista introduced such a system. The Default Programs feature - which includes ...
Visual Studio 2010 uninstall utility back online
Four years ago I published a utility to help perform a clean uninstall of Visual Studio 2010. Before we added package reference counting and related bundles to Visual Studio setup, we couldn’t always be sure which products were still required so not everything was removed. This utility will remove everything provided one of a few command line options documented in the original article.Unfortunately, the old site where the utility was hosted was archived and some readers recently pointed this out. I’ve since reposted the utility on the Microsoft Download Center and created a short URL (https://aka.ms/v...
Seeing colors with psake
Psake (pronounced like Japanese “sake”) is a build automation tool similar to others out there like make, rake, etc., but built using PowerShell as the language of choice. So it should be no surprise that I use it for my Windows Installer PowerShell Module. It’s useful for automating tasks not limited to just calling MSBuild, but also my PowerShell Help compiler (which loads the module in a separate process, thus allowing me to keep building in the same PowerShell host process), and selected tests with MSTest. When tests fail (and when practicing TDD they often do), it can be hard to identify wh...
Update does not apply or is blocked by another condition on your computer
We have investigated reports of some installs of Visual Studio 2013 Update 2 reporting that no applicable updates are available even when VS2013 is installed. We have been unable to reproduce the cause in our labs and besides offering a workaround, we would like to ask for your assistance if you can reproduce the problem in the specific scenario described below. Problem When trying to install V2013 Update 2, you may see an error that reads, Update 2 does not apply, or is blocked by another condition on your computer. This is the result of either not having a qualifying product like Visual Studio 2013 Professi...
Incorrect hash value when installing Visual Studio 2013 Update 2
Visual Studio 2013 Update 2 RC introduces some cool new features and adds an option to slipstream the install of VS2013 RTM with Update 2 RC, but some attempts to download it have had the following problem. Problem When installing VS2013 Update 2 you see the error or warning message, “The hash value is not correct.” This will show up as either an error or a warning depending on the package. If you open the log file by clicking on the link in the Finish page, you may see an error like the following, [1543:4DC8][2014-04-03T13:05:00]e000: Error 0x80091007: Hash mismatch for path: C:\ProgramData\Package Cache\....
Error in installation log for Visual Studio 2013 Update 2 RC can be misleading
Given many of the exciting announcements and features demonstrated recently at Build 2014, customers are downloading Visual Studio 2013 Update 2 RC. This update is quite a bit bigger than VS2013 Update 1 since it contains many new features. A small number of customers, however, are experiencing problems installing VS2013.2 RC. Symptoms While specific symptoms vary, some customers see an error dialog almost immediately or they see warnings after installation completes successfully. In these cases, customers have spotted the following error in the bundle installation log: [1543:4DC8][2014-04-09T12:00:30]e000: Er...
How to relocate the Package Cache
Visual Studio can require a lot of space on the system drive. Based on years of data collected from customers’ installations from the Customer Experience Improvement Program, we took advantage of this feature in Burn – the Windows Installer XML (WiX) chainer – to eliminate most errors during repair, servicing, and even uninstall. This was not a popular decision with some customers. For years even I pushed against caching Visual Studio deployment packages because of the impact to drive space as well, but as HDD space increased market studies showed little reason not to cache for the increased reliability of deploy...
Upgrading Visual Studio 2013 Update to a newer Update may be slow
Our first public release of Visual Studio Update for Microsoft Visual Studio 2013 is available. There are, however, a couple of known issues in hopefully uncommon scenarios. Fixed We have fixed this in future versions of Visual Studio Update. This post is kept for historical reasons should any users have problems upgrading from pre-release versions of Visual Studio 2013 Update 1 to the final release bits of VSUpdate 1. Technically, this was fixed for VSUpdate 1 RTM, but the fix has to be in the release getting upgraded, so going from VSUpdate 1 RTM to any future CTP or release bits will not exhibit this prob...
Uninstalling Visual Studio 2013 with VSUpdate error: Element not found
Our first public release of Visual Studio Update for Microsoft Visual Studio 2013 is available. There are, however, a couple of known issues in hopefully uncommon scenarios. Symptom If you attempt to uninstall Visual Studio 2013 after VSUpdate has been installed, you may see an error after a while that reads “Element not found.” VS2013 may not be completely uninstalled from your machine. Workaround Try uninstalling VS2013 again from Programs and Features. This should completely uninstall all but a few packages (like the .NET Framework and any other packages shared with other bundles) from your machine. More ...
Visual Studio 2013 shortcuts in Windows 8.1
Windows 8.1 made a change for RTM – as some MSDN Subscribers might’ve noticed – where newly installed applications’ shortcuts are not immediately visible on the Start menu. They are still installed and indexed, but you need to either swipe down on your touch screen or click the down arrow as shown below. On the Start menu, you can also just begin typing. Application shortcuts – along with files and settings – are displayed matching the text you typed. Just start typing “Visual Studio” and you’ll see a list of applications you can launch. This behavior is the same for modern and desktop applications, put...
Windows Installer PowerShell Module 2.2.1 Released
Yesterday I released servicing update 2.2.1, which updates 2.2.0 to fix a few bugs and add a few cool new features: Version-specific documentation has been added, but the most significant change to the documentation is the complete overhaul of the examples. Apart from removing some old examples using deprecated functionality, I organized the examples into different subsections (on separate pages) based on what sort of actions you'd like to perform. You can suggest any other examples you would like to see - or any other questions or comments - on the discussion tab.
Windows Installer PowerShell Module 2.2.0 Released
Years ago I released PowerShell cmdlets (“command-lets”) that make querying product and patch information easy and robust. Windows PowerShell is a powerful shell that pipes objects – not simply text – and provides full access to the .NET Framework as part of the language (though higher-level constructs are most often better). Earlier this week I released a new version – version 2.2.0 - of my Windows Installer PowerShell module with great new cmdlets as well as some bug fixes. I’ll be posting more examples online, but have included a few below to give you an idea of what you can do and how they work seamlessly wi...
Visual Studio 2012 Update 1 has Released
To provide incremental value to our customers, we have released Visual Studio Update 1 and will be notifying all Visual Studio 2012 customers via toast notifications (like you get for VS package updates) soon.Soma’s blog has more information on VSUpdate in general, as well as some of the features you can expect. And check out Brian’s blog for links to more detailed information about the changes made for TFS.
Visual Studio 2012 Update 1 CTP3 is Available
Visual Studio 2012 Update (VSUpdate) is our way of delivering fixes and, in some cases, new features to our VS2012 customers. The latest Community Technical Preview (CTP) is available for download now.See the ALM and TFS blog post for more information.
Windows Installer XML (WiX) v3.6 Released
The Windows Installer XML (WiX) team has released version 3.6 which, most notably, released a powerful and customizable chainer named Burn. The Visual Studio 2012 setup applications were built on Burn using features such as package caching, reference counting, and sticky patching to improve the overall experience from past releases.Head on over to Rob’s blog post for more information about all the features introduced and improved in WiX v3.6 as well as background information on how we achieved such an important release for WiX.Updated: Corrected typo.
Visual Studio 2012 RTM will not install on pre-release versions of Windows 8
SymptomCustomers installing Visual Studio 2012 RTM on pre-release versions of Windows 8 or Windows Server 2012 may see the following error after launching the setup application: The .Net Framework installed on this machine does not meet the minimum required version: 4.5.50709. This is a blocking error and only allows the install to be canceled.CauseVisual Studio 2012 RTM is not supported on pre-release versions of Windows 8 or Windows Server 2012.ResolutionTo install Visual Studio 2012 RTM, you will need to install it on Windows 7 SP1, Server 2008 R2 SP1, or install VS2012 RTM on Windows 8 or Server 2012 RTM...
Visual Studio 2012 can only install to certified Windows To Go drives
Windows To Go is a cool new enterprise features to enable a mobile workforce to carry around an enterprise-managed installation of Windows on a USB thumb drive. However, only certified thumb drives appear as fixed drives and, therefore, Visual Studio 2012 can only install to certified drives. VS2012, like some other products, only supports installing to fixed drives because removable drives can be ejected and VS will not work correctly. If you install Windows To Go (aka WTG or W2G) on a non-certified drive then boot to it and attempt to install VS2012 – or even try to install VS2012 to a separate removable drive...
A certificate chain could not be built to a trusted root authority
This was a preview of a Knowledge Base article which has been published as KB2746268.SymptomAfter Visual Studio 2012 has been installed, the finish page displays the following: Setup Completed However, not all features installed correctly. Please correct the following problems to ensure full product functionality. Click here to see the most common issues and workarounds or here to review the log file. Microsoft Web Deploy 3.0 A certificate chain could not be built to a trust root authority. If you click to view the log file and search for “Error”, you will see log lines similar to the following: [05B0...
Upgrading from Visual Studio 2012 RC to RTM
Now that Visual Studio 2012 and .NET Framework 4.5 have been released, some customers are wondering if they need to uninstall the Visual Studio 2012 Release Candidate (RC) first before upgraded. In general, the answer is “no”. VS2012 RC will upgrade to RTM, but there are a few things to note: For more information about compatibility, see our compatibility page on the Visual Studio website.If you need to uninstall VS2012 RC, we have posted instructions to KB2744926. For the most part, you only need to remove the main program entry in Programs and Features. While we have done a lot to reduce ...
Detection keys for Visual Studio 2012
Administrators and developers who need to detect if Visual Studio 2012 is installed on a machine can use similar keys as those used for past releases like Visual Studio 2010. In general, these detection keys are always found in the 32-bit registry hive with a pattern like: So if you needed to detect if VS2012 Ultimate is installed, you can check if the “Install” registry value is set (will always be a REG_DWORD with data set to 1) in the following language-independent registry key: What has changed from previous releases like VS2010 is that Ultimate contains the Professional and Premium edit...
How Visual Studio 2012 Avoids Prompts for Source
Requiring source packages during installation, repairs, and even uninstall are common occurrences for some customers. The core issue is that Windows Installer needs the source location of the package and its files to install - and can't find them automatically - when attempting to restore the machine to the state it should be in (according to that package and any patches applied to it). When the WiX community was developing Burn - the chainer that is part of the toolset in v3.6 - we knew this was a common problem for any Windows Installer-based deployment. So we implemented package caching which copies all ins...
Easier Authoring for Slipstreaming Patches
Slipstreaming Windows Installer patches is, technically, installing the MSP simultaneously with the MSI as a single transaction. This is, effectively: The applicable transforms (both the authoring changes and patch transforms) are applied to the MSI and the MSI is installed with those changes from the start. Both the MSI and MSP are cached in the Windows Installer cache. The slipstreamed MSP(s) can even be removed later if desired (unlike admin patching). WiX v3.6 has supported this for a while in the Burn engine using the following fragment: The problem with this syntax as your bundle grows in scale is that y...
New Revision of the July 2012 Update for Visual Studio 2012 RC
We have released a new revision of the July 2012 Update for VS2012 RC. This update replaces – or supersedes – the previous update, which means the download link is the same. We have retained the previous packages that VSUpdate installs – or chains – to support customers who may still require source packages when repairing Visual Studio 2012 RC or uninstalling VSUpdate RC.We have also updated the previous KB2703187 article with the changes made in this re-release.Should you have any problems installing the new revision July 2012 Update for Visual Studio 2012 on RC (v11.0.50522.1) please dow...
July 2012 Update for Visual Studio 2012 RC
A few months ago we introduced a new method of delivering updates to Visual Studio 2012. Today we published updates in the same manner for Visual Studio 2012 Release Candidates.You can download the July 2012 update (KB2703187) for VS2012 RC from http://go.microsoft.com/fwlink/?LinkID=257044. More information about this update is available at http://support.microsoft.com/kb/2703187.As with Visual Studio 11 Beta, you will also be notified via Extension Manager. We did, however, make a change for RC to check for updates periodically. This will improve the end-to-end experience for VS updates.As always, we’d lo...
How to fix “Invalid License Data” after upgrading from Visual Studio 2012 Beta to RC
A few customers have reported the following error after upgrading from VS2012 Beta to the Release Candidate (RC): Invalid License Data Reinstall is required. Aaron Marten on the Visual Studio Extensibility team has a post describing how to fix this issue. This should only happen if you upgrade a “higher” Beta edition to a “lower” RC edition, like from VS11 Ultimate Beta to VS2012 Professional RC. You may avoid this issue if you haven’t yet installed the RC by upgrading to the same or “higher” edition than you installed for the Beta (i.e. Professional < Premium < U...
Announcing Windows Installer XML v3.6 Release Candidate
On a day of many great Release Candidate (RC) announcements, I should not forget another important RC milestone: Windows Installer XML (WiX) v3.6 RC.We’ve made a lot of improvements, simplified some scenarios, and fixed a lot of bugs. Download v3.6 RC and give it a try and let us know if you find any other issues.
Announcing Visual Studio 2012 Release Candidate
Microsoft Visual Studio 2012 Release Candidate (RC) – formerly known as Visual Studio 11 – is now available for download! Jason Zander’s blog has a lot of great information on all the exciting changes we have made, including improvements to setup. I encourage you to download and give VS2012 RC a try. Should you find any issues with setup, please be sure to to download and run our log collection utility. You can then find help through the following channels for setup: For general feedback or to file bugs for Visual Studio itself, look to the bottom of Jason’s blog post for a wealth of r...
Visual Studio 11 Beta Updates
Today we announced a new method of delivering updates using a notification system many Visual Studio developers should be familiar with: the Visual Studio Extension Manager. Developers will now be notified in Visual Studio when updates are available.When the notification balloon is clicked, Extension Manager will open to a new node: Product Updates. Clicking the Update button will download the update so you can run it.The update is also available on the Download Center and you can read more about what’s included for the Beta Update in KB2677574.We’d love to hear your feedback on the Visual Studio blog...
Why Visual Studio 11 Requires Space on the System Drive
Users have asked why space is required on the system drive (typically the C: drive) when they choose to install Visual Studio 11 to another drive.While Visual Studio 11 does allow you to install the majority of features to another drive, VS11 still requires space on the system drive for the following reasons: For Visual Studio 11 Ultimate Beta, about 45% of the entire installation is located on the other drive. We are working to improve that experience but significant drive space will still be required on the system drive for those reasons above.If you have significant disk space available, I recom...
Packaging Caching in Burn
There are times when repairing or servicing a product that source media is required. As more product installs move to web-based installs, these prompts for source are harder to solve. In order to replace missing, corrupted, or older files, the source is required because those files have to come from somewhere.Burn, the bootstrapper application in the Windows Installer XML toolset, aims to solve that by caching setup packages on disk – specifically in %ProgramData% or %LocalAppData% depending on whether a package is installed per-machine or per-user, respectively. Whenever a user repairs a bundle, the cached...
Announcing Visual Studio 11 Beta
Along with the release of the Windows 8 Consumer Preview, we have released Visual Studio 11 Beta and Jason Zander has announced many of the great new and improved features in VS11 Beta. We have also introduced a new setup experience with VS11. Setup is built atop Burn, the Windows Installer XML engine, as well as the managed bootstrapper application (MBA) interoperability layer. This means that setup supports many of the features of Burn including package ref-counting, creating layouts for later installs, and build to build upgrades. We will highlight these features of setup more in our team blog. If anyone ...
Introducing Sticky Patching and Add-ons
Late last week I checked in a feature for Windows Installer XML’s (WiX) chainer, Burn, that I’m really excited about (ask my colleagues): sticky patching.This is a feature at the bundle (what we call our composition of packages for Burn) level that supports related bundles of type “Patch” and “Addon”. Whenever you install a new bundle, if there are any of those related bundles already on the machine, they are automatically re-installed (efficiently) at the end of the chain (the sequence of packages in the bundle).“Patch” and “Addon” related bundles will ...
Introducing Package Reference Counting
These days it’s more common to install products composed of more than one installer package. Modern applications are often a loose fitting of localized components and being authored into a single package just isn’t practical.For example, a localized application will undoubtedly have neutral or single-language binaries while using satellite resources for other languages’ resources. You could package these common binaries into separate fully-localized installer packages – one for each language – but that will lead to all sorts of problems with shared components.Having separate packages...
Introducing Managed Bootstrapper Applications
Now that WiX v3.6 has been released, I introduce the managed bootstrapper application (MBA) interoperability layer. It’s been available for a while actually, and if you’ve installed any builds of WiX v3.6, or the Microsoft Visual Studio 11.0 Developer Preview you’ve seen it in action. While Burn – the WiX bootstrapper engine – and the core bootstrapper application interfaces are native and allow you to develop completely native bootstrapper applications, MBA allows managed code developers to utilize their skills to develop rich interactive setups. WPF designers can also utilize their skills to make the setup U...
Installing across network may slow Visual Studio 2010 and Service Pack 1 setup
If you are installing Visual Studio 2010 or Visual Studio 2010 Service Pack 1 from across the network and are experiencing slow install times, this could be caused by low network bandwidth and long verification times.How to work around this issueFor Visual Studio 2010 RTM, copy the entire contents of the network directory locally. This directory contains setup.exe and folders like WCU. After all the files have been copied, run setup.exe as you would normally. When possible, you might also install from an ISO (if burning to DVD, please verify the download and burn results) or a web bootstrapper which should not ex...
Visual C++ 2010 SP1 Compiler Update for the Windows SDK 7.1
After installing Visual Studio 2010 Service Pack 1, some users were unable to use the x64 or IA64 compilers from the Windows SDK 7.1. Now the Visual C++ team has released an update for VS2010 SP1 available here. For more information about the update, please see KB2519277 on the Microsoft Support site.You can install the update to fix existing installations, but if you have not yet installed Visual Studio 2010 SP1 the recommended install order is, Please visit the Visual C++ team blog for more information or questions.
Verify the ISO checksum for Visual Studio 2010 Service Pack 1 before installing
While we recommend installing Visual Studio 2010 SP1 using the web download – which only downloads and install those packages needed on your machine – you can also download an ISO for offline use. If you downloaded the ISO for VS2010 SP1 from the Microsoft Download Center or from MSDN Subscriber Downloads, please verify the checksum for the ISO before you install. This can help prevent issues when installing SP1.The checksums follow. To verify the SHA1 hash of the ISO, you can download the File Checksum Integrity Verifier (fciv.exe) described in KB841290. Installing the package will prompt wher...
Installing Visual Studio 2010 RTM and Service Pack 1 together
Now that Visual Studio 2010 SP1 has been released, administrators and developers may wish to install both RTM and SP1 together for a seamless experience. With the release of VS2010 RTM we already published the Visual Studio Administrator Guide that documents a lot of the instructions I’ll utilize below. I encourage you to review that before proceeding with the following instructions, particularly how to avoid restarts during setup by pre-installing certain packages like Windows Installer 4.5 and .NET Framework 4.0. How to: Create and run an unattended Visual Studio with SP1 setup You’ll create a distr...
Installing Visual Studio 2010 Service Pack 1 may prompt for source
Some users are reporting that when installing Visual Studio 2010 SP1 they are prompted for MSI files as shown in the following example screenshot. These prompts for source are most common during rollback on failed install attempts and uninstall since original RTM files need to be put back on the machine and may not have been cached by Windows Installer. This includes, but is not limited to, the following MSI files. I will update this list of files customers are commonly seeing as I’m made aware. If you are seeing this with other MSI files when installing VS2010 SP1, please comment below. How to wor...
Visual Studio 2010 Service Pack 1 has shipped
As announced in Soma’s blog post, Visual Studio 2010 SP1 has been released to MSDN subscribers today and will release to the general public on Thursday, March 10th.We have made a number of significant changes in Visual Studio 2010 SP1 from past releases we hope will make deployment smoother for both developers and administrators alike. And while we hope you’ll notice a better development experience with SP1 installed, should you ever need to uninstall it we now provide a single method to do so. In Add/Remove Programs, you can select Microsoft Visual Studio 2010 Service Pack 1 and cl...
Visual Studio 2010 Service Pack 1 installing for over 2 hours could be a sign of a problem
On average customers are experience ~45 minute installs for Visual Studio 2010 SP1. Based on machine performance, even seeing install times of a little over an hour isn’t unexpected. But if VS2010 SP1 is taking more than a couple hours to install, there could be a problem and in the case described below requires user action.Description of the issueIf Visual Studio 2010 SP1 is taking more than a couple of hours to install, it may be stuck in a loop waiting for the user to cancel the current operation. To determine if this is the case, If you find that text in the temporary log file, pl...
A patch may take as long or longer to install than the target product
Often I’m asked why installing a Windows Installer patch (MSP) takes as long or longer to install than the target product (MSI). While this isn’t always the case for every patch, it’s certainly possible for a number of reasons. It may also come as a surprise that the size of the patch can have little to do with the time to install the patch.Several copies of the patch may be createdWhen you install a Windows Installer package, many copies of either the MSI or MSP package are created. But even before you start an installation, a bootstrap application will often download or copy the package locall...
Providing feedback on Visual Studio 2010 Service Pack 1 Beta installation
By installing Visual Studio 2010 SP1 Beta now (or tomorrow for general availability), you have a great opportunity to provide early feedback before we ship VS2010 SP1 RTM. Not only do we welcome feedback on the updates to the product such as the new Help Viewer, performance regressions, and more; but we also want to hear your feedback on the installation experience – especially if you’re running into installation problems.But before we can really help identify an installation issues and help you work around it – not to mention possible solutions for RTM – we need installation logs for the ...
Announcing Visual Studio 2010 Service Pack 1 Beta
If you haven’t seen from Soma’s or Jason’s blog, Visual Studio 2010 SP1 Beta is available today for MSDN Subscribers and will be available on Thursday for the general public. This service pack contains a lot of performance improvements and a new Help Viewer based on strong customer feedback. You can find out about more changes to the product in Jason’s blog post.This release also marks a change in the deployment experience to provide customers a single download to update any products already installed on their systems. While VS2010 SP1 Beta is available for ENU and JPN customers, SP1 RTM w...
Delete shadow copies to compact VHDs and AVHDs
For a few years my primary development machine has actually been a VM with source located on a physical hard drive attached to the VM. This helps reduce latency compared to a differencing disk (AVHD) which may need to expand to accommodate additional data (common when building). It’s also easier to maintain than multiple boot entries when booting to different AVHDs.But a couple of weeks ago I accidentally created a new source enlistment on my guest system drive – a series of differencing disks on top of a dynamic root disk (VHD). Not only did this expand to the limit of the virtual drive capacity, but...
Restart Manager functionality in WiX 3.5
WiX 3.5 provides features to integrate with Visual Studio 2005, 2008, and 2010. But like many add-ins, since new files are being added they certainly can’t be in use by devenv.exe. So when we call devenv.exe /setup as part of our install, the changes may not show up in running instances of Visual Studio. To provide a better experience – and because this seems to be a fairly common request – I’ve added a custom action in WiX 3.5’s WixUtilExtension to use the Restart Manager in Vista and newer. The Restart Manager is capable of shutting down applications – similar to the normal files-in-use functionality in Window...
Downgrading Shared Components
Shared components define shared resources. It might seem obvious, but it’s important to understand that whatever you do to a shared resource during the installation of one product affects those same resources for any other product. For example, when upgrading one product to update files shared with another product, that other product will use the newer resources such as versioned files. It’s important to test those interactions before you ship to make sure the products can work with newer resources – that the changes to those resources are backward compatible.By default, newer versioned files wi...
Comparison of PatchWiz and WiX v3 Patch Build
The Windows Installer SDK ships a library named patchwiz.dll. This contains the logic to build a patch from pairs of database packages (.msi files, or simply MSIs) along with other configuration properties. Another tool that the SDK ships is msimsp.exe which uses patchwiz.dll and parses command line options. These tools consume an input file with the same format as a database package but with a different set of tables. This is known as a PCP file (because of the .pcp extension).When we started planning a patch build system for Windows Installer XML (WiX), we considered building a new system that is completely und...
Visual Studio 2010 Uninstall Utility
While we hope you’ll love Visual Studio 2010 for all the application development it enables with powerful features and a robust extension model that enables great extensions like the Productivity Power Tools, if you ever need to uninstall Visual Studio it can be difficult. If you’ve ever tried to remove Visual Studio you already know this.But have a tool that can help for English installations: the Visual Studio 2010 Uninstall Utility.An excerpt from that page reads, Default (VS2010_Uninstall-RTM.ENU.exe) Uninstalls all top level products of 2010 release and its supporting components. This mode does n...
Customizing Shortcuts for Visual Studio
After installing the last several releases of Visual Studio, you’ll find shortcuts to command prompts that automatically set up the PATH, INCLUDE, LIB, and other environment variables. At least with Visual Studio 2010 these command prompts have larger buffers and enable quick edit mode, but some people like to customize these shortcuts to their liking.Since Visual Studio installs for all users, these shortcuts are protected and can only be edited by administrators. In Windows 7 you are simply prompted to elevate; however, in Windows Vista with UAC enabled, when you try to edit the shortcut you may see the f...
Detection keys for .NET Framework 4.0 and Visual Studio 2010
Now that Microsoft .NET Framework 4.0 and Visual Studio 2010 have been released, developers may wonder how to detect them on the system. As with previous releases, we support registry detection of either product family and Windows Installer component detection for Visual Studio. Detecting either product uses a separate set of supported keys. .NET Framework 4.0 The .NET Framework has and continues to use registry keys and values under . To detect .NET Framework 4.0, you can check if the following key is present and the value is set to 1. The core .NET Framework 4.0 package is English, so 1033 is always available....
Major Upgrades with Shared Components
Major upgrades are Windows Installer products that can be installed like any other product with the added benefit of removing one ore more related products. For example, version 2 of a product can be installed on a clean machine, or on a machine with version 1 already installed and will remove version 1.When another version of a product is removed depends on where you schedule RemoveExistingProducts. If you schedule the action late – either before or after InstallFinalize – shared components are a potential factor when developing your product installation. But before going into detail, let’s fir...
Testing for components that install under TARGETDIR
A while back I explained how Windows Installer sets the TARGETDIR property to the root of the fixed drive with the most free space available. The problem is that even an attached USB external drive can appear as a fixed drive, and these may be later detached. If components are installed to that drive and the drive is detached, repairing, patching, or even uninstalling the product may fail because the components are not available and cannot be updated or removed. This is also one potential reason Windows Installer may trigger a repair after a failed resiliency check. The problem is that this can be difficult to te...
Test your conditions
When testing the serviceability of your product before you ship, it’s important to test any conditions you might have on the product, features, components, and actions.Feature conditions can set the install level of a feature when the package is installed. But as the Condition table documentation states, be sure that the condition does not evaluate to False at any time after the feature is installed. Once the feature is installed, the condition is used merely to inform Windows Installer whether it is installed or not. If Windows Installer does not think the feature is installed locally, is will not reinstal...
Serviceability
It’s always important to test your product before it ships. Servicing it later can prove very costly and very difficult. It’s no different with your installation packages. You need to test not only basic install and uninstall operations, but also test your servicing plan. Problems are inevitable in practically any application, and you may even need to add in additional features. So test that you can before your product ships.Before testing your product deployment, you need to define and document what you will conceivably support. Many of the following options supported by Windows Installer are also su...
How to install local help content after installing Visual Studio 2010 RC
After the Visual Studio 2010 Release Candidate (RC) is installed, there is a button to install the documentation locally. If you have overlooked this option or chose not to install documentation locally and wish to do so later, you can follow these instructions. You can now browse selected documentation offline. Additional documentation is available online through the viewer or MSDN.
Verify ISO before burning or mounting Visual Studio 2010 RC
If you have downloaded the Visual Studio 2010 Release Candidate (RC) from MSDN or the Download Center as an ISO and are having problems installing it, it could be that either the ISO wasn’t downloaded correctly or that it wasn’t burnt to DVD correctly.On the installation error dialog, you will find a link to the installation log. You may find text like in the following example, The error -2147467259 (0x80004005) is a generic error that occurs when installation fails. The first log line may indicate that a package could not be verified because the file was missing, or the file was corrupt and digita...
Microsoft .NET Framework 4.0 RC and Visual Studio 2010 RC Available Now
Announced yesterday for MSDN subscribers, the Microsoft .NET Framework 4.0 and Visual Studio 2010 Release Candidates are available today for everyone to download.Feedback on VS2010 RC has been great, and we hope you agree. Feel free to provide feedback about your installation and development experience. Performance was a major focus for the RC from Beta 2 feedback and the changes are phenomenal.Another tremendous effort went into making .NET 4.0 deployment more manageable for our developers. The full installation for .NET 4.0 RC – for both x86 and x64 combined – is only 48 MB compared to .NET 3.5 SP1 ...
About Shared Components
Components are the basic unit of installation in a Windows Installer product. They are installed by one or more features, and can contain any number of resources including files, assemblies, registry values, and are recommended for custom resources as well. Examples of custom resources are web sites, virtual directories, SQL tables, and stored procedures.Components are identified in a product package using a unique ID, but the GUID is used to identify the component across all products on the machine. The unique ID is only scoped to the product. It is a primary key used in many foreign key relationships like in th...
WoW64 is optional in Windows Server 2008 R2 Server Core
Installation bootstrap applications are increasingly common as products chain dependencies like the Microsoft .NET Framework. Because 64-bit Windows supports both 32- and 64-bit execution, but 64-bit executables on 32-bit Windows give what some users might consider cryptic error messages, installation developers often ship a 32-bit bootstrap application that runs in either environment. Then in scenarios when a required package installs only in 64-bit Windows, the bootstrap application can present a friendly actionable error message.Microsoft Windows supports 32-bit execution on 64-bit Windows with Windows-on-Wind...
Visual Studio 2010 and .NET Framework 4 Beta 2 Released
As announced on Soma’s blog this morning, Microsoft Visual Studio 2010 Beta 2 and the .NET Framework 4 Beta 2 have been released to MSDN Subscribers and will be available for everyone on Wednesday.Visual Studio 2010 boasts a great new user interface with better contrast and lots of UI elements that tend to add confusion to the development process. It’s pretty amazing how getting rid of a few lines increases usability.For developers redistributing the .NET Framework, perhaps the best news is how much smaller and faster runtime deployment is. Peter Marcu also describes robustness features added to .NET ...
Booting Windows to a Differencing Virtual Hard Disk
Testing software can be fun and rewarding. You get to see new, upcoming features and provide valuable feedback to the developer. But as with most pre-release software, we recommend that you don’t install it on production machines. You could dedicate extra machines for testing, or even test in a virtual machine. Virtual machines are great for testing operating systems and applications, and maximizing system resource usage. You can even take snapshots of the system disk and memory states and roll back to previous states. Besides requiring additional memory and processor time, another problem with virtual machines ...
Microsoft .NET Framework 4.0 Beta 1 should be removed before upgrading to Windows 7
If you have been beta testing Microsoft .NET Framework 4.0 Beta 1, we recommend you install a fresh copy of Windows 7 on your machine. Alternatively, you may also choose to uninstall Visual Studio 2010 Beta 1 and .NET 4.0 Beta 1 prior to upgrading to Win7.Microsoft Windows 7 is available to MSDN and TechNet subscribers.ProblemIf you have installed .NET Framework 4.0 Beta 1 on your Windows Vista machine, after upgrading to Windows 7 you may encounter some problems. Managed code may not function, especially applications built to target .NET 4.0 Beta 1. Also, if you have any ClickOnce applications installed, Windows...
ATL Security Update KB971092 still offered on Microsoft Update
A security update for ATL, KB971092, is currently offered for Visual Studio 2008 Service Pack 1 customers who have Visual C++ installed. If Microsoft Update is continuously offering this patch to you, you may need to clear up some disk space. The patch is 365MB and contains headers, libraries, and executables for most of Visual C++ including ATL and the CRT. This patch, however, may require up to 3.7GB to install with a possible residual footprint of about 1.7GB if you have all Visual C++ features installed.How to work around this issueIf you are continuously being offered ATL security update KB971092, most likel...
Trouble installing other products after Visual Studio
Customers have commented that whenever they try to install other products or patches they continually see the following message, Another installation is in progress. You must complete that installation before continuing this one. Customers may also see instances of msiexec.exe or msiexec.exe*32 appear continuously in Task Manager or other process monitoring software. This may occur after installing either Visual Studio 2008 or Visual Studio 2010 Beta 1. If you look in your Application event log as described below, for the MsiInstaller source you may see a message like either of the following, Detection of produ...
Installation sequence restrictions for multi-package transactions
Windows Installer 4.5 introduced a feature to install multiple packages in a single transaction. Multi-package transactions allow setup developers to install multiple packages as an atomic unit that are installed together, or rolled back completely. You can also apply patches to multiple products or even repair multiple products – any maintenance mode installation – within a single transaction. Installation scripts are not merged but executed in the order that packages are installed, and commit actions are deferred till the very end.There is an installation sequence restriction, however: if you are in...
How to work around the issue when opening Office applications repairs Visual Studio
Microsoft Visual Studio 2010 Beta 1 customers have been reporting that when they start Outlook or any of the Office applications, VS2010 is repaired. This issue can also happen for VS2005 and VS2008, and for any products using Visual Basic for Applications (VBA). Besides being an annoyance and potentially taking a while to complete, the repair attempt can prompt for source. Picking the right source may not always be obvious from the dialog caption especially if it is truncated. And all the while Outlook or whichever application you started is probably waiting to finish starting up. Even if you successfully comple...
Detecting Visual Studio 2008 Service Pack 1
The Visual Studio 2008 RTM and SP1 detection keys are largely the same as the Visual Studio 2005 SP1 detection keys, and are documented below. But there is a caveat for released and upcoming versions: the shared detection value can be overwritten by an older installation of the same release.For example, if you installed VS2008 Professional, then installed VS2008 SP1, and after that installed Team Foundation Client (TFC) 2008 RTM, the shared detection value is reset to 0 instead of 1. To be sure SP1 is installed, you need to detect SP1 on specific editions of Visual Studio 2008 or any other of our 2008 product rel...
Updated log collection utility available for Visual Studio 2010 and .NET 4.0 Beta 1
Last Monday we shipped Visual Studio 2010 Beta 1 and .NET Framework 4.0 Beta 1 to MSDN customers, and made them publicly available Wednesday. More information about Visual Studio 2010 and .NET Framework 4.0 are available on MSDN, and Aaron Stebner has a good collection of direct links.While we have worked hard to reduce install times and installation issues and hope you don’t encounter any, in case you do experience an issue we encourage you to gather and upload logs using our updated log collection utility available for download. This will automatically package a lot of logs and product information we can ...
Microsoft VS/.NET Log Collection Tool
Using the Collect Utility If you encounter any setup issues, we will need all relevant logs. Please follow the instructions below to collect all those logs. Reporting Setup Errors There are several options for reporting setup errors, but you might consider first checking to see if the issue is a known issue. This will save you time and provide more immediate results. In most scenarios, there will be a link on the error page after setup completes. Clicking on this should provide a smaller log that highlights the errors encountered. To dig deeper, check out some of the tips provided on Aaron's blog and on my blog...
Patch Applicability
When installing a patch package, Windows Installer first determines if the patch is applicable. Depending on how the patch is installed, this happens a little differently. Windows Installer can determine the list of applicable products, or it can be told to which products the patch should be applied.Possible productsTo have Windows Installer determine to which products the patch applies, you can execute msiexec.exe with /update or /p as shown in the following example.msiexec.exe /update patch.mspWindows Installer will enumerate the list of ProductCodes in the patch’s Template summary property. The same beha...
Microsoft .NET 1.x and Visual Studio 7.x patches may fail to uninstall
When attempting to uninstall a patch from the products listed in the Applies To section below, the following error may occur. Internal Error 2771. M953297 The last part of the error message will vary with each patch, where the last 6 digits are the knowledge base article related to the patch.Applies To WorkaroundOne possible reason the error has occurred is because a system policy is set. You can temporarily disable this system policy and attempt to reinstall the patch. Warning If you use Registry Editor incorrectly, you may cause serious problems that may require you to reinstall y...
Why does ICE03 state my localized template string is invalid?
QuestionWhen I run ICE validation, why does ICE03 state the following error? ICE03 ERROR Invalid template string; Table: Error, Column: Message, Key(s): 1958 The string reads, ユーザー [2] の特権が不十分です。必要な特権をユーザーに付与してインストールを続行しますか? [いいえ] を選択するとインӟ...
Changes to Package Caching in Windows Installer 5.0
Windows Installer 5.0 is shipping in Windows 7 as part of the operating system. To address the issue where the User Account Control consent dialog is displayed with an “Unidentified Publisher”, the .msi package is cached in its entirety.Prior to Windows Installer 5.0, installation packages, or .msi files, were stripped of their embedded cabinets – if any – when cached on the system to save space. When repairing the product, if installed files were missing then Windows Installer would attempt to use the last used source location, an application-defined location, or prompt for the installati...
Feature Changes in Visual Studio 2008 SP1 may prompt for SQLSysClrTypes.msi
After installing Visual Studio 2008 Service Pack 1, adding or removing features from Visual Studio may prompt for the file SQLSysClrTypes.msi with the following text: Setup is looking for file SQLSysClrTypes.msi. Please insert Microsoft Visual Studio Team System 2008 Team Suite – ENU disk 1 now. The text will read differently depending if you have Visual Studio 2008 Professional Edition or another edition or language installed.WorkaroundSQLSysClrTypes.msi is a product package installed with VS2008 SP1. To satisfied this prompt you’ll need to obtain that file again. ...
Repairing Products after Patches Advertised Features
Windows Installer supports advertising features to enable users to later install those features on demand. But Windows Installer may advertise features in when a component is removed from a feature through obsolescence or supersedence. This will leave the product in a broken state while reporting that the patch installed successfully.Silverlight 2.0 Beta (KB949325) and a Debugger patch (KB944899) introduces this problem since they added components that did not exist in future patches. For Visual Studio 2008 SP1 we detect and provide a tool for this issue. But this can happen to any Windows Installer product and h...
Unadvertise Features
The attached Windows Script file allows you to unadvertise features in a Windows Installer product by specifying either a ProductCode or the path to an MSP. If any features are advertised - whether incidental or intentional - the product will be reinstalled and those features added locally to your computer. Usage Only one of /Patch or /ProductCode can be specified. Unadvertise.zip
Dictionary of Windows Installer Tokens
If you are writing emails and specifications about Windows Installer all day, chances are your document or mail editor has plenty of squiggly red lines highlighting your presumed spelling errors like MsiPatchSequence. To not miss any actual spelling errors, I find myself double-checking and adding lots of Windows Installer terms to my custom dictionary so instead I created a separate dictionary containing Windows Installer tokens pulled from schema databases and headers.You can download this zipped Unicode-encoded text file, unzip it, and configure it for use with Microsoft Office applications as described f...
Windows Installer Dictionary
Attached is a Unicode-encoded, English locale-sorted text file with many table, column, API, and flag tokens you can use as a spelling dictionary in many applications including Microsoft Word and Outlook email. To support Microsoft Word, Outlook email, and other Microsoft Office products, msi.zip
Another Possible Workaround for Error 1330
When installing Visual Studio 2008, you might run into an error dialog that reads, Error 1330.A file that is required cannot be installed because the cabinet file D:\cab1.cab has an invalid digital signature. This may indicate that the cabinet file is corrupt. The path and name of the cabinet may be different, but might often be D:\cab1.cab, where D: refers to your DVD drive. How to workaround this issue Some time ago I blogged that you should try copying the installation locally as in some cases this is related to brief network disconnects or disc read lag, or even a bad burn of an ISO image. You should ...
Windows Installer XML (WiX) v3 Beta Released
Since plans were made to ship WiX v3 in the box for Visual Studio 2010, the WiX working group has been working on fixing all outstanding bugs in the WiX v3 code base. Bob Arnson uploaded packages last week as a test on SourceForge and this week the following installation packages were uploaded on the v3 Beta release page. (The difference between the two downloads is support for building natively on x64 platforms with MSBuild in the x64 installation package.)Some major features in v3 include: Please download a...
Visual Studio 2008 SP1 may complain that another patch is installed even after removing it
If Visual Studio 2008 SP1 prompts you to run the Microsoft Visual Studio Patch removal tool, it means that a patch or product is installed that would cause issues when installing VS2008 SP1. The dialog is shown below. If you run the the patch removal tool and are still seeing this dialog, please follow the workaround below. Workaround You will need to search and possible modify your machine’s registry. Warning If you use Registry Editor incorrectly, you may cause serious problems that may require you to reinstall your operating system. Microsoft cannot guarantee that you can solve problems that resul...
Adding features to Visual Studio 2008 may fail to load setup components
When attempting to add features to Visual Studio 2008 after it has already been installed, you may see an error that reports, A problem has been encountered while loading the setup components. Canceling setup.FixUpdated: a hotfix has been uploaded to Code Gallery to address this issue. As stated on the page, Please be aware this Hotfix has not gone through full Microsoft product regression testing nor has it been tested in combination with other Hotfixes.You may still use the original workaround posted below.WorkaroundYou can choose to either remove older patches installed for Visual Studio 2008, or install Visua...
Help Improve the .NET Framework Deployment Experience
My colleague Peter Marcu, who is leading the development effort on the new deployment experience for the .NET Framework, is seeking information from our developer customers how you deploy the .NET Framework for your applications. If you’re a developer who requires and needs to deploy the .NET Framework to support your applications, please take a look at Peter’s questions and provide him feedback as comments on his blog post or by contacting him directly.
Do not repair VS 2008 SP1 from installation media
If you need to repair Visual Studio 2008 once SP1 has been applied or wish to change which features are installed, you cannot run setup.exe from the original installation media.When you run repair from media you may see an error like, "A problem has been encountered while loading the setup components. Canceling setup."WorkaroundOpen the Control Panel and go to Add/Remove Programs, or on Vista click on the "Uninstall a program" link under Programs. Find Microsoft Visual Studio 2008 (the exact product name will vary based on edition and language installed) and click on the Uninstall/Change button. When setup launch...
VS 2008 SP1 fails to install because of missing packages from the cache
Some customers are reporting that Microsoft Visual Studio 2008 SP1 is failing to install with the following error in the HTML log you can view from the error dialog. Patch (C:UsersheathsAppDataLocalTEMPWebDesignerCore_KB950278.msp) install failed on product (Microsoft Office Enterprise 2007). Msi Log: Microsoft Visual Studio 2008 SP1_20080816_141317516-Microsoft Office Enterprise 2007-MSP0.txt Final Result: Installation failed with error code: (0x80070663), This update package could not be opened. Verify that the update package exists and that you can access it, or contact the application vendor to verify that th...
Setup.bin is probably not a Trojan horse
Some virus scanning application have been reporting that setup.bin is a Trojan horse containing one of the following viruses: This file is typically installed to C:Program FilesMicrosoft SDKsWindowsv6.0ABootstrapperEnginesetup.bin by the Windows SDK and is actually setup.exe that has been renamed to setup.bin. This file is used when you build your own installation package that can chain install packages like .NET, Report Viewer, SQL, the VC runtime, Visual Tools for Office runtime, and Windows Installer.Jeremy Kelley, a program manager in our Community Connections team, posted the following to an MSDN ...
ISA Proxy Client may be required to download VS 2008 SP1
If you're on a network that uses Microsoft ISA Server or another proxy server, you may have problems downloading Visual Studio 2008 Service Pack 1. The error dialog displays the following. The installation failed with the follow message: Fatal error during installation. Click the Finish button to exit. SolutionDownload and install the Microsoft ISA Proxy Client. The default settings should be sufficient, but if you have doubts or questions please contact your network administrator.DetailsThe VS2008 SP1 bootstrap application relies on the Background Intelligent Transfer Service (BITS), falling back to WinH...
VS 2008 SP1 Beta must be removed prior to installing the release of VS 2008 SP1
When I announced that Visual Studio 2008 SP1 RTM will install over SP1 beta, we were on track to make that reality. However, when SP1 beta shipped we found that adding new components into existing features was causing a prompt for source for non-default installations of Visual Studio 2008. To fix this, we would have to remove those components and put them into a new feature. This, in turn, causes the installation to not actually update most files if the beta was installed because it advertises the features. After a lot of discussion, we decided that because a prompt for source is a blocking issue for more custom...
Visual Studio 2008 Service Pack 1 Released
Microsoft .NET Framework 3.5 Service Pack 1, Visual Studio 2008 Service Pack 1, and Team Foundation Server 2008 Service Pack 1 have been released. This is a big release on the heals of SQL Server 2008 which has a dependency on .and includes NET Framework 3.5 SP1.This is a big release with many new features and improvements over previous releases. The service pack package itself has undergone a number of significant changes including a web bootstrap that downloads only the updates you need on your system and splits up larger patch packages into smaller packages that install together in a single transaction. For ex...
Why Windows Installer May Require so much Disk Space
Windows Installer is an engine for performing transactional installations. When installing a product for the fist time, most often few or no files to be installed are already present on the machine. But when upgrading or patching a product, most often those files are replaced so copies must be kept if an error occurs and the installation needs to roll back. The following describes where and why Windows Installer may require so much disk space.Extracted filesA bootstrap application may be required for a number of reasons. A bootstrap application may compressed setup files into the bootstrap application, or they mi...
Enable BITS Logging
Microsoft Visual Studio 2008 Service Pack 1 uses a new bootstrap application that chains several packages together for a seamless installation experience. Because VS2008 SP1 contains a lot of fixes and new features, it is also quite large - almost 3 times as large as VS2005 SP1.To download all this data, we use the Background Intelligent Transfer Service, or BITS, first and foremost. To help diagnose failures with BITS that results in falling back to other download mechanisms which may also fail, please enable BITS logging using the script StartBITSLogging.cmd available from here and attached to this post. This s...
BITS Logging
The attached ZIP file contains scripts to both enable and disable logging for the Background Intelligent Transfer Service, or BITS. Both scripts must be run elevated so on Windows Vista or newer open an elevated command prompt and run these scripts. You may also right-click on the scripts and choose to Run as administrator. BITSLogging.zip
Windows Installer 4.5 is Now Available
Windows Installer 4.5 is now available on the download center for a variety of platforms, including Windows XP SP2 and newer, Server 2003 SP1 and newer, and both Vista and Server 2008 RTM and newer.The Windows Installer 4.5 SDK is also available as a separate download, and the documentation has been updated on MSDN as well. You might noticed that the SDK installation package has a familiar red motif.If you participated in the betas, you might have noticed some changes to new features since Beta 1. The CustomAction table has a new column, ExtendedType - an I4 that currently supports msidbCustomActionTypePatchUnins...
KB944899 Should be Removed before Installing Visual Studio 2008 SP1
Before installing Visual Studio 2008 Service Pack 1, you should first uninstall KB944899, a hotfix which improves performance when stepping through source downloaded from a source server. If KB944899 is not removed prior to Visual Studio 2008 SP1, sometime during the middle of installation an error will occur and the error dialog is displayed as shown below. Click on the "log file" link in the middle of the dialog. If it opens in Internet Explorer, you may have to click on the yellow information bar that appears on the top to allow scripts to run. Check the "Errors" message type and the following errors a...
The Release of Visual Studio 2008 SP1 will Install over SP1 Beta
One of many improvements made to Visual Studio 2008 Service Pack 1 is that VS 2008 SP1 Beta customers will not need to uninstall SP1 Beta before installing the release of SP1. The same is true for Visual Studio 2008 Express products and .NET 3.5 SP1 - both of which are complete upgrades to older products that may already be on the system or that can be installed on a clean system.So please read the requirements and known issues, give Visual Studio 2008 SP1 Beta a try, and provide feedback about we can improve the release of VS2008 SP1 and future releases.
How to Download all of Visual Studio 2008 SP1
Visual Studio 2008 Service Pack 1 is comprised of multiple packages, including executables, installer packages, and patches. Compare this with Visual Studio 2005 SP1 which was a single patch wrapped in an executable. A lot of updates were made to both the .NET Framework and VS 2008 - along with changes to SQL and other bits from across the company - so a download manager was created to download only what you need. But if you want to put VS 2008 SP1 on your network or a DVD for later or continued use, you can pass /createlayout to the download bootstrap application. The /createlayout parameter requires an argument...
Changes for Microsoft Visual Studio 2008 Service Pack 1
Microsoft Visual Studio 2008 Service Pack 1 (Beta) has been released to web, along with Microsoft .NET Framework 3.5 Service Pack 1 (Beta). Included as part of .NET 3.5 SP1 are Microsoft .NET Framework 2.0 Service Pack 2 (Beta) and Microsoft .NET Framework 3.0 Service Pack 2 (Beta). Visual Studio 2008 SP1 includes over 250 new features and improvements to existing features, including SQL Server 2008 support. .NET 3.5 SP1 also includes many new features on which VS 2008 SP1 is dependent. Because of this, VS 2008 SP1 chains .NET 3.5 SP1 and other necessary components as you can see from the partial list in the scre...
Visual Studio and .NET Log Collection Utility
Setup and deployment is a tricky business. Machines can be in many different and often unforeseen states that cause setup to fail. But rarely will setup actually crash, and that is why setup logs are vital to diagnose install, repair, and uninstall problems. Setup applications for Visual Studio and .NET may write to many different logs because the products are actually comprised of many different packages. Aaron Stebner had documented several log file names for Visual Studio 2008, but with our new and improved patch wrapper we may write even more log files. As we onboard new CTPs for great new features in Visu...
MSIZap is not Uninstall
The tool msizap.exe that is available in the Windows SDK and elsewhere on the web (remember to always download from a trusted source) is a powerful but dangerous tool that is often used to quickly and casually, and can leave your machine in a corrupted state if not used correctly. The same is true for the Windows Installer CleanUp Utility which uses msizap.exe.Windows Installer is a transactional, data-driven deployment technology used by most of the products deployed on Windows platforms today. At its core, it is a loose referential database that describes software applications and that information can be update...
Microsoft .NET Framework 2.0 Service Pack 1 Fails to Install
A lot of customers have recently started seeing the following errors, all stating in various ways that Microsoft .NET Framework 2.0 Service Pack 1 failed to install. You may also see this when attempting to install other updates on top of .NET 2.0 SP1. The error you will see depends on how you are applying updates. If you are installing .NET 2.0 SP1 or other updates on top of .NET 2.0 RTM by installing the package directly, you may see the following dialog. If you click on the Error Log hyperlink, the error log simply states the following. [04/17/08,17:08:27] Microsoft .NET Framework 2.0a: [2] Err...
Functional Testing of Cmdlets
While developing unit and functional tests for Windows Installer PowerShell Extensions, I needed a way to invoke cmdlets without requiring elevation on Vista. That is, of course, because running elevated has always been a bad idea unless it is required. In order to load a PowerShell snap-in, however, one must write to HKEY_LOCAL_MACHINE which requires elevated privileges. Other than that, there really isn't another reason to run elevated. Fortunately, PowerShell allows developers to define a RunspaceConfiguration object which, among other properties, allows developers to add specific types as cmdlets. Without bei...
Windows Installer 4.5 Beta 2 Available
The Windows Installer team released Windows Installer 4.5 Beta 2 recently. While not a lot has visibly changed since the first beta for which I provided an overview, it's important to note that a new column was added to the CustomAction table since changes to column types are not supported in a transform or patch but adding a new column is supported.The ExtendedType column is defined as a nullable DoubleInteger, or I4 using IDT format codes. Currently the only supported value is the new msidbCustomActionTypePatchUninstall (0x8000) that denotes a patch uninstall custom action, which is the feature to deploy a cust...
Group by Different Properties for Format-Table
For my Windows Installer PowerShell Extensions, I've been simplifying some of the use cases and adding additional formats. One thing I wanted to do was display source list information in a table and group either by the attached ProductCode or PatchCode properties. The format-table cmdlet doesn't support multiple properties and doesn't appear to allow you to condition the label. It also seemed that Display.xml, or *.formats.ps1xml files, didn't natively support grouping by multiple property names. The help topic about_Display.xml hinted at a CustomControl tag, but examples of this and related tags in the default *...
Installing Silverlight 2 Beta 1 Tools for Visual Studio 2008
While attempting to install Microsoft Silverlight Tools Beta 1 for Visual Studio 2008, you may get a prompt for source that looks like the following screenshot. This problem commonly occurs if you have not installed one or more of the features Visual Basic, Visual C++, or Visual C# when installing Visual Studio 2008 (VS2008). If you have your VS2008 installation media handy, insert it into your DVD drive, click the Browse button shown above, and navigate to vs_setup.msi in the root of your DVD drive. How to work around this issue If you do not have your VS2008 installation media handy, you can work around this...
Another Workaround to Add New Components to Existing Features
Yesterday I described an issue when adding new components to existing, not-installed (absent) features the feature tree is installed. This can lead to prompts for source or failed installations. One workaround is to add new, top-level hidden features. This works well unless new resources have a dependency on the older resources installed by the would-be feature tree - the feature tree where the new components should've been parented. Another workaround is to reinstall everything by setting REINSTALL=ALL. Setting any of the feature, component, or file selection properties listed below bypasses Windows Installer's ...
Adding New Components to Existing Features Installs the Feature Tree
As Developer Division starts to ship patches for the Visual Studio 2008, some users are being prompted for installation source media. This is a resulting of Windows Installer needing the original source files if, for example, files are missing from disk when you repair your product or backup files are not available during patch install. If you are prompted for source media during install or uninstall, put in your source media disk or browse to the local or network path that contains the original source media like vs_setup.msi. Some of our products do not actually contain loose source .msi files like vstor30.exe u...
Debugging Custom Actions: Leaked Handles
Debugging custom actions isn't exactly the easiest action to do; Windows Installer spawns separate processes - remoting servers - to run in-process custom actions. Any opportunity to diagnose issues without debugging can be helpful.For example, an issue that comes up from time to time is leaked handles. A Windows Installer debug log might show something similar to the following:Windows Installer provides a clue in the log that can help with a code review. The Windows Installer team has provided the following information: With this knowledge, you should be able to review your code and spot cause of the issue.
Get Binder Variables for Assemblies without Installing into the GAC
Binder variables in WiX are variables that are resolved, coincidentally, at bind time. This is when the linker, light.exe, collects file information, assigns auto-GUIDs, and generates the output packages among other things. There are binder variables for all versioned binaries, and binder variables specific to both managed and native assemblies or exclusive to one or the other. The format for using binder variables follows a similar patter to preprocessor variables - variables resolved before compile time - but use a different prefix as shown below. Managed assemblies will cause the generation of the following li...
Different Packages are Required for Different Processor Architectures
A common question is how to create a Windows Installer package that installs 32-bit binaries on 32-bit platforms, and both 32- and 64-bit binaries on 64-bit platforms. If you're actually trying to install 64-bit binaries to appropriate directories and write to the 64-bit view of the registry, the short answer is that you can't build a single package.Before delving into the details, let me clarify that both 32- and 64-bit binaries can be installed to either ProgramFilesFolder or ProgramFiles64Folder, but may not load correctly into a 64- or 32-bit process, respectively. The Windows Installer SDK, for example, inst...
Patch Families in WiX and Windows Installer
Patch families were introduced in Windows Installer 3.0 as a means to sequence patches even if applied in any order, and to supersede previous patches. Supersedence allows for easier delta patching and allows more patches to be installed than the 127 limit.When we started developing the new patch build support in Windows Installer XML (WiX) 3.0, we overloaded the concept of patch families to filter resources in a transform. By adding references to symbols to a PatchFamily element, that symbol and all other elements in the same fragment are left in the authoring transform. Every other difference between the target...
Fixes in Microsoft .NET Framework 2.0 SP1 and 3.0 SP1
A reader pointed out that the list of fixes for .NET Framework 2.0 Service Pack 1 were published. I also see from the .NET Framework 3.5 download page that the list of fixes for .NET Framework 3.0 Service Pack 1 were also published. Both are listed below. But what is the relationship between 3.5 and 2.0 SP1 and 3.0 SP1? I mentioned previously, but left out a crucial piece about .NET 3.5.
How to Workaround Error 1330 During Visual Studio 2008 Installation
When installing Visual Studio 2008, you might run into an error dialog that reads, Error 1330.A file that is required cannot be installed because the cabinet file D:msdncab2.cab has an invalid digital signature. This may indicate that the cabinet file is corrupt.The path and name of the cabinet may be different, but might often be D:msdncab2.cab, where D: refers to your DVD drive.How to workaround this issueYou can try installing the product again, but you may have better luck if you copy the DVD layout to your hard drive. Installing from stamped media - which is what ships in our box product - also reduces the c...
Help Shape the Future of Visual Studio Deployment
Do you want to help shape the future of deployment for Visual Studio code name "Dev10"? Aaron Ruckman in our Deployment Technologies Group is asking for feedback about what experiences you'd like for the future of Visual Studio.
The Essentials, or Heath's Greatest Hits
People commonly ask me what to start reading to learn about Windows Installer. Internally I point people to a wiki I maintain with lots of links to various sources, and some of those links are to my own blog posts. Externally I typically link to all these same sources, and typing all those links and maintaining the list becomes tedious. So I've created an Essentials tag and have retroactively tagged what I consider to be essential learning material and will tag new posts as I deem essential.While I'm at it, I'll post a few more links to which I typically refer people:
Microsoft .NET Framework 2.0 Service Pack 1, and How to Detect It
No doubt you've heard the Microsoft .NET Framework 3.5 was released. Aaron Stebner has posted a list of links to 3.5, as well as 2.0 Service Pack 1 (SP1) and 3.0 SP1. It's important to note that if you install 3.5 you're actually getting 2.0 SP1 and 3.0 SP1 both.The .NET Framework 3.5 consists of the following: While 2.0 SP1 and 3.0 SP1 are actually full major upgrades that will replace older versions if installed, they update the SP detection keys as documented previously. The registry detection keys we introduced in .NET Framework 3.0 and Visual Studio 2005 will not work for 2.0 SP1 and 3.0 SP1, unfortunately...
How to Install TFC without PPE
Microsoft Visual Studio 2008, now available for MSDN subscribers and Express editions freely available to everyone, is a huge application. It takes a while to install and, in the case of Visual Studio 2005 Service Pack 1, a long time to patch. Installing or patching multiple copies of shared components can be time-consuming. So if you've installed Visual Studio 2008 already and want to install Team Foundation Client (TFC) you can avoid having to install Visual Studio 2008 Premier Partner Edition (PPE) and save time, though disk space savings are minimal since almost all the PPE files were already installed with V...
AppCompat in Windows Installer
The Application Compatibility (AppCompat) platform in Windows is a powerful feature that allows for fixes on practically any program or package to be loaded on Windows. Windows Installer takes advantage of a protected database full of fixes in the form of transforms and custom action shims.While looking in a verbose Windows Installer log, you will see a line like the following:Windows Installer is checking an AppCompat database, %WINDIR%AppPatchmsimain.sdb, to determine if the product requires any fixes. Normally, the next line in the log you would see is like the following example:But what happens for products t...
Sequencing before Versioning
File versions in Windows Installer and properties like REINSTALL and REINSTALLMODE determine what files are copied to their destination. But before files versions are even a factor, any patches being installed or already installed are sequenced first.A Windows Installer patch file, a .msp file, contains a set of transforms for one or more target products. When applying a patch, Windows Installer enumerates all the transforms in the patch package until it finds the first authoring transform that applies based on its validation bits and target values. If that transform changes the ProductVersion property, it is seq...
Shim Database to XML
Extracts data as XML from a shim database used for application compatibility. Please leave feedback on the tool here on this page. This was developed using what little public documentation is available on MSDN as well as some experimentation at other functions that were exported from apphelp.dll, such as which I reasoned follows the same signature pattern as . Version History sdb2xml.exe
Windows Installer Properties and Conditions
In many languages, some variables can take a value of different types but with the same meaning. Variants in script, for example, can take 0 or false; or they can take any non-zero value and true. The following JScript example prints "Same".The same is not true of Windows Installer however, and conditions must acknowledge this. Setting a property to 0 does not undefine it nor does it mean a simple property test will fail as shown in the following example condition.If a product defined or a user passed in ARPSYSTEMCOMPONENT=0, the condition above will still pass because ARPSYSTEMCOMPONENT is defined as 0. Setting ...
ResolveSource Requires Source
It might be tempting to schedule the ResolveSource action, but ResolveSource actually requires that the original installation source is available whenever it is called. If your installer package is authored correctly, source must only be resolve in cases where the original RTM files are missing or during some patch uninstall scenarios. To decrease the chance that Windows Installer itself will need original source, you should make sure that file versions and languages in the installer package match the file versions of the files to be installed by the package, and that all unversioned files have the correct hash i...
EXE Custom Actions are Bad
Windows Installer custom actions that launch executables (base custom action type msidbCustomActionTypeExe, 0x2) are typically bad and should be avoided. How are they bad? Let the Windows Installer team count the ways.During internal audits we question any EXE custom actions (CAs) but inevitably some make it into the product. Typically these EXE CAs are standalone configuration utility applications that are installed with the product or are managed EXEs where developing them as EXEs yields the benefit that the required CLR version can be loaded. You can read more about managed CAs from Rob Mensching and find more...
Progress for New Patches
You asked. We answered. One source of problems for Visual Studio 2005 Service Pack 1 was that VS 2005 SP1 targeted multiple products, and if you had multiple target products installed - most commonly Visual Studio 2005 and SQL Server 2005 that uses our IDE - multiple instances of dialogs would spawn. Some people thought SP1 was installing again and canceled successive patch installs. This meant that some files in other target products weren't patched, which could lead to any number of problems depending on which files weren't patched. The problem was that our patch installer was a chainer but not an external UI h...
Detection Logic fixed for KB937061 (MS07-052)
Customers have been offered KB937061 for Visual Studio 2005 Service Pack 1 from Microsoft Update when they have already installed it. The Microsoft Security Response Center blog has more information about the problem and what they have done to fix it.I wanted to add that because patches are cached according to their package code, you do not have multiple copies installed for each time you successfully installed the patch.The updated detection logic has been pushed to Microsoft Update, but if you are still being offered KB937061 follow the instructions below.
Transform Validation in WiX Patch Build
In the latest WiX v3 drops a new element is supported to configure transform validation bits. The default is still 0x0922001f but you can now configure them. Torch.exe was also modified to accept transform validation bits using the same flags as msitran.exe in the Windows Installer SDK, as well as transform types that group together common flags. Currently, you can easily build language, instance, and patch transforms using torch.exe -t <type>.To use the new element, add the <Validate/> element under <PatchBaseline/>. The default value of 0x0922001f is equivalent to the following:
Column Types Cannot be Changed in a Patch or Transform
Transforms can change just about anything in an installation package - even the code page. Transforms can also add and drop both tables and columns but they cannot, however, change the column type. This is true for patches as well, since a patch package contains transforms.At their core, transforms store data aligned to the size of the data type. An i2 column - a SHORT, INT, or INTEGER in the column definition format - stores 16 bits of data while an i4 column - a LONG - stores 32 bits of data. If a product, for example, defines the File table's Sequence column as i2 and a patch updates the Sequence column type t...
Upload Installation Logs on Vista Today
Bret Grinslade, Group Program Manager for our Deployment Technology Group, describes how you can send feedback directly to our team. You can also check a box during setup to have feedback in the form of installation logs sent directly to our system. As Bret notes, however, on Vista uploading logs can take up to 30 days before you're prompted to do so. To upload your logs from Vista today to provide more timely feedback, you can follow these steps: If you are prompted to send information to Microsoft, I encourage you to review the information and follow the prompts to send it in for any products which informat...
What's New in Windows Installer 4.5: Overview
The What's New section of the Windows Installer 4.5 CHM available in the downloads section of the Windows Installer 4.5 Beta Connect site has technical details of new functionality and changes as usual, but now that we can talk about Windows Installer 4.5 I wanted to provide an overview of the new functionality. I'll be detailing several topics in future posts.What's NewThe following features are new to Windows Installer 4.5 and provided both downlevel to Windows XP SP2 and newer, and to Windows Vista and newer.Multi-package TransactionsChaining installations often requires decisions about when to "undo" what has...
Windows Installer 4.5 Beta Available
Windows Installer 4.5 Beta is now available to those signed up through Connect. Along with the whitepapers posted earlier, binaries for x86, x64, and IA64; headers; and libraries are all available.Expect to see more technical details on individual Windows Installer 4.5 features in the weeks to come.
Performance Issue to be Addressed in .NET 3.5
Current .NET Framework patches may not NGEN some assemblies as was recently discovered for KB928365. We have worked out a solution and Surupa Biswas, a PM on the CLR team, wanted me to pass along the following information. As indicated in this post, an update to the CLR or to just the Framework 2.0 assemblies can leave applications based on Framework 3.0 sluggish for a while (until the machine is idle for more than 5 minutes and the NGen Service can pre-compile the Framework 3.0 assemblies whose dependencies were updated). We’re addressing this performance issue in the next CLR 2.0 update delivered with .NE...
WiX v3 Patching Improvements
In last week's release some changes to patching with WiX were made with more exciting changes to come. Peter Marcu has implemented some changes he'll talk more about on his blog, but suffice to say has reduced the number of commands and command line arguments required to build a patch.I've added some documentation for the new the patch build system in WiX v3 adapted from Peter's blog post, as well as updated the documentation for patch build using Patch Creation Properties and PatchWiz.dll.Another very important change was defaulting the patch transform validation bits to 0x0922001f. This is crucial since the pre...
No Environment Change Notification when Reboot Required
The documentation for the WriteEnvironmentStrings action states, Note that environment variables do not change for the installation in progress when either the WriteEnvironmentStrings action or RemoveEnvironmentStrings action are run. On Windows 2000, this information is stored in the registry and a message is sent to notify the system of changes when the installation completes. A new process, or another process that checks for these messages, uses the new environment variables.This means that Windows Installer will broadcast the WM_SETTINGCHANGE message to all top-level windows with the LPARAM value of "Env...
KB928365 for MS07-040 Leaves Some Managed Applications Sluggish
After installing Security Update KB928365 for the Microsoft .NET Framework 2.0 to fix MS07-040, some users are noticing some managed applications - especially those developed using the Windows Presentation Framework (WPF) - are running sluggish.The apparent problem is that native images, which are assemblies already compiled to native code, do not exist for all assemblies but a few. Those assemblies for which native images do not exist, like PresentationCore.dll for WPF, must be just-in-time compiled, or JIT'd, when code must be executed each time the assembly is loaded until they compiled to native code (NGEN'd)...
Installing to TARGETDIR
The TARGETDIR property, paired with the SourceDir property in the Directory table, determines the root directory into which all files are copied unless otherwise located. During an administrative installation when all files are extracted the TARGETDIR, this is the only root directory on the file system. The directory structure in the Directory table without any redirection like that resulting from expanding ProgramFilesFolder is used as-is.During installation, however, a number of things affect the location of components. Often, a directory structure is built under ProgramFilesFolder and TARGETDIR is forgotten or...
Immediate Custom Actions Always Impersonate
Windows Installer is a client/server application. When you install a package using msiexec.exe - which is executed by default in response to shell verbs such as Install - or APIs like MsiInstallProduct the package is initially processed under the user's credentials. This means, of course, that in over-the-shoulder elevation when administrative credentials are provided it's the administrator's credentials that are used. The package is opened and certain properties are read to determine if the product is already installed, what the product language is, and other stateful information. If any user interface is a...
Unchanged Files Break Patch Uninstall
I've discussed a couple different reasons that Windows Installer 3.0-style patches - those with the MsiPatchMetadata table in the patch package itself - might not be uninstallable. I explained another reason in a discussion about the new patch build support in Windows Installer XML (WiX) v3 recently, describing why unchanged files should not be updated via the patch package. This happened with our own legacy patch build system for some internal releases of Visual Studio 2005 Service Pack 1, but was fixed before VS 2005 SP1 was released.When files are patched, the file sequences are updated to locate them in a cab...
Uninstallable Patches that are not Uninstallable
Patching with Windows Installer is the act of applying a pair of transforms in a patch to a Windows Installer product, then repairing that product. Any changes made in the transforms affect the aggregate view that Windows Installer reinstalls. This is displayed in the diagram below, where the bottom layer is the components in the product MSI, the second layer is the changed components in the patch transforms, and the top layer is the aggregate view created by transforming the product. Uninstalling a patch is acting in reverse: a patch transform is removed from the view and the product is repaired. Thus, any chan...
Windows Live Writer Plugin for MSDN URLs
I have posted a Windows Live Writer plugin I wrote to aide posting URLs to MSDN, simply named Paste MSDN URL. It removes, if present, the culture in the URL so that when a reader clicks the link he or she sees the content on MSDN in their preferred language if a translation is available.So, http://msdn2.microsoft.com/en-us/library/aa372866.aspx translates to http://msdn2.microsoft.com/library/aa372866.aspx. Additionally, the plugin by default fetches the title of the page, so pasting the above URL fetches Windows Installer (Windows). You can turn this off in the options for the plugin through the Options dia...
Windows Installer Errors 2738 and 2739 with Script Custom Actions
Windows Script custom actions should be avoided. They are difficult to debug, get blocked by virus scanners, and are far more susceptible to machine state than native custom actions. That is indicated by Windows Installer error messages 2738 and 2739, which read: As some people have found, re-registering the runtime libraries vbscript.dll and jscript.dll will fix the errors, but that isn't always the solution. As a security measure, Windows Installer will not load script engines registered in HKEY_CURRENT_USER. As a user-writable store, a normal user could get an elevated install to run their library masking as...
WiX Extension for PowerShell Snap-ins
To write an installer for your PowerShell snap-in, the PowerShell documentation instructs you to extend the PSSnapIn or CustomPSSnapIn class. When you add your snap-in assembly to the Custom Action view in a Windows Installer Project in Visual Studio, the InstallerClass property should be set to True and your installer class will be run when the Windows Installer package gets installed. But this results in a managed custom action being run during installation, and its best to avoid running managed custom actions in Windows Installer. How else should you install your PowerShell snap-in? I have recently added an ex...
Silverlight
Hosts Silverlight.js as part of Microsoft Silverlight. Silverlight.js
Patch Families Can Only Ever Grow
Peter Marcu has begun talking about new functionality added into WiX 3.0 that he's been working on a lot. One of the specific features is filtering by patch families. Based on a concept Office has used internally, patch families in this case are a set of resources that must be in a patch, and that patch can only be superseded by another patch with at least the same resources – a superset. Those then form the patch families that are authored into the MsiPatchSequence table in the patch package. Peter notes, One thing to note is that there are rules about patch families. Once you ship a patch family, you must...
Hotfix Published for KB925336
When installing Visual Studio 2005 Service Pack 1, users may see an error that reads, Error 1718.File D:WINDOWSInstaller50baad.msp was rejected by digital signature policy. I've published instructions to work around this issue using either the Management Console snap-in or the registry, the latter including a sample batch script to automate VS 2005 SP1 installation. This was also reflected in KB925336, referenced both from the SP1 download page and in the modified error dialog if this problem were encountered while installing SP1. Today a hotfix was published on the Download Center to fix the underlying issue, th...
Custom Action Guidelines
Rob Mensching, father of Windows Installer XML (WiX), blogs about why managed custom actions are a bad idea. Aaron Stebner follows up by saying (and has said before): How do you know what's natively supported? Those who know me already know what I'm going to say: read the docs. The Windows Installer SDK has some information if you look for it, and you certainly should because setup and servicing cannot be taken for granted. Windows Installer is complex, but a powerful transactional installer. To help disseminate some of this information since it can be sparse, there are a number of good blogs to read about rules,...
Windows Installer PowerShell Extensions 1.0 Beta Released
I have released Windows Installer PowerShell Extensions 1.0 beta, complete with an installer package. I have also added a couple of cmdlets, and format and type configurations for a good out-of-the-box experience when using the cmdlets Get-MSIProductInfo, Get-MSIPatchInfo, and Get-MSIRelatedProductInfo. When I introduced PSMSI, you had to manually register the snapin and this was seemingly an adoption blocker. I've been looking into adding a WiX extension to more easily dealing with this without having to load the CLR as is typically done today through InstallUtilLib.dll or InstallUtil.exe. Binder support is need...
Small Updates Should Usually Target a Single Baseline
Generally, small updates target a specific ProductVersion, and with Windows Installer 3.0 and newer minor upgrades should target the RTM ProductVersion using MinorUpdateTargetRTM in the MsiPatchMetadata table to support cumulative minor upgrades, which is a win for customers. What happens when a small update doesn't target a single ProductVersion? First, how does a small update target a specific ProductVersion anyway? A Windows Installer patch, or .msp file, is little more than a container for transforms and upgrade files. Those transforms contain validation bits that determine if a transform can apply to a given...
VS 2005 SP1 Update for Vista Requires VS 2005 SP1
If you're attempting to install the Visual Studio 2005 Service Pack 1 Update for Windows Vista without having installed Visual Studio 2005 Service Pack 1 first on all applicable products, you will receive Windows error 1642, which reads, The installer cannot install the upgrade patch because the program being upgraded may be missing or the upgrade patch updates a different version of the program. Verify that the program to be upgraded exists on your computer and that you have the correct upgrade patch. Some news outlets and blogs have reported that this would be or is a special edition of VS 2005 SP1 but it is ac...
Introducing Windows Installer PowerShell Extensions
Some time back I mentioned in a comment I was working on some PowerShell extensions for Windows Installer. Actually, it was a long time ago and I've spent more time learning the "ins" and "outs" of PowerShell (mostly the "ins" using .NET Reflector because the documentation needs work) than actually writing anything. Then, of course, there was that little Visual Studio 2005 Service Pack 1 project. While I am still busy working on things for future releases out of Developer Division and beyond, I want to make this project available and add features to it over time. So, I introduce to you the Windows Installer Power...
Blog Script
Attached is the JavaScript I used to customize this http://blogs.msdn.com/heaths. blog.js
Better Searching with Live Search and OpenSearch Discovery
Sometime back I updated my blog to take advantage of Internet Explorer 7 by providing an OpenSearch discovery document for my blog. Since then I've made some changes, such as moving the OpenSearch discovery document to be hosted on this site to accommodate for differences in downtime with its previous host, and corrected my text for the ShortName element. Most recently I have hidden the search box exposed by Community Server to draw focus to the much more powerful Live Search Box I also added sometime back. Now you can use all the power of Live Search to search not just the blog posts, but comments and attachment...
Visual Studio 2005 Service Pack 1 Update for Windows Vista Available
As Aaron notes, the Visual Studio 2005 Service Pack 1 Update for Windows Vista is available on the download center. This patch is available for all supported languages of Visual Studio 2005, unlike the beta which was available in English and Japanese. You should first uninstall the beta update for Vista. Note that you do not have to right-click and select "Run as administrator" for this release. The patch wrapper is manifested to automatically prompt for elevation. You must also first install Visual Studio 2005 Service Pack 1 if you haven't already, or you'll get an error that indicates the patch does not apply t...
Visual Studio 2005 Service Pack 1 is Hot – Maybe too Hot
Visual Studio 2005 Service Pack 1 is a big release with many fixes and lots of new features. But with several known issues related to its size, SP1 is a hot issue - maybe a little too hot. A couple of customers were encountering a problem while when installing VS 2005 SP1 their laptops would reset - not reboot. After generating verbose logs where each line was flushed, we couldn't with any certainty diagnose the exact problem. The event would always occur around the time the Windows Installer script generation was starting, but never at the exact same time. One customer noticed his laptop was getting fairly hot. ...
KB925336 Updated with Better Workaround
When installing Visual Studio 2005 Service Pack 1, users may see an error that reads, Error 1718.File D:WINDOWSInstaller50baad.msp was rejected by digital signature policy. While the filename will be different, the result is that the patch will not install. We first ran into this problem with the beta internally, and through investigation I found that this was caused by SAFER on Windows XP and Windows Server 2003 attempting to map the whole file into memory. On Windows Vista this operation is properly streamed. I posted workaround steps using the management snap-in. This was used as the basis for KB925336 which, ...
Comment Policy
Comments may be made on blog posts for up to 90 days and trackbacks are currently disabled until an issue is fixed. It is unfortunately given the educational nature of this blog, but this is a way to eliminate a lot of spam.If you have questions about my post, I urge you to search my blog in whole first. If you do not find your answer, feel free to contact me. If the question warrants, I may create a blog post to further explain the answer for the benefit of the community. I will not use names in new posts if you contact me directly, but if you leave a comment for all to see on my blog I may use your moniker, giv...
Virtual PC 2007 Released and Available for Free Download
Virtual machines are great for testing product installation and update scenarios. I use Virtual Server currently with a base platform and undo disks enabled to test installation. When done – no matter what the impact is to my virtual machine – I click "Turn off Virtual Machine and Discard Undo Disks". Within seconds the machine is ready to use again in the same state with which it began: with my base platform installed. Today Virtual PC 2007 was released and available for download for free. Virtual PC and Virtual Server use the same file formats but provide different levels of functionality. I use Vir...
Windows Live Search for Mobile 1.0 Released
Windows Live Search for Mobile 1.0 has been released as announced on Live Search's blog. I used the beta for a while and really like this mobile smart client. It has a lot of capabilities driven from Live Search, but the screenshot below is one of its best features. It also supports category searches and shows traffic for major cities. To see more screenshots, see the announcement post. To download, open http://wls.live.com in your mobile browser and follow the simple instructions. If you have the RAM available or have a separate storage card, you might consider maximizing the cache setting directed at the stor...
OpenSearch Discovery for this Blog
Attached is the OpenSearch Discovery document for http://blogs.msdn.com/heaths. You can also use this file in Windows 7 Federated Search. Federated Search lets you search the web and other locations for different document types all within Windows. To add this search to Windows 7, follow these simple instructions. This should add "Heath's Blog" to Windows 7's Favorites link in Windows Explorer. To use this, simple click on that search folder and enter your search terms in the search bar. You can open web pages and copy URLs from within Windows. heaths.osdx
Visual Studio 2005 Service Pack 1 Rollback Breaks Some Applications
When installing Visual Studio 2005 Service Pack 1, there are a number of errors that might occur due to insufficient disk space. You might see an error like the following that reads, Error 1307.There is not enough disk space to install this file: D:WINDOWSSymbolsdllmfc80d.IA64.pdb. Free some disk space and click Retry, or click Cancel to exit. Another common error code is Windows Installer error 2908, which indicates that Windows Installer could not register a particular component. The installer has encountered an unexpected error installing this package. This may indicate a problem with this package. The error c...
Workaround for Error 2902 with Microsoft Visual Studio 2005 Tools for the Microsoft Office System
When installing Visual Studio 2005 Service Pack 1 on Microsoft Visual Studio 2005 Tools for the Microsoft Office System, you might see an error that reads, The installer has encountered an unexpected error installing this package. This may indicate a problem with this package. The error code is 2902. The arguments are: ixoRegAddValue, , You can see the problem in the following log snippet. MSI (s) (1C:74) [14:45:40:861]: Executing op: ActionStart(Name=WriteRegistryValues,Description=Writing system registry values,Template=Key: [1], Name: [2], Value: [3])MSI (s) (1C:74) [14:45:40:861]: Executing op: ProgressTotal(...
How to Safely Delete Orphaned Patches
If Visual Studio 2005 Service Pack 1 fails to install, you might find additional .msp files under %WINDIR%\Installer for each failed attempt. You should not simply delete these patches, however, because if one of the patches was applied successfully to one target product, deleting that patch will cause future maintenance installs – including repairs, patch install, patch uninstall, and even product uninstall – to fail. After safely identifying orphaned patches, you can delete them. There are a couple of different ways to identify orphaned patches. If you have the Windows SDK or the older Platform SDK installed ...
The Patch Cache and Freeing Space
When you install a patch using Windows Installer, the .msp file is cached in the %WINDIR%\Installer directory. This accounts for some of the space required by Visual Studio 2005 Service Pack 1. A single patch is cached only once regardless to how many products the patch applies. Starting with Windows Installer 3.0, any patches that contain the MsiPatchSequence table cause the Windows Installer service to cache any of the original files being replaced into the baseline cache. Any files being replaced in the latest minor upgrade by small update patches with this table are also cached. It is this baseline cache tha...
Feeds Extension for Internet Explorer
This article includes attachments to downloads for hosting some of my private works. RssIEExt.msi
Known Issues with Visual Studio 2005 Service Pack 1
There are several known issues when installing Visual Studio 2005 Service Pack 1. I've documented these below and, when possible, have included workarounds and status on any pending fixes. Contents Error 1718.File '...' was rejected by digital signature policy Install Rolls Back and Breaks Applications like Live Messenger Visual Studio 2005 Service Pack 1 Takes a Long Time to Install Visual Studio 2005 Service Pack 1 Requires a Lot of Disk Space Error 2908 – An Unexpected Error Installing the Package Other Installation Errors problem occurs mainly on Windows Server 2003 Service Pack 1, and could potentially...
Workaround for Error 1718
When installing Visual Studio 2005 Service Pack 1, you may see an error like the following (file name will vary): Error 1718.File D:WINDOWSInstaller50baad.msp was rejected by digital signature policy. Knowledge Base article 925336 had originally documented instructions using the Local Security Policy UI to work around this issue based on my previous blog post. While both Windows XP and Windows Server 2003 are theoretically susceptible to this issue, to date it's only been observed on Windows Server 2003 – particularly on machines in an Active Directory domain. Investigations showed that when there's a confl...
The Visual Studio 2005 Service Pack 1 Installation Experience
Visual Studio 2005 Service Pack 1 can take a long time to install and may apply to multiple products on your machine, appearing to install multiple times. This is a large service pack and installs a lot of files, fixing many issues and adding several new features to over 200 Visual Studio 2005 editions. What follows is a detailed description of the Visual Studio 2005 Service Pack 1 installation experience – or any of our patches for .NET Framework 2.0 and Visual Studio 2005 – describing what is going on during various steps with links to more information and tips to save time and space. Throughout this example, ...
Installation Guidelines for User-editable Configuration
A common problem with installations is user-editable files and registry keys. Configuration of this nature is a problem for every installer technology, but here are some guidelines to help developers overcome problems like users' preferences being reset during repair. Windows Installer is a data-driven installation technology. Installing a patch on a Windows Installer installation package, an .msi file, is just a repair operation with some new data transformed by the patch. When this occurs, any updated features, or features explicitly listed in the REINSTALL property, are reinstalled, along with their components...
Uninstall Visual Studio 2005 Service Pack 1 Beta before Installing the Release
Before installing the release of Visual Studio 2005 Service Pack 1, you must uninstall the Service Pack 1 Beta. If you do not uninstall the beta first, you will receive the following message localized appropriately for Windows, "The upgrade patch cannot be installed by the Windows Installer service because the program to be upgraded may be missing, or the upgrade patch may update a different version of the program. Verify that the program to be upgraded exists on your computer and that you have the correct upgrade patch." To uninstall the beta, please follow the instructions below appropriate to your Windows ...
Detecting Visual Studio 2005 Service Pack 1
Now that Visual Studio 2005 Service Pack 1 is released, it can be detected programmatically in various ways. Registry detection is recommended for ease and is less impacted by future changes to the product installation. Because there are many different Visual Studio 2005 editions and service pack 1 patch packages, you may need to perform several patch existence tests if you support a more general scope. For example, if you have a plug-in that supports Visual Studio 2005 Standard, Professional, or Team editions – regardless of languages – you may need to perform 9 tests for all the supported languages ...
Slipstreaming Visual Studio 2005 Service Pack 1
Now that Visual Studio 2005 Service Pack 1 is released, some are wondering how to slipstream the patch so they can install Visual Studio 2005 with SP1 already applied. Much of this process is standard practice for Windows Installer packages. Please note this will require a lot of disk space, as you’re unpacking around 3 GB – and more, if you add the MSDN installation, though that is not patched in this service pack – just for the product installation. 1. Install the Product You must create an administrative image of Visual Studio 2005 in order to slipstream the service pack in that way. Installi...
Source Resolution during Patch Uninstall
There are a number of guidelines to prevent requiring source media for patch installation. These guidelines can also help prevent requiring source media during patch uninstall, but there are a number of caveats. Recall from Rebuilding the Installer Cache that the baseline cache contains files that were replaced. But files that get replaced don't always get copied to the baseline cache. When uninstalling the patch, since these files aren't in the baseline cache, the original source media is required. If the source media isn't available in the registered cache locations, a prompt during UI installs will occur or th...
The Windows Installer Service
Some have noticed that the msiexec.exe process seems to run for quite some time after a known installation completing, or that the Windows Installer service starts and stops even though it is set to manual startup mode. These are often the same process, and when you see msiexec.exe running as SYSTEM that is the Windows Installer service running, or a custom action remoting service. When you use Windows Installer APIs like MsiInstallProduct or invoke msiexec.exe that will use these APIs itself, the Windows Installer service is started to handle the actual installation. This service will stop itself after 10 minute...
Rebuilding the Installer Cache
During some operations upgrades internally, a problem arose on some machines where a patch for the Microsoft .NET Framework 2.0 would fail to install. I was looped into the thread to diagnose the issue and found that the Windows Installer package and the patch package were both missing from the installer cache. Since a .msp file is just a container for transforms and files that apply to a .msi file, the .msi file must exist in order to be transformed and reinstalled. Any patches that are registered from previous installs must also exist, so when any of these files are missing it is a big problem. While only a cou...
Save Time and Space for VS 2005 SP1 by Disabling the Patch Cache
The upcoming Visual Studio 2005 Service Pack 1 can take a while to install and can require a lot of disk installed, and even more disk space while installing the patch. You can save a little of both by disabling the Windows Installer patch caching feature. Before doing so, understand that this patch cache contains copies of the files that were replaced by the service pack (a minor upgrade), so if you remove the cache or prevent it from being created in the first place, you will be required to have the original source media during uninstall of the service pack. Future patches may also require the original source m...
You Can’t Escape Quotes
SQL expression support is easy to use when modifying Windows Installer packages, but there is one major drawback that continues to cause problems: you can't escape single quotation marks in Windows Installer SQL expressions. Consider the following sample code: TCHAR szSQL[MAX_SQL];LPCTSTR pszExample = TEXT("Heath 'ClubStew' Stewart");_stprintf_s(szSQL, MAX_SQL, TEXT("INSERT INTO `Property` (`Property`, `Value`) VALUES ('Example', '%s')"), pszExample);uiRet = MsiDatabaseOpenView(hDatabase, szSQL, &hView); uiRet would be set to ERROR_BAD_QUERY_SYNTAX. This commonly occurs when working with French and Italian te...
Viewing Patches in Orca
I am often asked why file changes don't appear in the handy Windows Installer tool, Orca. When people open an .msp patch package in Orca, they will likely see something like the following: As described in What's in a Patch, a patch package contains transforms and, optionally, tables. Currently, Windows Installer-supported tables include the MsiPatchMetadata and MsiPatchSequence tables. In order to view the changes a patch would make to a product, you need to open up the target .msi installer package in Orca first. After you've opened the .msi package in Orca, either click the Transform -> View Patch menu i...
Microsoft .NET Framework 3.0 Released
Yesterday, the Microsoft .NET 3.0 Framework was released. This is comprised of the .NET Framework 2.0 plus Windows Workflow Foundation, Windows Presentation Foundation, and the Windows Communication Foundation. This release is intended to increase the scope of the original base class library, so while the 2.0 BCL is included this whole release is 3.0. This package is actually made-up of multiple Windows Installer packages, and the setup.exe bootstrap application will download only those packages needed. So, if you already have .NET 2.0 installed you won't need to download that 22+ MB (x86) or 45+ MB (x64) package...
Live Search Box
I recently added the Live Search Box to my blog, as you can see in the top right corner. This handy AJAX-enabled control allows you to use Live Search's powerful features, and to search other Windows Installer sites using a macro I created a while back. You can see the result in the screenshot below, or - better yet - just give it a try. It works in Internet Explorer and Firefox.
How Windows Installer uses Languages
Language support in Windows Installer can be confusing until you understand how Windows Installer queries for and uses languages. Some wonder why Windows Installer packages have two different places to set the language. Some wonder why, for example, localized packages install using a different language than the user's default UI language. Some of these answers are in the Windows Installer SDK documentation, while some is not. Described in this post is how languages are used from before the package is opened to what happens during installation. In general, Windows Installer looks for resources in the following ord...
Mitigating Custom Action Problems for Patches on Vista
Because some of the custom actions in Visual Studio 2005 are authored to impersonate the non-privileged token of the invoking user on Vista, a mitigation has been checked in for the patch wrapper that is used to add additional compression for the patch and to patch multiple products, if present, without rebooting in between. The native wrapper isn't automatically recognized as a setup executable like setup.exe, which is the filename used to install Visual Studio 2005 in the first place (which is why initial installation doesn't exhibit this problem). This means that, for the patch, the client portion of the patch...
Impersonating the Right Token in Vista
In The NoImpersonate Bit Mistake, Robert Flaming of the Windows Installer team discusses how some custom actions may fail because they impersonate the non-privileged client token and won't be able to perform some actions. Such a scenario is described in Custom Actions under UAC on Vista. For administrative users on Vista, a client token would typically be the filtered token and wouldn't have all rights granted that the non-filtered token, or full token, would have. If the client installation was elevated from the start, whether because of a manifest with the requestedExecutionLevel/@level attribute set to either ...
Comment Policy Change
Effective immediately, I am changing comment options on this blog to only allow comments for posts made within the last 60 days. Like Sara and most – if not all – other bloggers on this site, I get a lot of comment spam and it takes too much time to wade through, and in the past I've accidentally deleted a couple of comments or questions from real people. Given the educational nature of many of my older posts – and I actually refer to those often internally when helping explain problems and suggest solutions – I would encourage readers to use the contact page and I will try to keep up with...
VS 2005 SP1 Tries to Install Multiple Times
Some customers are reporting that Visual Studio 2005 Service Pack 1 Beta tries to install multiple times. There are a couple of actions that can reproduce this issue. First, because the SP1 patch is so large, it takes a while for wrapper to extract it. You can verify this by watching the working memory set increase in the task manager. Without any progress or status while extraction occurs in the beta patch, users might be inclined to double-click it again – perhaps even multiple times. We realize the lack of progress is a problem and are working to address that for the release of SP1, but for now only run ...
VS 2005 SP1 Requires a lot of Disk Space
Quite a few beta customers have reported that the Visual Studio 2005 Service Pack 1 Beta install requires a lot of space. This is by design a feature of Windows Installer. The amount of space required to install the patch can be reduced but a lot of space is still consumed after the patch is installed. Patches are cached in whole because when additional patches are installed or when the product is repaired while patches are already installed, those .msp files actually contain the source for those files being updated or added. Without the patch cached in whole a product repair would not have the files necessary to...
VS 2005 SP1 Takes a While to Install
One of the most-reported feedback issues with Visual Studio 2005 Service Pack 1 Beta is about how long it takes to install. There are, unfortunately, a couple things that account for this and currently nothing we can do to prevent them. We have been considering options to at least inform the users what to expect when installing VS 2005 SP1, and I can tell you how you can decrease the amount of time it takes to install the patch. As described in How Patching Works, a Windows Installer package is really just a relational database processed by a runtime, and Windows Installer patches contain transforms that change t...
Introducing the Patch Applicability Browser
Today I'm pleased to announce that Sara has helped me post a useful tool I wrote to help eliminate confusion to which products a patch applies and which of those products are installed on your system. There has been quite a bit of confusion because there are a lot of Visual Studio editions, and the Integrated Development Environment, or IDE, is used by other developers as a hosting platform for their add-ins, such as the SQL Server 2005 client. Some users were finding that a patch for Visual Studio reported Windows error 1642, or . In many cases only the IDE SKU was only installed, which has the appearance &ndash...
Patch Applicability Browser
Windows Installer patches can target multiple products, and Developer Division makes a practice of shipping patches that take advantage of this capability. This typically helps avoid confusion among users about which patch to download. However, because Visual Studio ships as many editions and even the Integrated Development Environment, or IDE, is used by other divisions such as SQL Server, it's not always clear to which products a patch applies and if you have that product installed. To help eliminate confusion in this case, I have created the Patch Applicability Browser. It's a simple application with a s...
Custom Actions under UAC in Vista
Visual Studio 2005 works for the most part on Windows Vista, but there are some known issues being addressed beyond SP1. One compatibility issue when running on Vista with UAC enabled may actually occur when installing the recently released SP1 beta on certain editions of Visual Studio 2005. User Account Control, or UAC, basically prevents even users in the local Administrators group from being administrators by trimming down their access tokens to remove all but necessary privileges. If an action requires more privileges the user is presented either with a prompt for credentials or with a simple Yes/No question ...
Visual Studio 2005 Service Pack 1 Beta Now Available
As announced on Soma's blog, Visual Studio 2005 Service Pack 1 Beta is available today. You can sign up to download the beta and receive more information about what was fixed. Shortly after you complete the survey to sign up you'll receive an email with a link to the download page where more information – including related KB articles – will be available. Readers have noticed that Visual Studio 2005 does work okay on Vista, but there are a few issues. One issue is that when installing the product or the service pack, setup may fail. During internal testing some custom actions failed when installing or...
Enabling Large Patches to Install
As we prepare to ship a large minor upgrade known as Visual Studio 2005 Service Pack 1, I'd like to again remind you that large files – not just Windows Installer packages – that must pass through a SAFER check may fail because enough contiguous memory cannot be allocated on Windows XP and Windows Server 2003. I have posted a workaround, but wanted to note that a more automation-friendly method can be used. If you run into this problem, you can disable the SAFER check for local administrators by following these instructions as well as those documented previously: It is recommended that you reset this ...
Installing Assemblies for Runtime and Design-time Use
The Microsoft .NET Framework installs assemblies into two different locations, and this practice is recommended to developers wishing to deploy assemblies both for runtime and design-time use. Runtime assemblies are those assemblies needed for an application to execute. It is recommended that you add runtime assemblies to the Global Assembly Cache (GAC). If you're deploying your assemblies in a Windows Installer package, you would add the file normally but then add records into the MsiAssembly and MsiAsemblyName tables. If you plan on doing in-place updates – though assembly versioning is recommended &ndash...
Sign Up for Visual Studio 2005 SP1 Beta
Lots of people have been asking when Visual Studio 2005 SP1 beta will be released. No dates are released yet, but you can now sign up for the Visual Studio 2005 Service Pack 1 Beta to be released on Microsoft Connect.
Making of a Service Pack
In response to a previous post about how large patches can cause problems, reader Zodman asks, "Would it be fair to say that SP1 is actually ready, and that the only hold up is problems with the install?"While I can't comment on any dates or availability, I can tell you we are working hard to provide the best possible customer experience to install Service Pack 1, and to provide as many fixes as possible that meet SP1's customer-focused bar.Making a product update as large as a service pack against a product install that already has many files is a long process. Bugs have to be triaged according to many factors.O...
Size does Matter
In response to a previous post where I mentioned that work was being done on Visual Studio 2005 SP1, reader ringi commented, "I would match rather has SP1 as a complete 4GB install, including having to uninstall Visual Studio 2005 then have it delayed just to save a little bit of bandwidth."Unfortunately, it's not just a question of bandwidth - even though that is a concern. Bandwidth costs money for our customers, too.Digital signatures help ensure that a patch has not tampered with, but an additional level of security called Software Restriction Policies is used when Windows Installer calls the function, which...
Digital Signatures in Windows Installer
Digitally signing files helps protect against changes to a file (or any data, really) by validating that a hash of the current file matches the hash stored in the digital signature. Digital signatures also help verify that a package came from a particular publisher by encrypting the hash with the publisher's private key. Verifying the signature using the publisher's public key or a trusted certificate authority that signed their public key validates the publisher.You can sign Windows Installer packages, such as .msi and .msp files, to help guarantee that users know if your files have been modified and that they c...
Determine if the Custom Action Function is Exported
Another reason a custom action may not run is because the custom action function isn't exported. This may not be common in most patch build systems, but could arise during authoring or if a binary wasn't updated in the Binary table. You should expect to find a log line similar to the following.MSI (s) (1C:C4) [16:57:23:258]: Doing action: CA_QuietExec_Post_InstallFilesAction start 16:57:23: CA_QuietExec_Post_InstallFiles.MSI (s) (1C:10) [16:57:23:274]: Invoking remote custom action. DLL: C:WINNTInstallerMSI140.tmp, Entrypoint: QuietExec_Post_InstallFilesMSI (s) (1C:C4) [16:57:23:274]: Note: 1: 1723 2: CA_QuietExe...
Been Busy on Visual Studio 2005 Service Pack 1
I've been away for a while, though I've barely left the Microsoft campus. As we prepare for Visual Studio 2005 Service Pack 1, I've been very busy with issues: especially an issue with the size of the patch. Visual Studio is probably the biggest product (in terms of the number of files at least; I do know of a couple products using Windows Installer for a smaller set of gigantic files) to use Windows Installer and we have a lot of editions: 13 non-Express editions in 9 languages currently. Recall from What's in a Patch that there exists a pair of transforms for every product targeted, based on val...
Virtual PC 2004 SP1 Now Free
Earlier today, Microsoft announced that Virtual PC 2004 SP1 is now free to download, and that Virtual PC 2007 will be free when released. Earlier this year Virtual Server 2005 R2 was made available for free download as well.Virtualization is great when testing Windows Installer packages and patches for installation and maintenance scenarios. I've been using Virtual PC 2004 SP1 at home since it was available for testing private projects, such as my shell extensions which can be a pain to test on your development machine. I use Virtual Server 2005 R2 at work to test installation packages and our patches so that I c...
Why a Custom Action May Not Run
When it appears that a custom action in your install package or patch isn't executing, you have to consider a couple of reasons. If the action has a condition in the Condition column of InstallUISequence table, the InstallExecuteSequence table, or any of the other sequence tables, the condition may have evaluated to False. In a verbose log you would see a line similar to the following.MSI (s) (74:08) [10:05:28:015]: Skipping action: DDSE_CA_Uninstall_InstallExecuteSequenceStarts (condition is false)Another common reason exists for binary custom actions: missing dependencies. When a binary custom action appears...
Blank Dialogs for .NET Framework 2.0 Patches
When you download a patch for .NET Framework 2.0 and double-click to install it, you'll find that the dialog is missing some text as in the example below. This is due, in part, to a bug in Windows Installer when the ProductLanguage property is 0 in the Property table. Windows Installer contains localized string tables for some basic text like for the Cancel button, and some errors that may be returned if the package can't be opened, a patch cannot be uninstalled, and other issues mainly before a package can even be loaded. Until the package is loaded and the ProductLanguage property is read, Windows ...
Biggest Donation in History
I normally try to refrain from posting content not related to the topics covered by this blog, but this news is too wonderful to pass up.Warren Buffett - second richest person in the world after Bill Gates - is giving roughly 83% of his stock in Berkshire, which is currently about $31 billion, to the Bill and Melinda Gates Foundation. An additional 2%, which is about $6 billion, is going to other charity foundations, including those run by Buffett's three children. This is not only good news for the Bill and Melinda Gates Foundation and those other charities to receive such a large donati...
Windows Installer SDK Tools and UAC Prompts
When using the tools from the Windows Installer SDK you might see the following dialog on Windows Vista. Windows Installer tools like msidb.exe shown here, msicert.exe, msifiler.exe, msiinfo.exe, msimerg.exe, msimsp.exe, msistuff.exe, msitran.exe, and wilogutl.exe use Windows Installer file functions. Msizap.exe is the only tool that may require elevated privileges. Tools like apatch.exe and mpatch.exe don't even use Windows Installer functions. So why the prompt? Take a look at the file properties shown below for msidb.exe. The word "Installer" was found in the version information block of the executable. Apat...
Find the Product
The Windows SDK Team instructs users how to uninstall older Platform SDK installations without the original source installation media. As part of their instructions, they write, RemoveProgram FilesMicrosoft SDK folder This is the painful part: Find all .msi that are releated to the February 2003 release in %windir%installer from the cmd line you can run msiexec.exe -x nameofmsi.msi There are a few ways of doing this. You could navigate to %WINDIR%Installer in Windows Explorer - a hidden folder for good reason - and add both the Title and Comments columns to the detail view (since some package misuse the Ti...
Cumulative Service Packs with MinorUpdateTargetRTM
Microsoft has had a long-standing policy of providing cumulative service packs - service packs that can be installed for a product whether a previous service pack for that product has been installed or not. Prior to the release of Windows Installer 3.1, minor upgrades which typically serve as service packs had to contain a pair of transforms for every servicing level including the original product (RTM) and all previous service packs (SPs) - perhaps even beta service packs. This not only increases time to create a patch since you'll have ever-increasing numbers of pairs of target and upgrade .msi files, but als...
Be Careful or Even Avoid Using Type 35 Custom Actions
My blog was pretty quiet for a while because of a problem we ran into regarding Windows Installer type 35 custom actions. These custom actions change the target location for a directory.Developer Division uses type 35 custom actions for vertical integration with other editions of our Visual Studio products, so that installing products with shared features such as Visual Basic .NET don't install into two separate locations. It's not enough to use shared components since some editions contain a superset of components, so if another product with the same general feature is installed, type 35 custom actions are used ...
Always use Unique Package Codes
It's well documented and understood that package codes should be unique for product and patch packages. The package code, also referred to as a patch code for .msp files, is a unique identifier for that package. For patches, the patch code may also be used for obsolescence, where patch codes for patches to be obsolesced are entered into the Revision Number Summary Property after the initial package code.Our old patch build system only had to target products for x86 so patch codes were stored for each release, which corresponds to a Knowledge Base article. The new patch build system for .NET Framework 2.0 and Visu...
Run ICE Validation and Fix Errors
Windows Installer is a powerful yet complex technology. There are a lot of rules that have to be followed to be able to successfully install, maintain, and uninstall your product and to retain the functionality and tidy clean-up capabilities of Windows Installer. To this end, Internal Consistency Evaluators (ICEs) exist to aid in validating that you have followed many of the rules and should be part of anyone's exit criteria who's building an installation for their product using Windows Installer.ICEs check the Windows Installer package database for violation of rules. Many of these are serious, such as duplicate...
File Sequencing and How Files are Located
The File table in a Windows Installer package has a Sequence column that begins with 1. Besides determining in what order files are to be installed, this column serves another, relatively more important function: determining where the source files are located.In concert with the Media table, a range of sequence numbers identify in which cabinet - if that range of files is even compressed - the files are located. The Media table has a column named LastSequence that is inclusive of the maximum sequence number of a particular file range. All files in the File table with a sequence number greater than the previous M...
Posting from Word 2007
I’ve been using primarily Microsoft FrontPage 2003 to author blogs because, like many people, even the reduced HTML output of Word 2003 and older wasn’t clean and tidy and was often difficult to stylize in CSS. This also made it a pain to copy and paste code samples from Visual Studio into Word in order to get HTML to then paste in my blog. But now, thanks to Joe Friend and his feature team, you can now post clean and tidy HTML directly to blogs in Word 2007 Beta 2. I was already impressed with Office 2007 Beta 1 and what I’ve seen so far in Beta 2, but this really is just the icing on the cake....
Paint.NET 2 Go
One nice thing about managed applications is the push for touch-free application deployment. Paint.NET is a perfect example of a relatively powerful application that can simply be copied to any machine with the required .NET Framework version installed and then executed. With the recent release of Paint.NET v2.62 I wanted to take advantage of touch-free deployment but in a smaller package that I could easily fit on my USB flash drive or download in minimal time with minimal space required.I first installed Paint.NET, which is about 11 MB in side. I then created a new directory, copying only the necessary files fo...
Update for the Palm Treo 700w Available Again
The first update that Palm provided for the Treo 700w wasn't available for long. Soon after I posted about at least one problem with the installation process the update was pulled.I have been informed that the updater is back up and, looking in the downloaded .zip file I see that the ® and ™ symbols have been removed from the file name.According to their site, you don't need to download this update and install it in order to install the update to the Palm Treo 700w itself if you already have done so successfully. As posted on their site, Note: This update has not been modified from the one posted earlie...
Deleting Bad Feed Items
I'm been using the Windows RSS Platform provided for down-level systems with Internet Explorer 7 for a while, but every so often a few blog posts from our MSDN aggregated feed contain markup or links that cause problems, such as absolute-positioned s and image sources on servers requiring authentication. I can't just unsubscribe to be rid of those bad feed items because this is the MSDN aggregated feed and I like the variety of news.Fortunately, the Windows RSS Platform exposes APIs to any COM-compatible languages and technologies like C++, .NET, and Windows Script Host. It also provides a means of deleting a p...
Update for the Palm Treo 700w Available, with Problems
Palm has released an update to address many of the problems I mentioned previously as well as other issues. While this update is to address problems with the Treo 700w, the update itself had several problems.The first problem I encountered and likely many others will is that when you run setup.exe per instructions you might see a dialog like the one below. I'll get to the details about that shortly.The installation instructions also tell you to disable any anti-virus software and I highly recommend doing so. However, with some firewall software like Windows OneCare you should disable the firewall, too, since any ...
Calculating Required Space for Installation
Installing a Windows Installer product package requires a certain amount of space on disk, even if all the installation is doing is running a custom action. Besides file costing and other actions typically sandwiched between the CostInitialize and CostFinalize standard actions, Windows Installer will require space under %WINDIR%Installer to cache the .msi file, stripped of all cabinet streams in the primary storage object, which is the .msi file itself.To roughly calculate the maximum space required for an installation, you need to take into account all the file sizes as well as the stripped .msi file that will b...
Avoid Overwriting Files in Administrative Installations
Last June before the Microsoft .NET Framework 2.0 shipped, I discussed how during administrative installations some 64-bit files overwrote some 32-bit files and I provided a transform to fix the issue. I filed a bug and the issue was fixed before .NET 2.0 shipped. Later in the release cycle the Office Crash Reporting Tool, otherwise known as the Microsoft Application Error Reporting tool or "Dr. Watson", was merged into the .NET 2.0 .msi files for each processor architecture and shipped.Take a look at the component entries for different files with the same name for both x64 and x86 processor architectures. Paragr...
Detecting Patches in .NET 2.0 and Visual Studio 2005
Aaron Stebner posted some sample code to detect whether the .NET Framework 1.0, 1.1, or 2.0 were installed and at what service pack level they are. Basically, the .NET Framework installation writes a common, version-specific registry key in the following location along with an SP level registry value. The sample below for an English (United States) installation of .NET 2.0 is shown using the registry file format.[HKEY_LOCAL_MACHINESOFTWAREMicrosoftNET Framework SetupNDPv2.0.50727] "Install"=dword:00000001 "MSI"=dword:00000001 "SP"=dword:00000000 [HKEY_LOCAL_MACHINESOFTWAREMicrosoftNET Framework SetupNDPv2.0.5072...
Patch Files Extractor
Previously I discussed conceptually how to extract files from a patch, mentioning that the transforms contained within patches are stored as sub-storages and the cabinets that contain the files are stored as sub-streams. I've had a tool for a while that extracts the transforms and cabinets from a .msp file and wanted to share the slightly modified source for public consumption. This tool can extract transforms and binary streams from other Windows Installer file types such as .msi and .msm files, as well as other compound storage documents.You can download the source and a release binary that programmatically doe...
New MVP: Javier Lozano
Back in January 2005, a former employee and friend of mine, Nick Parker, was awarded as a Microsoft Most Valuable Professional (MVP) for his contributions to the same site where I haunted and got my MVP shortly before I joined Microsoft. He and another former employee and friend helped start and currently serve on the board of the Iowa .NET User Group in central Iowa.Now that friend, Javier Lozano, has been awarded an MVP as well. These two guys have given talks around the Mid-west, such as at DevCon 2005 in Minneapolis and Omaha. Javier and his wife just recently had a baby, too, so it h...
Update #2 on Problems with the Palm Treo 700w
After both Verizon Wireless first and second tier support, and even Palm support told me that the Palm Treo 700w must not support stereo - which, of course, doesn't sound conclusive - I heard from both internal distribution lists and external forums that the Treo does, in fact, support stereo sound and that some headsets - like the one I was recommended at the Verizon Wireless store - do not switch impedance to indicate to the Smartphone to switch into stereo mode.After all the misinformation I was given and before I posted I wanted to make sure this was the case, so I asked Palm Support for a definitive answer a...
Opening Patch Files when Compiled for Unicode
If you want to open a .msp file with the Windows Installer APIs, you must pass to the function, or (110) is returned. Below is the definition of both and from msiquery.h in the Windows Installer SDK.#define MSIDBOPEN_READONLY (LPCTSTR)0#define MSIDBOPEN_PATCHFILE 32/sizeof(*MSIDBOPEN_READONLY) is defined as when is defined, which is defined as . Since is 2, the value of is 16 when is defined. If you pass this to either the function or the function is still returned. The value must always be defined as 32.For the automation method the second parameter must be set to to open a patch, which is always ...
Update on Problems with the Palm Treo 700w
I previously mentioned some problems I was having with the Palm Treo 700w and that these were not isolated issues. After several calls and more research I have a few updates.A lot of referrals came in from a thread about the SMS text messaging issue for the Palm Treo 700w on the Verizon network. Text messages are sent to tell Pocket Outlook to synchronize with the server but unless you have the TXT Messaging feature on your plan you get charged $0.10 per text message incoming or outgoing. You can either setup your device to only sync on a schedule or ask Verizon about the PDA 2000 SMS ALLOWANCE.Regarding the ste...
Specifying the Code Page for Patch Tables
Code pages describe a character set. In MSI Databases and Code Pages I described how Windows Installer databases use a code page for the string pool, as well that the summary information stream uses its own code page in (1) to describe strings in the summary information stream. There is a bug, however, when creating a .msp patch database from a .pcp patch creation database using PatchWiz.dll. The code page of the .pcp database is not set in the .msp patch, so non-ASCII character don't show up correctly. You can verify this using the msiinfo.exe tool in the Windows Installer SDK by passing the path to the .msp fi...
Problems with the Palm Treo 700w
I bought a Palm Treo 700w a short while ago and for the most part have been loving it. It combines Palm's great hardware with Microsoft Windows Mobile programming and great user interface. All this hasn't been without its problems, though.When I set up ActiveSync on the device to work withour corporate Exchange server I set the off-peak synchronization for Pocket Outlook to automatically update (AUTD). When I got the data plan I also dropped TXT Messaging from my plan. When my bill arrived I had to pay for 99 SMS text messages. Turns out that AUTD on the Treo 700w uses SMS from the Exchange server to tell Pocket ...
Identifying Administrative Installation Patches
Windows Installer has the ability to create administrative installations, which is a copy of the .msi database and files that have been expanded into a source directory structure. These administrative installations can easily be deployed using Active Directory group policy deployment among other things, such as creating patches since PatchWiz.dll requires that patch sources are not compressed. You can create administrative installations using the /a command-line switch, which corresponds to if specified in the command-line arguments.You can also patch an administrative installation using both the /a and /p co...
Formatting Properties
A frequently asked question is about why property values in the Property table aren't formatted when the values contain properties themselves, such as:[ProductName] is copyright by [Manufacturer].The reason these property values aren't formatted is because the Value column type is simply Text, not Formatted. Other formattable column types exist, including Template and Condition types. Since properties can be included in formattable strings, the Property table does not allow formattable values because it could create a circular reference, such as with the following example archive file format:Property &...
Building with Wix.Targets
I've been away for a while working on a high priority issue that I'll discuss in detail soon, as well as investigating a common issue regarding 32- and 64-bit installations about which I'll write a new series of posts. For much of that work I've been using Windows Installer XML, or WIX, which allows me to build Windows Installer packages, merge modules, and patches (actually, just the .pcp files as input to PatchWiz.dll) using XML with support for preprocessor directives. You can find out more about WIX at http://wix.sourceforge.net/, as well as from Rob Mensching's blog, who is the creator and "benevolent dictat...
Identifying Windows Installer File Types
I've been writing a number of helpful tools at work such as a tool to extract transforms and cabinets from a patch and wasn't satisfied relying on the file extension to identify a patch, or other Windows Installer file types for that matter. File extensions are only one way to help the shell to invoke actions on files, filter file types in common dialogs, and more.If you try to open an .msp file with the function you must pass the flag to the parameter or the function fails. Passing this flag for other Windows Installer file types also results in an error, and this function cannot be used to open .msi files. C...
Book Review: Customizing the Microsoft .NET Framework Common Language Runtime
As you might have noticed from various posts on my blog I love understanding how things work. When I started learning the Microsoft .NET Framework 1.0 I delved into intermediate language (IL) for most of the assemblies and learned about the hosting interfaces. If you have such a passion for learning how things work then Customizing the Microsoft .NET Framework Common Language Runtime from MS Press by Steven Pratschner is the book for you.Customizing the Microsoft .NET Framework Common Language Runtime delves into all the hosting interfaces and features of the .NET Framework 2.0. There's a lot of new control provi...
Determine Which Files are Being Patched
Installing a patch will often mean that files are to be updated, though patching isn't limited or even required to just patch files. Starting with Windows Installer 3.0 you can find the final sequence of patches to be installed or reinstalled in a verbose log file similar to the following:MSI (c) (8C:C4) [14:27:53:319]: Final Patch Application Order:MSI (c) (8C:C4) [14:27:53:319]: {3DB7C93B-AA16-49E8-9D9E-D427F2C5DDEB}MSI (c) (8C:C4) [14:27:53:319]: {685E109C-738F-4575-B1FA-CF645F3611F0} - Example.mspTransforms from all applicable patches will be resolved in that order. Read How Patching Works for more details.Bu...
Fast Searching in Public Folders
I respond to a lot of questions answered on an internal alias for Windows Installer support, some of which inspire posts on my blog. That alias is also archived in a public folder on our corporate Exchange server so there is a vast treasure trove of information for reading - far too much to use Outlook's built-in search.For those also in an environment where public folders exist in Exchange full of information, there are many ways to find information quickly. I prefer to use Windows Desktop Search. To set this up, follow these instructions: You can now force a rebuild of the index...
Extract Files from Patches
From the mailbag, someone asked how to extract files from a patch. Now presumably one would want to extract the files as they apply to a product if the patch were installed but I will cover both ways because one can lead to the other. If you're looking for the simplest and quickest way to extract files from a patch skip toward the end; otherwise, if you're interested in the structure of a .msp file and how to extract all files regardless of a particular product the patch targets read on.Recall from What's in a Patch that a .msp file contains sub-storages for pairs of transforms that transform the patch target pac...
Blog Customizations, Part 4: OpenSearch Discovery
I'm a big fan of extensibility, which is why I was excited to see in a recent blog post on the IE Blog about OpenSearch discovery using <link/> elements. OpenSearch is a collection of XML schemas and extensions to RSS that enables clients like Internet Explorer to interact with search results in order to discover, query, and parse search results in a standard way.Web sites can add new search providers using in Internet Explorer 7 Beta 2 Preview. I'm not naive enough to think anyone would want a permanent provider listing for my blog, but I have again customized this blog to add two <link/> eleme...
Common Controls in Windows Installer UI
Notice the differences between the following two dialogs from the same Windows Installer package on the same Windows XP machine.The first dialog is displayed when launching a sample .msi file using the msiwai.exe program I detailed before. The second dialog is displayed when the sample .msi file is launched from Windows Explorer, thus using the default handler, msiexec.exe. So why the difference?The difference between the two executable is that msiexec.exe has an embedded manifest to bind to the Common Controls 6 side-by-side native assembly, while my sample application msiwai.exe has no such manifest and, thus, ...
Differentiating 64-bit Editions of Windows XP and Windows Server 2003
Microsoft Windows provides a lot of base services on which applications can be written, but there are differences between all the various editions of Windows. While it's far more common to have a minimum dependency on a particular platform, cases may arise where an application may require, for example, Windows XP but won't run on Windows Server 2003. The recent release of Internet Explorer 7.0 Beta 2 Preview is one such example, requiring Windows XP SP2. While ultimately you should use the AppSearch table and related tables like the DrLocator table for finding directories and files, along with the Signature ta...
64-bit Managed Custom Actions with Visual Studio
A reader who happened across my post on Windows Installer on 64-bit Platforms mentioned a problem with running 64-bit managed custom actions using the Visual Studio 2005 Windows Installer project. This also recently cropped up in an internal discussion alias.The issue is that if you build a managed class library project targeting a 64-bit platform using or and install a Windows Installer package built in Visual Studio 2005 on a 64-bit machine a is thrown. The reason is because the native shim packaged with the .msi file is a 32-bit executable.Let's step back a minute, though, to how to build a Windows Install...
Developer Division Servicing Site Launched
Servicing a large product like Visual Studio or a side-by-side component like the .NET Framework is no small task and is full of challenges. This blog currently describes some of those challenges in hopes of helping others avoid some of the same problems.Today, a site dedicated to servicing Visual Studio and the .NET Framework has launched on MSDN with more information on our processes, roadmaps to future patches like service packs and QFEs, and more.See http://msdn.microsoft.com/vstudio/support/servicing/ for details.It also aggregates the Developer Division Customer Product-lifecycle Experience team's blog...
Setup.exe Bootstrap Sample and APPVER
On an internal alias - which inspires many of my blog entries - someone wasn't able to run the sample bootstrap executable setup.exe, found in the Samples/SysMgmt/Msi/Setup.exe folder in your Platform SDK installation root. The error was "setup.exe is not a valid Win32 application" when run on Windows 2000 but the sample worked fine on Windows XP. Right away it would seem that something in the PE headers of the sample something is wrong. Take a look at part of the dumpbin.exe output: Because the subsystem version is 5.01 the executable will run on a minimum operating system of Windows XP. So how did ...
Why is My Feature Advertised?
If you're patching a feature or features of a Windows Installer package and see that a feature you know to be installed locally is now advertised, look for the following in your Windows Installer log:MSI (c) (B8:C0) [12:00:00:000]: SELMGR: ComponentId '{01234567-89AB-CDEF-0123-456789ABCDEF}' is registered to feature 'FeatureA', but is not present in the Component table. Removal of components from a feature is not supported! MSI (c) (B8:C0) [12:00:00:000]: SELMGR: Removal of a component from a feature is not supportedThe reason is documented is Changing the Product Code in the Windows Installer SDK: components c...
Suppressing Console Windows for Custom Actions
If you have authored a custom action into your installer package and are annoyed by the console window that always pops up when the custom action runs, it's because the custom action executable is running under the console subsystem.When you link your object files with the VC++ linker you can specify the subsystem using the /SUBSYSTEM switch. If you're using the C# or VB.NET compilers the /target switch allows you to specify which subsystem to use for the executable. However you specify the subsystem or however it's determined depending on which entry point you use, you shouldn't use the console subsystem for c...
Waiting to Install
If you've ever tried to install a Windows Installer package and had returned (1618) it's because the Windows Installer execution server is already processing another install, administrative install, or advertisement action. That is, Windows Installer is processing the InstallExecuteSequence table, the AdminExecuteSequence table, or the AdvtExecuteSequence table, respectively. This is because right before the action is run in the server context Windows Installer grabs the _MSIExecute mutex. Take a look at the log below: === Verbose logging started: 10/3/2005 14:26:48 Build type: SHIP UNICODE 3.01.4000.2435 Cal...
Windows Live Favorites Now More Useful
Microsoft announced Windows Live back in November. Since then I've used several of the new services, including my favorite - Windows Live Local (previously MSN Virtual Earth in an earlier incarnation). One service to which I just couldn't see any benefit yet (I know, it's still beta) was Windows Live Favorites.Years ago Netscape 4 had a feature I loved - roaming profiles. You could set up a directory for WebDAV access or a proprietary module for Apache - if I recall correctly - and your profile would be downloaded when the browser suite opened and uploaded again when the browser was closed. No matter where I went...
Error 2262: Not Necessarily a Fatal Error
Someone wondered if the following found in a Windows Installer log was indeed an error:MSI (c) (A8:A0) [14:38:51:427]: Transforming table Error.MSI (c) (A8:A0) [14:38:51:427]: Note: 1: 2262 2: Error 3: -2147287038Recall from Diagnosing Installation Errors that field 1 in the second line indicates the Windows Installer error. If you look that up in the Windows Installer Error Messages reference documentation you'll see that error 2262 (in English) reads, "Stream does not exist: [2]. System error: [3]." If you format the message using the fields in the second log line you'll read, "Stream does not exist: Error. Sys...
Guidelines for COM Interoperability from .NET
Below is a running list of posts with guidelines for exposing types from .NET to COM clients. I make occasional updates and will add newer updates to the top of this list. This article serves as an easy reference point with a user-friendly URL to which others or I can refer.
Guidelines for COM Interoperability from .NET (Update 1)
Sometime back I posted Guidelines for COM Interoperability from .NET where I enumerated several practices to follow when exposing types from your managed assemblies to COM. This update is to provide some additional information with the release of the Microsoft .NET Framework 2.0 as well as correct one statement I made with regard to inheritting interfaces when those interfaces are exposed either as automation interfaces (inheriting from ) or dual interfaces (inheriting both from and ).Previously I mentioned that you should declare class interfaces explicitly and implement them as the first interface on your class...
Why is Mscoree.lib So Old?
Some people have noticed that mscoree.lib in the Program FilesMicrosoft Visual Studio 2005VCPlatfromSDKLib directory is older than the release date for .NET 2.0. If you run dumpbin.exe on the two libraries you'll see vastly different time stamps:> dumpbin.exe /headers "Program FilesMicrosoft Visual Studio 8VCPlatfromSDKLibmscoree.lib"Dump of file C:Program FilesMicrosoft Visual Studio 8VCPlatformSDKlibmscoree.libFile Type: LIBRARYFILE HEADER VALUES 14C machine (x86) &nbs...
Where's Msi.lib?
If you're developing custom actions for Windows Installer or a bootstrapper in Visual Studio 2005, or utilizing the resiliency and install-on-demand features of Windows Installer in your product developed in Visual Studio 2005, you might get link errors for Windows Installer functions. Msi.lib was not included for x86 in the Platform SDK lib directory if you installed Visual C++. It is present for x64 in the AMD64 sub-directory and the IA64 sub-directory, however. See Visual Studio 2005 Product Line Overview for what editions are affected.In order to get msi.lib for x86 you need to install at least the Windows...
Diagnosing Installation Errors
When problems occur when installing, repairing or patching, or uninstalling a product using Windows Installer technology, you need to be able to figure out what happened and why it happened. Dialogs that occur when the user interface is displayed can be helpful sometimes, but many times you need to look at a log to determine the exact cause of the problem.The first step in diagnosing a problem using the log is to, of course, enable logging. When performing any actions with an installation package or patch always be sure to pass on the command line. This enables verbose logging. You can also use which outputs de...
InstallSite.org
Looking through my referrals for common queries that lead people to my blogs, I noticed several recently from http://www.installsite.org/ and was pleased to see this blog listed in Stefan's related blogs. InstallSite.org has been run by Stefan Krueger for many years, dating back to when Windows Installer 1.0 was released when I happened across the site and even posted several merge modules, some of which you can still find at http://www.installsite.org/pages/en/msi/msm.htm.Stefan is a Microsoft MVP for Windows Installer technology and has run a very great web site full of information. If you are writing inst...
Resolving Prompts for Source
When discussing the Windows Installer cache, I mentioned how cabinet streams are stripped from the .msi file when the Windows Installer package is cached, and how this is a contributing factor to prompts for source. A prompt for source will occur when repairing or patching a product if the source for a file to reinstalled is not present. This results in the Windows Installer error 1706 to be displayed if installing with a user interface and in the log, and the Windows error 1603 () to be returned from the process.Prior to Windows Installer 2.0 the original installation source was always necessary but that was fix...
Windows Installer Cache
Windows Installer packages may contain streams identified in the Media table if the Cabinet column value begins with the number sign #, as documented for the Cabinet data type. This cabinet is embedded as a stream within the .msi file and contains files referenced in the File table using their File key column value. When packages are installed, however, cabinet streams are stripped from the .msi file and the .msi file is copied to %WINDIR%\Installer. This saves a significant amount of space required for large packages that are installed on the machine; however, this is part of the reason for prompts for source wh...
Blog Customizations, Part 3: OO JavaScript
Not satisfied by the search feature provided by Community Server I've again created some helpful JavaScript classes this time using object-oriented JavaScript to define a basic search provider and to subclass that for specialized providers like MSN Search. I defined several private properties and several privileged methods that can access those private properties, unlike public methods in classical object-oriented languages. Thanks to closures those methods can access those private properties — defined as local variables — even after the constructor function has returned. To define a subclass we use t...
Shell Extensions for .NET Assemblies, Version 1.4.1993
Some time back I made modifications to the previous version of my shell extensions for .NET assemblies to display differences in the column handler for both native and managed binaries targeting the x86, IA64, and x64 platform architectures. Now that the Microsoft .NET Framework 2.0 has released, I've updated my public drops. In a future version I'll be updating the dispatch interface to return a of type rather than since JScript and VBScript only support an array of , and will add support for localization.
Waiting for msiexec.exe to Finish
Since Windows Installer 1.0 was first released, msiexec.exe has always run in the Windows subsystem. That means that when it is executed from the console or by a batch script control returns to the console or script immediately. If you depend upon the variable being set accordingly it won't be. In this scenario I like to use from the command line or a batch script. This will create the process and wait for it to exit, and the return code from the process is passed through and returned from the start command such that is set accordingly. Just type before the command line you'd normally pass to msiexec.exe like...
Windows Installer Supportability
Because newer versions of Windows Installer are released with new functionality dependent on operating system features, and older versions of Windows reach the end of their support lifecycle, different versions of Windows Installer are supported on different versions of Windows. Below is the supportability matrix for what versions of Windows Installer shipped on what versions of Windows, as well as the latest version of Windows Installer that is supported at the time this information was posted.
Setup Troubleshooting Guide Applicable for Patches, Too
Aaron Stebner has posted a compilation of links to many great posts about troubleshooting setup issues regarding, primarily, Visual Studio 2005 and the .NET Framework 2.0. It's important to note that much of this is relevant to patch issues, too; though, I suspect you'll see far fewer of these than with previous releases because of the many changes we've made, including removal of most custom code and simplification of our patch wrapper (which is primarily responsible for making sure the patch applies to all applicable installed products without rebooting in between).Because both Visual Studio 2005 and the Framew...
Save Time when Installing Patches
Beginning with Windows Installer 3.0 you can install multiple patches at once, i.e. in a single install transaction. To do this you pass a semicolon-delimited list of fully-qualified paths to patches to the property. Windows Installer 2.0-style patches are sequenced first in the ordered specified, but then 3.0-style patches are sequenced according to information in each of their tables and superseded accordingly, as documented in How Patches Work.This can save a lot of time for many products. The Microsoft .NET Framework 2.0, for example, synchronously generates native images for many assemblies it installs. Th...
Windows Installer on 64-bit Platforms
Beginning with Windows Installer 2.0 installation developers can write installation packages that target 64-bit platforms. At first only IA64 was supported but support for AMD64 — now collectively referred to along with EM64T as x64 — was added in Windows Installer 3.0. Many questions are asked regarding how to author 64-bit packages and merge modules so I will attempt to enumerate and briefly explain the available resources here.The point of authoring a package differently for 64-bit platforms is to deploy 64-bit binaries and write registry values for 64-bit access correctly. While you can install a ...
Logging for the New Patch Wrapper
One of several apparent improvements for the new patch wrapper is better logging support. More often than not if a problem occurred while trying to install the patch it was difficult to diagnose because there was no logs for the patch installation itself. A user would have to extract the .msp file and install it using msiexec.exe and pass verbose logging options, or would have to enabled the Windows Installer logging policy and find the right MSI*.log file in their his or her %TEMP% directory. Now all logs are created by default for both the wrapper and the patch itself.The new patch wrapper will create a verbose...
Patch Wrapper Improvements
A new patch wrapper will be shipping for patches targeting the Microsoft .NET Framework 2.0 and Visual Studio 2005. A lot of work went into simplifying the wrapper and removing managed code, as well as standardizing the command-line options.The previous patch wrapper for the .NET Framework 1.0 and 1.1, and Visual Studio .NET 2002 and 2003, supported the following command-line options: Because the patch wrapper actually reconstituted the .msp while extracting via the /Xp command-line option you couldn't just grab the .msp out of the patch using an unzip application. Doing so will result in an unusually smal...
ARPSYSTEMCOMPONENT and Sequencing
Sequencing Windows Installer patches is typically straight forward but when the original product install or a previous, non-superseded patch defines as 1 in the Property table a custom supersedence plan is necessary to support writing Add/Remove Program registry keys correctly with patch supersedence and sequencing in mind.
A Better Way of Working with ARPSYSTEMCOMPONENT
Just when you thought the series on was over, I present to you an improved plan for supporting custom supersedence so that you can ship effectively superseded patches and still support N-1 patches, which are patches that apply to the RTM or a previous Service Pack, but are produced after the SP that should supersede them and all other patches that target the RTM or previous SPs.Previously a separate feature was used for each patch but this forced us to add that to via a custom action so users didn't have to specify that and run some standard actions, then do something similar to set . Calling these standard act...
Installing Windows Installer on Checked Builds of Windows
I mentioned previous that patches for the .NET Framework 2.0 and Visual Studio 2005 will require Windows Installer 3.1 to be installed on Windows 2000, XP, 2003, and future Windows platforms. A reader mentioned that he can't install the Windows Installer 3.1 redistributable on his checked (debug) build of Windows XP SP2. An error dialog was displayed that read, "KB893803v2 Setup cannot update a checked (debug) system with a free (retail) version of KB893803v2, or vice versa."The reason is that update.exe packages only install retail bits on retail builds and checked bits on checked builds. You can spoof Windows p...
Repair Your Products After an OS Upgrade
The Microsoft .NET Framework 2.0, Visual Studio 2005, and SQL Server 2005 will soon be shipping. If you'll be installing these products and are planning on upgrading your operating system later be sure to repair the product from the Add/Remove Programs (ARP) control panel.Some components don't install on certain operating systems. Mostly notably are ASP.NET server-related files on Windows 98 and Me, and Win32 Side-by-Side components on older Windows NT-based platforms. When you upgrade the operating systems you'll most likely want these installed. They aren't installed originally because they are transitive compo...
MSDN Magazine Available for Download
Maybe I'm the last one to realize this, but in case I'm not I wanted to share with the rest of you.When I became I Microsoft MVP back in January 2004, I was entitled to a free MSDN Magazine subscription. I've had this before and it is a great magazine comprised of interesting, helpful articles by some very good authors. My subscription just ran out last month but I decided not to renew because it's available online for free and now I'd have to pay for it. I do miss having it in-hand, however, during long flights and other times when it'd be nice to read.Stephen Toub — author of the ".NET Matters" columns in...
Supporting MSI 2.0 and Newer Features
Like all major upgrades, Windows Installer adds features to at least each major version released. Windows Installer 2.0 added support for managed and Win32 assemblies, signed installer support, and much more over previous 1.x versions of Windows Installer. Windows Installer 3.0 added support for more robust patch sequencing, installing multiple patches at once, double-clickable patches, and more.The version of Windows Installer supported on Windows 98 and Me is Windows Installer 2.0 but from my announcement earlier today you can see that the Microsoft .NET Framework 2.0 and Visual Studio 2005, at least, will requ...
.NET 2.0 and Visual Studio 2005 Patches will Required MSI 3.1
The .NET Framework 2.0 and Visual Studio 2005, along with SQL Server 2005 and BizTalk Server 2006, will be officially launched November 7th. .NET and Visual Studio, at least, will require that you have Windows Installer 3.0 installed on Windows NT-based platforms, including Windows 2000, Windows XP, Windows 2003, and newer. If you have Windows XP SP2 installed you have at least Windows Installer 3.0. If you have Windows 2003 SP1 installed, or you have Windows XP or Windows 2003 for x64 then you already have at least Windows Installer 3.1.For reasons that affect servicing, patches for .NET and the Visual...
MSI Databases and Code Pages
A Windows Installer database is full of strings. Most times those strings don't cause a problem when using the standard, printable characters found in all code pages. These are called ASCII characters and are the same for the first 7 bits (0x00 through 0x7F) for all code pages except for a few rare code pages in existence for legacy support. If a Windows Installer database requires extended characters — characters where the 8th bit is set (0x80 through 0xFF) — then a code page is necessary to define how those characters are displayed. For example, decimal character 255 is ÿ in ANSI code page 1252...
Double-clickable Patches
Beginning with Windows Installer 3.0, bare .msp files can be double-clicked (invoked with the default verb) and will install correctly, assuming no other problems. Windows Installer will determine the updated features based on the changed components and will automatically reinstall those features. The effect is the same as specifying those features in the property, which is what you had to do previously for patches. This can be done for patches on previous versions of Windows Installer as well.When we build patches we keep track of what components are updated and added, then calculate what features are updated b...
Building Quality Windows Installer Packages
Building quality installation packages not only helps set up your application correctly but also helps maintain your application. A quality installer fosters quality patches. The Windows Installer SDK offers a lot of information about how to author installation packages but how do you do it right? Why not ask the Windows Installer team?The Windows Installer team has announced a new series on building quality installers. Windows Installer is a powerful installation technology that also boasts resiliency but to harness all its features you have to author data a certain way. There are some good installer develo...
Controlling how MsiPatchSequence is Generated
When running on Windows Installer 3.0 and newer, the MsiPatchSequence table dictates how patches apply to a target product install. When using PatchWiz.dll, you can allow this table to be automatically generated, fill it with data yourself, or even prevent it from being generated if you want Windows Installer 2.0 behavior. This means that applicable patches will only be applied in the order specified, among other things.PatchWiz.dll is used to automatically generate transforms between 1 or more sets of target and upgrade .msi files, store them in an .msp file, and compress all the changed files in a .cab file tha...
Don't Install from a Drive Substitution
If you're not familiar with the subst.exe application, it allows you to create DOS devices for a given path using the API. Note in the API remarks the following:Windows Server 2003 and Windows XP: The function creates a device name for a caller that is not running in the LocalSystem context in its own Local MS-DOS device namespace. If the caller is running in the LocalSystem context, the function creates the device name in the Global MS-DOS device namespace.Because the Windows Installer service running as LocalSystem handles the deferred installation, on Windows XP and newer the system account will not have that...
Catching Exceptions in JScript.NET
JScript.NET was created to be compatible with JScript while benefiting from and providing access to more robust features of the .NET Framework. If you're accustomed to more oft-used managed languages like C# and VB.NET, catching different types of exception classes should be no stranger. Considering JScript.NET, however, what would you expect to be printed from the code below? If you said nothing then you're correct. Exceptions are wrapped in an that does not extend . You need to extract the exception from the if you'd like to handle different classes of exceptions. One way to do this is using a public static ...
Monad Beta 2 Available
Want a shell that doesn't peak at the for command and that's built on the latest .NET Framework? Monad beta 2 is available for download! Monad is an object-oriented shell that lets you manipulate output and has an extensible provider model so that you can traverse different data sets. Beta 2 ships with providers for Monad aliases, Windows certificates, environment variables, functions, the Windows registry, variables, and, of course, the file system. Now when haven't you wanted to just cd to a registry key and enumerate or modify the values quickly?The future of system administration is bright with Monad. Check i...
Blog Customizations, Part 2
As mentioned earlier, I wanted to persist your preferences for whether certain collapsible panels were in the collapsed or expanded state. With a simple ECMA-compliant wrapper class around and a few minor changes to the class, state for unique panels can be remembered. The cookie wrapper class is pretty straight forward: To initialize the , an function is defined for the class that does pretty much the oppose of the function. is also defined to read from the cookie while is changed to write the cookie: All bold lines above show the changes to the class. Now when you expand or collapse a panel, its sibling'...
How Patching Works
Previously I blogged about what is in a patch, but how do patches work? To put it imply, patches transform a view of the product or products that the patch targets.Patches (.msp files) contain a set of transforms: one transform changes the target product into the upgraded product, and one transform adds information specific to the patch. This latter transform is not applied when patching an administrative image since the patch is baked into the administrative image permanently. If the transform applies the view of the patch is modified and the product is reinstalled with the transformed view.What exactly is the v...
Blog Customizations
In my seemingly never-ending quest to provide a simple, compact, yet stylish design for this blog I have recently made a customization based on what Josh Ledgard did sometime back to make collapsible panels, though I wanted something more easily reusable. I whipped together an ECMAScript — that is, ECMA-compliant JScript and JavaScript — class as you can see below: Since I'm defining an event handler to handle toggling the CSS attribute, I need to create a closure around the class instance, which is why the private variable is defined. Had I used in the event handler, when the event was fired...
Updated Sample MSI Scripts
Yesterday I blogged about what a patch file (.msp file) contains, as well as most other Windows Installer files. You might find, however, that some of the sample Windows Installer scripts in the Samples\SysMgmt\Msi\Scripts don't work with patch files. The reason is because you must pass (32) to the automation method. This corresponds to passing to the function. Two scripts in particular that are helpful for enumerating streams and storages in a package are WiStream.vbs and WiSubStg.vbs, and the necessary change to conditionally pass is a simple change, as shown below for WiStream.vbs: 13a14> Const msiOpen...
What's in a Patch
Windows Installer relies on structured storage for information about the installation package and to store data used by the installation such as any Binary types and cabinet files. Patches (.msp files) are no different in structure but will contain different data. Up until Windows Installer 3.0, patches themselves didn't contain any standard tables but could contain user tables. For Windows Installer 3.0 the tables MsiPatchSequence and MsiPatchMetadata could be added as meaningful tables. What patches have always contained, though, was a set of sub-storages for each transform that transforms the target installer ...
Handling GAC and NGEN Operations after Reboot
Some people have noticed a general slow-down after restarting their computers after installing a .NET Framework 1.0 or 1.1, or a Visual Studio .NET 2002 or 2003 patch. This is due to a change in how post-reboot operations are handled that are sometimes necessary after installing a patch.Windows Installer automatically schedules files for replacement if the file is locked. If the file is soft-locked, the in-use file is moved and the NTFS link tracker will remove it when all open handles to it are closed. If a file is hard-locked — which is always the case on Windows 9x and Me — then the file is schedul...
Supporting our Lifecycle Policy with ARPSYSTEMCOMPONENT
To conclude the series of the problems with , we will extend the workaround to support setting to support Microsoft's lifecycle policy on support N and N-1, where N would be a service pack, and N-1 would be the previous service pack or the RTM.Since we've essentially already developed our own sequencing feature in order to keep patches in view at all times, we must also take care of removing those patches' Add/Remove Program (ARP) registry entries when a patch is effectively superseded by a successive patch or service pack. We did that by defining unique properties for each patch and conditions that are also uni...
Suggestions for Future Posts
In an effort to present to the community information about which you're interested, please suggest topics for future posts by adding your comments. While my job deals more with Windows Installer — more specifically setup and deployment of the .NET Framework, Visual Studio, and other Developer Division products — my other interests deal with .NET development, specifically in the areas of interoperability.I have compiled a list of many of my articles so see if one of those articles relates to your topic. If so, please feel free to comment on those articles but note that some of those sites don't alert m...
Articles
Below is a list of articles I've written over the years. If you have ideas within the scope of Windows Installer, Microsoft .NET, COM, COM interoperability with .NET, or other related topics please add your comments to this post.
Working with ARPSYSTEMCOMPONENT
Continuing the series on the perils and necessity of , it's time to explain one solution for having your cake an eating it too.If you have determined that you need to define in your product RTM, remember that your product nor patches will not show up in the Add/Remove Programs (ARP) control panel unless you write entries for each to the registry yourself. But because obsolescing, superseding, or removing a patch removes it from the view before the reinstallation of your product, those registry keys will never be removed because they've been orphaned.To define ARP keys for your patch, you should add them to a new...
Major Upgrade Patches
A question was asked in Aaron Stebner's blog about major upgrades via MSP patch files with sequencing information. I would like to take this opportunity — at Aaron's request — to explain a few guidelines regarding major upgrades in Windows Installer.Basically, a major upgrade is an update to a product that changes all of the , , and package code (the latter should always change for any update). A major upgrade — unlike small or minor updates — can be installed either by patching the product or installing a new product MSI. In order to remove the product or certain features of the existing ...
Script Repository
If you're using Windows Script to perform a lot of everyday functions or even need a one-use script to automate a batch process there's a great resource available on the web on our TechNet site: The Script Center Script Repository. There are hundreds of example scripts available from managing Active Directory to managing Office documents and applications. Most scripts are written in VBScript, but you can find other samples in other languages from the Scripting Languages homepage. It's been around for a while but is worth the extra mention.
More Photos from Mt. Rainier
Jens Häupel, a developer evangelist for Microsoft Germany, recently attended (English translation) a Tech Conference here in Seattle and had a chance to visit and take photographs — very nice photographs — at Mt. Rainier. The views around Microsoft really are very beautiful.On that note, the Developer Division Customer Product-lifecycle Experience (DDCPX) team is still hiring for Software Design Engineers (SDEs), Software Design Engineers in Test (SDETs), and Program Managers (PMs)! Help drive installation and serviceability of the next generation of developer tools.
A Reason for ARPSYSTEMCOMPONENT
Last week I blogged about how is dangerous, but there are reasons for using it. Two reasons is defined in the product MSIs for the .NET Framework 2.0 and Visual Studio 2005 is to localize the Add/Remove Programs (ARP) entries, and to change certain registry values so that the external UI handler is invoked to handle the requested operation.Using previous versions of Windows Installer, ARP keys were written simply using the Registry table but weren't used, of course, if was set to 1. Patch information wasn't written to the registry so patches were responsible for adding entries to the Registry table if so desir...
Deploying Crystal Reports with your Managed Application
A common problem I see in various developer forums is trying to build an installation package with the Crystal Reports merge modules or running an application with Crystal Reports on another machine is that the registration code is often forgotten. You may see an error like the following on another machine where Crystal Reports has not been registered:To make sure this doesn't happen, be sure to register Crystal Reports for Visual Studio .NET when opening a report file, for example, and enter the registration code you'll get back from Crystal Decisions' registration page into regwiz.msm (2002) or Crystal_regwiz20...
My One-year Anniversary
Today is my one-year anniversary here at Microsoft and I have had the opportunity to work with a lot of great people and on great projects. I've seen two betas of the Microsoft .NET Framework 2.0 and Visual Studio 2005 and a myriad of Community Technology Previews (CTPs) go out the door, improved some of the patching technology for older releases as well as help prepare for the up-coming release of .NET 2.0 and VS 2005. I've also worked with lots of other teams outside of Developer Division during my work with Windows Script; and also to improve our patch build technology with other sustained engineering groups l...
Detecting repair, patch install, and patch uninstall for Windows Installer
A frequently asked question is how to detect whether a product installed using Windows Installer is being repaired, or a patch is being installed or — starting with Windows Installer 3.0 — uninstalled. The answer is detecting which properties are set.When a product — or even a single feature or multiple features — is being repaired the property is set; however, understand that patching is the act of transforming the view of the original product and re-installing features that contain files to be patched. That means the property will also be set during patch install and uninstall scenario...
The Dangers of ARPSYSTEMCOMPONENT
Back in March I wrote about the dangers of using the and registry keys. This is another post to help you avoid some other pitfalls.The property in Windows Installer does not actually do anything directly to your installation — Windows Installer doesn't even check for it. What does happen, however, is that the Add/Remove Programs (ARP) control panel applet normally queries Windows Installer for application and patch information. When is defined for a package, all the data is read from the registry key under .When is defined the installation package and patches are responsible for writing their own ARP r...
Compact Your VHD Files
Many times it's necessary to debug solutions on other machines so that you don't corrupt your developer machine, because of different platform requirements, or to attach a debugger without changing the state of the machine. Testing Windows Installer patches is no different. We test on daily target builds using daily upgrade builds. Installing daily builds isn't always such a good idea, and because Windows Installer now caches MSP re-installing a patch with slightly different contents but the same PatchCode proves difficult.Of course we have labs full of machines, but because these run through a complete installat...
Answers to Windows Installer Issues
A few weeks ago the Windows Installer team started blogging. Over the course of last week Robert Flaming — now a PM for the Windows Installer team — posted a number of helpful troubleshooting tips that are generated in part from an internal discussion alias. Most teams within Microsoft use Windows Installer so the internal discussion alias gets a lot of questions and even more answers. Check out some of the more prominent replies now on the Windows Installer team blog.
Deciphering an HRESULT
Aaron Stebner recently blogged about ways to find out the cause of 1935 Windows Installer errors and I wanted to provide a little more background on what an defines. An in the 32-bit world and beyond is defined as a , or a signed 32-bit integer. It is defined in, among other places, winerror.h in the Platform SDK. It defines the severity of an error, whether the error is from user code, a facility that defines where the error came from, and the actual error code. As defined in winerror.h: Return codes like and have the values 0 and 1, respectively. is not treated as an error because the severity bits are 0. ...
The View near Microsoft
Working for Microsoft has been a dream since I was very young and now that I'm finally here I love this company even more. I believe in what we're doing and in the ways we help people. I think it's great we have such an energetic CEO, and I love Microsoft's commitment in improving our products and listening and working more with our customers. One other reason I really like working here is because of views like this. Mt. Rainier — at approximately 14,400 feet — is visible almost anywhere in Seattle and the Eastside (Redmond, Bellevue, etc.). Last weekend we made it to Reflection Lake and were able t...
Book Review: Threat Modeling
Threat Modeling by our own Frank Swiderski and Window Snyder is one of those books you should read. Threat modeling may not be new, but if you're new to threat modeling you should pick up this book.Threat modeling is about understanding threats to your application or feature and deciding how to mitigate those threats so that you aren't left with vulnerabilities. This book is designed to help program managers, developers, and testers alike throughout the development lifecycle to construct and maintain threat models. Frank even wrote a tool to help ease the process of maintaining the threat model document available...
Latest Runtime Loaded when Hosting Managed Controls in IE
I previously mentioned how I worked on a project that deploys managed applications via the Internet or an intranet. Some of my initial research was into hosting managed controls in Internet Explorer. The .NET Framework 1.0 originally granted no permissions to the Internet_Zone code group so we had to deploy a small setup that used a custom class to modify the machine policy.Now — almost 2 versions later — it's quite likely that you have several different managed runtimes installed onto your machine. Normally, mscoree.dll — the entry point for managed executables — will load the CLR, or si...
The INSERT/UPDATE Problem for Transforms in MSI
QA uncovered a problem when testing our patches for .NET Framework 1.0 and 1.1 lately that will ship with an updated binary that now runs as a service under Windows NT platforms. The file version was incremented but in the log file we saw the following:MSI (s) (3F:2B): Executing op: FileCopy(SourceName=netfxupd.exe|netfxupdate.exe, SourceCabKey=DDPatch.UpdateUtilFile, DestName=netfxupdate.exe, Attributes=4096, FileSize=106496, PerTick=32768,, VerifyMedia=1,,,,,CheckCRC=0,Version=1.0.3705.1,Language=0,InstallMode=42205184,,,,,,)MSI (s) (3F:2B): File: D:WINNTMicrosoft.NETFrameworkv1.1.4322netfxupdate.exe; Won...