question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

nsis to use productName rather than name for install path

See original GitHub issue
  • electron-builder@11.2.0
  • win32

pacakge.json

{ 
  "name": "myapp",
  "productName": "My App",
  "author": "My Company",

...
    "nsis": {
      "oneClick": false,
      "allowToChangeInstallationDirectory": true,
      "menuCategory": true,
      "runAfterFinish": false
    },

On selecting per machine install, the default path is:

C:\Program Files (x86)\My Company\myapp

Whereas I was hoping for:

C:\Program Files (x86)\My Company\My App

I simply want to do this to match the existing installers of My Company.

Obviously productName can contain characters which are not valid for use in file paths, so this functionality as a default might not be a good idea.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:3
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

3reactions
develarcommented, Jan 11, 2017

Option will be added this week. It was decided to use name because productName is not safe and suitable for number of users…

0reactions
develarcommented, Jan 26, 2017

I don’t want to introduce yet another option. If product name matches /^[-_0-9a-zA-Z ]+$/, it will be used instead of safe name (applicable only for perMachine or boring installer).

Read more comments on GitHub >

github_iconTop Results From Across the Web

NSIS Directory Page after Browse for install dir ...
I have a simple NSIS script with a directory page, where the user can select a directory to install the application to.
Read more >
Chapter 4: Scripting Reference
A symbol that contains the path where NSIS is installed. Useful if you want to reference resources that are in NSIS directory e.g....
Read more >
Previous installation directory - NSIS Forums
Previous installation directory. Hello, I have an app called XXX. Using NSIS, I have installing it in \Program File\XXX.
Read more >
NSIS - electron-builder
PORTABLE_EXECUTABLE_DIR - directory where the portable executable is located. PORTABLE_EXECUTABLE_APP_FILENAME - sanitized app name to use in file paths. Common ...
Read more >
NSIS - ITLnet
/CD tells the compiler to switch to the directory of the script it is currently compiling. Using the /D switch one or more...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found