Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 371521
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T14:07:20+00:00 2026-05-12T14:07:20+00:00

When should I change or not change my component GUID in WIX? The Microsoft

  • 0

When should I change or not change my component GUID in WIX? The Microsoft SDK information is confusing.

Glytzhkof edit: To clarify, the question deals with when a component GUID should be changed for an MSI component. A component can change with aspects such as: changed destination path, addition or removal of files to/from the same component, addition of registry data etc… This causes problems with regards to the so called component referencing, i.e the best practice for creating components in MSI.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T14:07:21+00:00Added an answer on May 12, 2026 at 2:07 pm

    The overall concept of MSI is that there is a 1:1 mapping between
    a component GUID (unique identifier) and an absolute path
    (install location / key path). The full path, including file name if
    any (a directory can be the key path for a component). See update below for a new Wix feature to deal auto-magically
    with this.


    Rob Mensching (WiX author):

    • Windows Installer Component Rules 101
    • Windows Installer Components Introduction

    More on Component Rules:

    • Organizing Applications into Components
    • Best Practice for Creating Components.

    I use some simple rules to deal with the overly complex and rather counterintuitive component rules (especially for developers as opposed to deployment specialists):

    • Always use a separate component per file (even for non-binaries). This avoids all kinds of problems. There are a few exceptions:
      • Multi-file .NET assemblies should all be in one component since they should always be installed / uninstalled as a single unit.
      • A few other, general file types come in "matching pairs" – they belong together. Often these are content and index files. As an example consider Microsoft help files:
        • .HLP and .CNT files belong together.
        • .CHM and .CHI files belong together.
      • There are likely several such file types that belong together and should hence be put in the same component so they install/uninstall together – I suspect certain certificate files to be candidates. It is hard to come up with a definite list. Simply ask yourself "do these files always belong together" – so they always show up in pairs whenever there is a new version? If yes, then install them via the same component. Set the versioned file, if any, as key file.
      • I want to add driver files as an example of a bunch of files always belonging together: SampleDriver.cat, SampleDriver.inf, SampleDriver.sys, SampleDriver.cer. They must all match as a "unit" for deployment.
    • Remember that once you have allocated a GUID for a component, it’s set in stone for that component’s key path (absolute path). If you move the file to a new location or rename the file, give it a new component GUID (since the absolute path is different it’s effectively a new identity).
    • In summary component GUIDs are tied to an absolute installation location, and not to a specific file. The GUID doesn’t follow the file around if it moves. The GUID reference counts an absolute location, not the file per se.
    • Do not add or remove files from an existing component. All sorts of upgrade and patching problems result. This is why I like one file per component as a general rule.
    • There is a lot more to component referencing, but I will leave it at that for an "overview".

    Some samples:

    • You rename the file C:\Program Files\MyCompany\MyApp\MyFile.exe to C:\Program Files\MyCompany\MyApp\MyFile_NEW.exe. What does this mean for component creation? This is a new absolute installation path, so you generate a new GUID for the hosting component, OR you add a new component and delete the old one (which has the same effect).
    • Your updated MSI delivers a new version of MyFile.exe. The location is the same as before, this means the component GUID should not change. It is the same file (identity), just in a different version.

    UPDATE:

    Auto Component-GUIDs: WIX now has a new auto-generate component GUID feature that calculates a GUID as long as the target path
    stays the same. I have not tried this out to be honest, but many seem
    to use it without problems, and Rob Mensching (Wix author) states it is safe for normal use. As a concept I highly recommend this
    since it features some auto-magic and shields you from some
    complexity.

    Minimal WiX Markup: Also note that you can leave out a lot of source attributes from
    your Wix xml file
    and rely on Wix defaults instead of hard
    coding values.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am creating a program where a change in a value causes the color
I have a XBL component which creates a checkbox control in javascript. Value is
I think there is a problem in php's OOP implementation. EDIT: Consider more illustrative
in flash builder 4 how do i use the skinning option to make sure
I'm creating an application that, amongst other things, allows users to insert images on
In the Zend Framework library, the current practice (circa 1.10.8) is that library components
I am having a problem with using Boost Logging library, that if I add
I need dev and beta sites hosted on the same server as the production
I am converting values based on units (km to m, lb to g, etc).
I'm still struggling with my scenario. I have looked everywhere for a solution and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.