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 all users installation auto-update

See original GitHub issue
  • electron-builder version: 19.47.1

  • electron-updater version 2.16.3

  • Target: win

I’m facing the issue with updating application installed to the Program Files folder. I have oneClick: false in config and i’m installing updates with:

        setImmediate(() => {
            app.removeAllListeners("window-all-closed");
            autoUpdater.quitAndInstall(true, true);
        });

So when I’m trying to update application running under not admin account, it show UAC notificaton to enable old-uninstaller.exe execution. After I click on Yes it successfully deletes everything from application folder in Program Files but not installs new one. Altough, when I’m trying to update it under admin account it will be updated successfully.

Maybe it’s relevant to this issue. Could you please take a look on it or maybe suggest where should i look?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:5
  • Comments:16 (11 by maintainers)

github_iconTop GitHub Comments

6reactions
Egorikhincommented, Dec 11, 2017

Ok, figured out myself. You can use this customInit script in order to make it work as expected:

!macro customInit
    ${if} $installMode == "all"
        ${IfNot} ${UAC_IsAdmin}
            ShowWindow $HWNDPARENT ${SW_HIDE}
            !insertmacro UAC_RunElevated
            Quit
        ${endif}
    ${endif}
!macroend
3reactions
Nkaycommented, May 27, 2019

A little more description:

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

The problem exists with the per-user installation.

  "devDependencies": {
    "electron": "3.0.4",
    "electron-builder": "20.39.0"
  },
  "dependencies": {
    "electron-log": "3.0.5",
    "electron-updater": "4.0.6"
}
Read more comments on GitHub >

github_iconTop Results From Across the Web

Update Check / Auto Update / Web Download - NSIS Forums
Update Check / Auto Update / Web Download Hi, I'm using NSIS as installer for some apps I wrote. This works great. Now...
Read more >
How to silently auto-update an electron application that is ...
A third option is to create a NT service that runs the installer. Services can be configured so that normal users can start...
Read more >
NsisOptions - electron-builder
Or whether installation always per all users (per-machine). If oneClick is true (default): Whether to install per all users (per-machine). If oneClick is ......
Read more >
Silent install options - GanttProject Desktop Support
I'd like to automatically block updates notifications on software startup for all users (classrooms, the users can't do that). I remote silently install...
Read more >
MSI Installer for Coginiti Pro on Microsoft Windows
We disable automatic updates with a message to the user. ... IMPORTANT: MSI and NSIS installers are incompatible.
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