Skip to content

ProgID used in NSIS associations may not be unique enough to be appropriate. #9229

@sabonerune

Description

@sabonerune

Windows associations use ProgID.
The following format is recommended for ProgIDs:

  • [Vendor or Application].[Component].[Version]
  • No spaces
  • Version portion is optional (but strongly recommended.)

ref: https://learn.microsoft.com/windows/win32/shell/fa-progids#programmatic-identifier-elements-used-by-file-associations

Other pages also state:

  • Have no more than 39 characters.
  • Contain no punctuation (including underscores and slashes) except one or more periods.
  • Do not start with a digit.

ref: https://learn.microsoft.com/windows/win32/com/-progid--key

electron-builder uses ext or name for ProgID.
This format violates Windows recommendations.
Not only that, it also seems prone to conflicts with other applications.
(It may be difficult to notice that you need to change the FileAssociation.name property, especially if you fork a project that uses electron-builder.)

I think it should be changed so that a unique ProgID is generated.


I think [Vendor or Application] should be a combination of ProductName and GUID.
Also, I think that by using [Component] with a truncated uuid.v5(name||ext,guid), we can reliably prevent conflicts.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions