Welcome to MSDN Blogs Sign in | Join | Help

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 under WCU\VS Tools for Office found on your VS2008 DVD. If you're being prompted for source for a product such as this, in most cases you can pass /extract to the .exe to extract the sources.

This most recent issue we're seeing occurs when people are adding new components to install new files or other resources. Though adding new components to an existing feature is allowed when installing with Windows Installer 2.0 and newer, this causes the components' parent features to be installed. This in turn forces those features' parent features to be installed, and so on up the feature tree. Any child features that follow their parents' install actions also get installed. If any components in any of these features install files, then Windows Installer needs the source media to install those files to disk.

If you're an installation developer and are running into this problem when adding components to a feature in a patch package, you can workaround this issue by adding new components to new top-level features. You can see an example of this approach written for WiX in the attached sample in the Workaround folder.

Because there are different reasons you might be prompted for source, you can identify this issue as the cause of the prompt by comparing what the command line to install the patch is, what the ADDLOCAL property is set to, and what features are being transitioned from the Absent to the Local state. Notice in the log below that ADDLOCAL gets set to NotInstalled, and the NotInstalled feature is transitioning from Absent to Local.

MSI (s) (BC:90) [19:34:31:704]: Command Line: PATCH=C:\Users\heaths\Documents\Visual Studio 2005\Projects\Adding Components\Patch_Introduced.msp CURRENTDIRECTORY=C:\Users\heaths\Documents\Visual Studio 2005\Projects\Adding Components CLIENTUILEVEL=2 CLIENTPROCESSID=5172

MSI (s) (BC:90) [19:34:32:059]: PROPERTY CHANGE: Adding REINSTALL property. Its value is 'Example'.
MSI (s) (BC:90) [19:34:32:059]: PROPERTY CHANGE: Adding ADDLOCAL property. Its value is 'NotInstalled'.
MSI (s) (BC:90) [19:34:32:059]: PROPERTY CHANGE: Adding INSTALLLEVEL property. Its value is '1'.

MSI (s) (BC:90) [19:34:32:070]: Feature: NotInstalled; Installed: Absent; Request: Local; Action: Local
MSI (s) (BC:90) [19:34:32:070]: Feature: Example; Installed: Local; Request: Reinstall; Action: Reinstall

MSI (s) (BC:90) [19:34:35:056]: Resolving source.

NotInstalled is explicitly referenced in ADDLOCAL, though it wasn't specified on the command line. Since NotInstalled is getting installed and does contain files, source is required to find the files within that feature to be copied.

If we use the workaround of adding a new top-level feature, NotInstalled is only updated if it was already installed locally and the new feature - "Workaround" in the attached example - is added.

MSI (s) (BC:8C) [19:39:46:866]: PROPERTY CHANGE: Adding REINSTALL property. Its value is 'Example'.
MSI (s) (BC:8C) [19:39:46:866]: PROPERTY CHANGE: Adding ADDLOCAL property. Its value is 'Workaround'.
MSI (s) (BC:8C) [19:39:46:866]: PROPERTY CHANGE: Adding INSTALLLEVEL property. Its value is '1'.

MSI (s) (BC:8C) [19:39:46:880]: Feature: NotInstalled; Installed: Absent; Request: Null; Action: Null
MSI (s) (BC:8C) [19:39:46:880]: Feature: Example; Installed: Local; Request: Reinstall; Action: Reinstall
MSI (s) (BC:8C) [19:39:46:880]: Feature: Workaround; Installed: Absent; Request: Local; Action: Local

This new feature contains only new components with all the required file resources in a cabinet embedded in the patch so that they are always available, even during future maintenance installs since patches are cached in whole.

Published Monday, February 18, 2008 1:40 PM by Heath Stewart
Attachment(s): Example.zip

Comments

# MSDN Blog Postings » Adding New Components to Existing Features Installs the Feature Tree

Tuesday, February 19, 2008 6:45 PM by Heath Stewart's Blog

# Another Workaround to Add New Components to Existing Features

Yesterday I described an issue when adding new components to existing, not-installed (absent) features

Thursday, March 06, 2008 1:59 AM by BradleyB's WebLog

# Installation Tips for Silverlight Tools Beta 1 for Visual Studio 2008

As many of you know Silverlight 2 Beta 1 was release today at MIX08 . What an awesome day. The new applications

Friday, March 07, 2008 3:05 AM by Heath Stewart's Blog

# 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

Friday, March 07, 2008 3:41 AM by Noticias externas

# 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

Friday, May 16, 2008 5:02 PM by Heath Stewart's Blog

# 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

New Comments to this post are disabled
 
Page view tracker