Closed Bug 1511835 Opened 2 years ago Closed 2 years ago

MSI Installer details values

Categories

(Firefox Build System :: General, defect)

65 Branch
All
Windows
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1506150

People

(Reporter: u607770, Unassigned)

Details

User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36

Steps to reproduce:

* Download MSI installer from nightly builds
* Right-click on the downloaded file
* Click on the "Description" tab


Actual results:

* "ProductCode" contains a random UID  "{1294A4C5-9977-480F-9497-C0EA1E630130}"
* "ProductVersion" contains "0.0.0.0"
* "ProductLanguage" contains "0"

Using a third-party tool like LessMSI () or other python thing, you can look at MSI file properties, here is a sample output :

{'DESKTOP_SHORTCUT': 'true',
 'EXTRACT_DIR': '__DEFAULT__',
 'INSTALL_DIRECTORY_NAME': '__DEFAULT__',
 'INSTALL_DIRECTORY_PATH': '__DEFAULT__',
 'INSTALL_MAINTENANCE_SERVICE': 'true',
 'Manufacturer': 'Mozilla',
 'OPTIONAL_EXTENSIONS': 'true',
 'PREVENT_REBOOT_REQUIRED': 'false',
 'ProductCode': '{1294A4C5-9977-480F-9497-C0EA1E630130}',
 'ProductLanguage': '0',
 'ProductName': 'Mozilla Firefox 65.0a1 x64 fr',
 'ProductVersion': '0.0.0.0',
 'REMOVE_DISTRIBUTION_DIR': 'true',
 'START_MENU_SHORTCUT': 'true',
 'TASKBAR_SHORTCUT': 'true',
 'UpgradeCode': '{3118AB4C-B433-4FBB-B9FA-8F9CA4B5C103}'}


Expected results:

* "ProductCode" property must be equal to the registry uninstallkey 'Mozilla Firefox 65.0a1 x64 fr'
* "ProductVersion" property must be equal to actual Mozilla Firefox version '65.0a1"
* "ProductLanguage" must be filled with a correct language value like 1033 / 1036 etc.

On why those properties must be correctly filled :

    it's easier for deployment tools to retrieve version number/uninstallkey from the MSI file as it's a standard to have it set correctly in MSI files
    it allows deployment tools to verify the good status of installation after the installation by checking these values in registry
Status: UNCONFIRMED → RESOLVED
Closed: 2 years ago
Component: Untriaged → General
OS: Unspecified → Windows
Product: Firefox → Firefox Build System
Hardware: Unspecified → All
Resolution: --- → DUPLICATE
Duplicate of bug: 1506150
As it's partly answered and WONTFIX I might add some details on why you should reconsider it.

I've looked at source/browser/installer/windows/msi/installer.wxs file.

You should reconsider thoses properties for the MSI installers.

[ProductLanguage]
* For the Product language it seems already implemented by WiX library to transform ab-cd notation to LCID : http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/LCID-and-language-culture-fallback-td3805815.html

[ProductVersion]
* For the version number I don't understand why it looks impossible for you as it's hardcoded right now to "0.0.0.0", it needs to be changed for $(var.Version) (or maybe I'm misunderstanding the version numbering thing)

[Uninstallkey]
* Not mentioned in that ticket, the uninstallkey that should be registered by the MSI installer is the "Id" property in the Product entry. 
* An UID exists but it doesn't refer to anything in HKLM registry Uninstallkeys when Firefox is installed, it should be the same string as created by "$(var.BrandFullName) $(var.Version) $(var.Architecture) $(var.AB_CD)"

Again these entry in MSI file are important for deployment softwares as they are required and filled with correct values : https://docs.microsoft.com/en-us/windows/desktop/msi/required-properties

BR

Alexandre
Flags: needinfo?(mhowell)
Additionaly there is a Python library available, lcid, to transform "locale" string to "LCID" notation, it could be used in python/mozbuild/mozbuild/repackaging/msi.py file.

Alexandre
Thanks for filing this bug; I'll try to answer your concerns here as best as I can.

(In reply to agauvrit from comment #2)
> [ProductLanguage]
> * For the Product language it seems already implemented by WiX library to
> transform ab-cd notation to LCID :
> http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/LCID-and-
> language-culture-fallback-td3805815.html

I don't see anything on that page which indicates that WiX does that transformation for the ProductLanguage property; the discussion is only about how to have multiple LCID's in one project. I've also looked in the WiX manual, and it doesn't mention anything about this either.

> [ProductVersion]
> * For the version number I don't understand why it looks impossible for you
> as it's hardcoded right now to "0.0.0.0", it needs to be changed for
> $(var.Version) (or maybe I'm misunderstanding the version numbering thing)

I explained about this in bug 1506150 comment 3; our versions often contain letters, which the MSI format does not allow, and in general we've never made any attempt to follow that format, so I don't think we can set this property to anything else without causing confusion.

> [Uninstallkey]
> * Not mentioned in that ticket, the uninstallkey that should be registered
> by the MSI installer is the "Id" property in the Product entry. 
> * An UID exists but it doesn't refer to anything in HKLM registry
> Uninstallkeys when Firefox is installed, it should be the same string as
> created by "$(var.BrandFullName) $(var.Version) $(var.Architecture)
> $(var.AB_CD)"

Could you clarify what you're asking for here? We don't support uninstalling via MSI (bug 1505436 is on file for adding this, assuming it's possible), but the uninstall key that the installer creates in HKLM is named as you describe (except with parentheses around "$(var.Architecture) $(var.AB_CD)").

(In reply to agauvrit from comment #3)
> Additionaly there is a Python library available, lcid, to transform "locale"
> string to "LCID" notation, it could be used in
> python/mozbuild/mozbuild/repackaging/msi.py file.

This would probably get us most of the way there, but we support locales that it doesn't; if the only way to do this is a dictionary like that library uses, I think we would want to maintain that ourselves.
Flags: needinfo?(mhowell) → needinfo?(agauvrit)
Flags: needinfo?(agauvrit)
You need to log in before you can comment on or make changes to this bug.