-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
fix: Windows update fails for custom paths that require admin rights #6073
Conversation
Proposed fix to the situation where an Electron is installed for all users of the machine e.g. into Program Files, but fails to update (installed app version is deleted but the update is never installed) due to failure to request admin rights. Current build.nsis settings in package.json: { "oneClick": false, "allowToChangeInstallationDirectory": true, "allowElevation": true, ... }
Fix errors resulting in rest failure, add new variable to the log
Update temp file name to avoid conflicts and remove after successful write
I don't know for sure but I suppose there might be an error related to this PR: We'll downgrade electron-updater to version 4.3.10 in order to check, if this PR has introduced this unexpected behaviour. I'll add another post when we have the results. |
@mmaietta I can confirm that this PR (electron-updater v4.4.3 as opposed to v4.3.10) will result in elevated rights being requested even for a per-user update via quitAndInstall -> should not. IMO this improvement introduces a regression and should be improved / fixed. |
@jmeinke Thank you for your reply.
Code review and our own testing did not confirm this bug nor any obvious reason for it to exist (the entire PR is basically just one file write/delete operation). Thank you:) |
I can confirm this issue. It is happening with a lot of our users.
|
Please update to latest electron-updater to leverage this fix. |
…nstall/updates (#6450) * fix(nsis): fix per-machine installs Add @krisdages changes from PR #6438 to elevate silent per-machine installs. Remove PR #6073 that incorrectly elevates all per-machine installs, breaking interactive per-machine installs. Closes #6425, #5468 Co-authored-by: Robert Patrick Co-authored-by: Kris Dages
Proposed fix to the situation on Windows where an Electron is installed for all users of the machine e.g. into Program Files, but fails to update (installed app version is deleted but the update is never installed) due to failure to request admin rights.
node v12.16.2
npm v6.14.4
Current build.nsis settings in package.json:
{
"oneClick": false,
"allowToChangeInstallationDirectory": true,
"allowElevation": true,
...
}