Electron-builder: GUID vs Application Name?

Created on 14 Feb 2018  路  2Comments  路  Source: electron-userland/electron-builder

  • Version: ~19.49.0
  • Target: NSIS

Can you explain more about the reason for creating registry keys using GUIDs rather than application names? I have already read the docs at https://www.electron.build/configuration/nsis but it doesn't make sense to me.

I get the feeling that it's because you want to avoid name collisions, but given that we are generating the GUID deterministically from the name anyway, it seems like anyone who uses the same name would generate the same GUID, and get a collision anyway?

We'd prefer to use a properly named key for two reasons:

  • We are already shipping other (non-Electron) applications which are using named keys (HKLM/Software/CompanyName/...) and we'd prefer to keep all our applications grouped under the same key.
  • We have customers who want to detect our application based on the presence of the registry key, and telling them "check for HKLM/Software/CompanyName/ProductName" is much nicer than "check for HKLM/Software/".

Is there some way we can override this behavior, either by (ab)using the keys in build.nsis, or by using custom NSIS script/macros/etc?

question

Most helpful comment

Thanks for clear question.

and get a collision anyway

but scope is not so wide and limited to electron-builder produced electron apps.

We'd prefer to use a properly named key

Because of that, format of specified guid is not validated. Use whatever you want :)

"build": {
  "nsis": {
    "guid": "whatever_you_want"
  }
}

All 2 comments

Thanks for clear question.

and get a collision anyway

but scope is not so wide and limited to electron-builder produced electron apps.

We'd prefer to use a properly named key

Because of that, format of specified guid is not validated. Use whatever you want :)

"build": {
  "nsis": {
    "guid": "whatever_you_want"
  }
}

We're facing a side effect when specifying a custom guid.
The application is not listed anymore in the _Add / Remove Program_ Window from the Control Panel.

Any ideas about that?

Was this page helpful?
0 / 5 - 0 ratings