wix guid using rules

☆樱花仙子☆ 提交于 2020-02-05 05:30:26

问题


For example I have:

    <Component Id='MainExecutable' Guid='0436E0CA-8612-4330-A70D-642910D9F19A'>
      <File Id='FoobarEXE' Name='FoobarAppl10.exe' DiskId='1' Source='FoobarAppl10.exe' KeyPath='yes'>
      </File>
    </Component>

If then I create an update package should I use the same GUID for component that include FoobarEXE? I know rule for Product, UpgradeCode etc but what is the rule for other GUIDs? What is their scope?


回答1:


The component id versioning rules are tricky. I have found a real explanation only in old books (german only). Depending on which update you are creating several rules do apply.

  • Update

Update (only patch or add files, no remove or relocation allowed) Component id has to stay the same.

  • Minor Upgrade (Product code remains stable) It is basically an Update with some rules relaxed. To stay clear you should stick to Update or Major Upgrade which is much easier to reason about. The rules when the product code must be changed are described here.

  • Major Upgrade Is basically a uninstall (the MSI action RemoveExistingProducts is called) and reinstall. There you have full freedom.

It is generally a good advice to put every file, registry key, environment variable into a separate component since many of the pitfalls arise from the fact that you cannot remove files from a component during a minor upgrade. But with some tricks you can remove an entire component.



来源:https://stackoverflow.com/questions/4987382/wix-guid-using-rules

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!