[Bug] Auto updater has error with NSIS target: Windows 7 or above is required.
See original GitHub issue- Version:
- electron-builder : ~22.4.1
- electron-updater : ~4.2.5
- Target: NSIS
I here this bug is fixed, but not for me in NSIS. Auto updater is using ‘electron-updater’, it runs good in other windows version except windows 7.
In my case, when ready to install new version(after downloaded), main process will send a message to renderer progress to notify user, after user had make sure to quit and install, i call quitAndInstall()
. Then error occurs in windows 7: ‘Windows 7 or above is required’;
I had change parameter perMachine
to false
(true
failed either), and tested both choices while installing (current user or all users), both failed.
Here is my configuration:
win: {
icon: 'static/icons/icon.ico',
requestedExecutionLevel: 'asInvoker',
signingHashAlgorithms: [ 'sha256', 'sha1' ],
certificateFile: 'scripts/cer/flicker_windows.pfx',
publisherName: 'xxx',
verifyUpdateCodeSignature: false,
artifactName: 'xxx',
},
nsis: {
include: 'scripts/nsis/installer.nsh',
shortcutName: 'xxx',
uninstallDisplayName: 'xxx',
allowToChangeInstallationDirectory: true,
createStartMenuShortcut: true,
createDesktopShortcut: true,
oneClick: false,
perMachine: false,
},
scripts/nsis/installer.nsh
!include WinVer.nsh
!macro customInstall
${If} ${AtMostWin7}
WriteRegStr HKCU "Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers" "$INSTDIR\${PRODUCT_NAME}.exe" "VISTARTM"
${EndIf}
!macroend
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:7
Top Results From Across the Web
NSIS all users installation auto-update · Issue #2363 - GitHub
I think that this problem is caused by the fact that silent installer is not aware of what permission it has when it...
Read more >electron updater notify for new release but do not update or ...
15.1 locally I updated to v14.16.0 now it works! Another issue using other versions update and downgrade it was downloading it but failed...
Read more >electron-builder-squirrel-windows | Yarn - Package Manager
Fast, reliable, and secure dependency management.
Read more >49861 – NSIS: remove the directory after the NSIS is finished
We have discussed this problem when we introduced the nsis installer. And it is true. For the Windows Installer the installation set is...
Read more >CPack NSIS Generator — CMake 3.25.1 Documentation
Changed in version 3.22: The NSIS generator requires NSIS 3.03 or newer. ... the graphical installers built on Windows Nullsoft Scriptable Install System....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I had the same problem at windows7 when I set the compatibility to Vista.
But if I not set ,it will show a black screen. 🥺🥺
Version: electron-builder : 21.2.0 electron-updater : 4.2.0
Need a
disable-gpu
flag to force CPU render, so I add a detection like this:Don’t need to set compatibility anymore, so auto updater works. electron-updater: 4.3.4 electron: 9.2.0 electron-builder: 22.8.0