[WiX] Installerのcomponent IDの付け方

Installerではあるまとまりをcomponentと呼び、componentごとにGUIDを付ける。この付け方がわからなくて調べたら以下のblogを見つけた。
WiXの開発者のRob Mensching のblog RobMensching.com /Blog でのcomponent の説明。
http://robmensching.com/blog/posts/2003/10/4/Windows-Installer-Components-Introduction

http://robmensching.com/blog/posts/2003/10/18/Component-Rules-101

ざっくりとまとめると、
componentは、windows Installerでの操作の単位(atomicな単位)である。
それぞれにはGUIDがつけられている。
それぞれがインストールされているかどうかは、KeyPathがファイルシステム上に存在するかどうかで決められる。
componentsが同じものかどうかはGUIDが同じかどうかで決められる。同じcomponentは必ず
同じGUIDを持ち同じ中身を持たなければならない。
GUIDが違うcomponentが同じ中身を持っている場合、その中身(インストールされるファイルなど)のレファレンスカウントが正しく計算されない。
つまり、同じcomponentが2回インストールされていれば、中身のファイルなども2回インストールされたと認識されるが、GUIDが違うcomponentだと中身のファイルも1回だけインストールされていると認識されるので、片方のuninstallのときに消されてしまう。
updateのときも同じで、同じGUIDなら中身が同じ、とWindows Installerは思っているので
中身が違っていると結果は変になる。
ということは、componentは含まれるリソースの更新時はGUIDを変更しなくてもいい。ファイルの増減などがあったらそれは別のcomponentにしなければならない、ということか。
このblogで言及されているmsdnのドキュメントには簡潔なルールがある。
Organizing Applications into Components
http://msdn.microsoft.com/en-us/library/aa370561(VS.85).aspx
Never create two components that install a resource under the same name and target location. If a resource must be duplicated in multiple components, change its name or target location in each component. This rule should be applied across applications, products, product versions, and companies.
あるリソースを同じ名前と場所にインストールするcomponentは1個のみ。リソースを複数回インストールすることが必要ならばリソースの名前と場所を変える。アプリケーションをまたがっても同じこと。
Note that the previous rule means that two components must not have the same key path file. The key path value points to a particular file or folder belonging to the component that the installer uses to detect the component. If two components had the same key path file, the installer would be unable to distinguish which component is installed. Two components however may share a key path folder.
2個のcomponentが同じkeypathファイルを共有することはない。keypathファイルが同じ、かつ、別々のcomponentsがあったとしたらwindows installerがそれを区別することはできない。2つのcompoentsはkey path folderを共有することはできる。
Do not create a version of a component that is incompatible with all previous versions of the component. The component may be shared by other applications, products, product versions, and companies. Instead create a new component.
以前のcomponentと矛盾するcomponentのバージョンを作ってはいけない。他のアプリケーション、プロダクト、バージョン、会社で共有されるかもしれないから。そういうときはcomponentは分けるべき。
Do not create components containing resources that will need to be installed into more than one directory on the user’s system. The installer installs all of the resources in a component into the same directory. It is not possible to install some resources into subdirectories.
componentの中に複数のディレクトリを含めてはいけない。installerは1つのcomponentの中身を同じディレクトリにインストールする。componentを何個かのサブディレクトリにインストールすることはできない。
Do not include more than one COM server per component. If a component contains a COM server, this must be the key path for the component.
COM サーバーを2つ以上入れない。
COMは必ずkeypathにする。
Do not specify more than one file per component as a target for the Start menu or a Desktop shortcut.
componentごとに2つ以上のファイルをStart menuとかDesktop shortcutのターゲットにしない。
以上。
これだけで理解できる人もいるだろうけど、原理がわからないと難しいんだろうな。
GUIDを、いつ変更したらいいのか、というのがなかなか分かりづらかった。