Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NSIS perMachine false and allowToChangeInstallationDirectory #1104

Closed
ZedTheYeti opened this issue Jan 12, 2017 · 3 comments
Closed

NSIS perMachine false and allowToChangeInstallationDirectory #1104

ZedTheYeti opened this issue Jan 12, 2017 · 3 comments

Comments

@ZedTheYeti
Copy link

  • Version: 11.2.4
  • Target: nsis

From my testing setting perMachine to false (or leaving it default) and setting allowToChangeInstallationDirectory to true do not work together. If perMachine is false then the installation directory page is bypassed. If perMachine is set to true then it's displayed. Is this intentional functionality or maybe a limitation of NSIS? I've looked through the source for electron-builder and I can't find anything that would specifically preclude the two from working together.

@develar
Copy link
Member

develar commented Jan 12, 2017

Only oneClick is required to be set to false. PerMachine, AFAIK, must be supported. I will check it again.

@ZedTheYeti
Copy link
Author

ZedTheYeti commented Jan 12, 2017

I've gathered some more information. Still not sure if it's a NSIS issue or an electron-builder issue.

Results in no directory change screen. Which is not expected behavior:

"oneClick": false,
"perMachine": false,
"allowElevation": true,
"allowToChangeInstallationDirectory": true

Results in a directory change screen but no ability to select For Me or All Users. This works as I expect it to:

"oneClick": false,
"perMachine": true,
"allowElevation": true,
"allowToChangeInstallationDirectory": true

Results in a directory change screen and the ability to select For Me or All Users but has to be manually run as admin:

"oneClick": false,
"perMachine": false,
"allowElevation": false,
"allowToChangeInstallationDirectory": true

The last configuration there is closest to expected behavior but you shouldn't have to exclude allowElevation to get it to work correctly, in my opinion. Additionally if you use the last config there and don't run it as admin, the default selection is For All Users which obviously fails. Which isn't a big deal, that just shouldn't be the default selection since it's disabled.

@gustavo-oliveira-mendonca

I tried all the combinations mentioned by ZedTheYeti but I can't make the directory change screen appear.

"build": {
    "appId": "04c4a930-5707-407c-80c9-8e692bb11e12",
    "asar": true,
    "extraFiles": [
      "config.json",
      "anotherConfig.json"
    ],
    "win": {
      "title": "MyApp",
      "msi": false,
      "author": "Me",
      "target": "nsis"
    },
    "nsis": {
      "oneClick": false,
      "perMachine": false,
      "allowElevation": true,
      "allowToChangeInstallationDirectory": true,
      "runAfterFinish": false
    }
  }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants