2

I need to add some files from customer environment into existing msi before installation. In order to do this, We have C# WinForms project which generates transform(.mst) file and add the files in it using .cab. For the new files, new components are created and consistent unique GUIDs are generated too. But, I am not sure if these GUIDS are ok as per Installshield generated GUIDs or MSI technology?

Does Installshield follow RFC 4122 specification for generating component GUIDs? If yes, which version of it?

Also, should I need to handle GUID collisions too?

Vivek Jaiswal
  • 861
  • 1
  • 7
  • 20

1 Answers1

2

Recommended Read: Please read this answer on: When to change MSI component GUIDS. A quick search of the MSI SDK found nothing on RFC.

WiX Sources: It turns out RFC 4122 is mentioned in the WiX source code here: Implementation of RFC 4122 - A Universally Unique Identifier (UUID) URN Namespace (one more).


Various GUIDs: All GUIDs in the package must be unique - of course. Component GUIDs should be stable across releases if the file still installs to the same location (why?). The Package GUID should always be new (since it identifies a unique MSI file). The Product Code must be changed when appropriate (for minor upgrades you must use the same product code in the new release) and the Upgrade Code normally stays the same across releases to identify related products / installers. Advanced Installer on GUIDs and an old answer of mine on the same.

Registry Format: Windows Installer requires GUIDs in "registry format" and ALL UPPERCASE LETTERS (see MSI SDK). Below is an illustration using the Create GUID tool from the Visual Studio Tools menu:

Create GUID

WiX Toolset: The WiX Toolset features "GUID auto-magic" and will auto-translate GUIDs found in incorrect formats in your WiX XML markup files to the correct format used inside the compiled MSI.

WiX quick start links.


Links:

Stein Åsmul
  • 39,960
  • 25
  • 91
  • 164
  • Thanks for sharing WiX source code. It seems that they are using version 5 but code comment is mentioning version 3. I found out by checking the first digit of third part of any file component GUID generated by WiX. See this - (https://stackoverflow.com/questions/10867405/generating-v5-uuid-what-is-name-and-namespace). Also, it is clear that Installshield is not generating RFC 4122 version 3 or 5 GUIDs. IS is still generating stable GUIDs but not sure about it's algorithm. – Vivek Jaiswal Jun 22 '22 at 05:23