electron-builder: NSIS Installer Not Working on Second Invocation
- Version: 6.3.5
- Target: Windows
I am building a oneClick:true NSIS installer with perMachine:true. If I run the installer on a clean machine, it works perfectly. If I uninstall then run the installer again, it works perfectly. But if I run the installer when there is a previous (or even exactly the same) app installed, it only installs some of the files.
First run:
Directory of C:\Program Files\Tour
09/02/2016 12:26 PM <DIR> .
09/02/2016 12:26 PM <DIR> ..
09/02/2016 11:42 AM 58,177 blink_image_resources_200_percent.pak
09/02/2016 11:42 AM 15 content_resources_200_percent.pak
09/02/2016 11:42 AM 9,852,761 content_shell.pak
09/02/2016 11:42 AM 3,466,856 d3dcompiler_47.dll
09/02/2016 11:42 AM 1,942,528 ffmpeg.dll
09/02/2016 11:42 AM 10,127,152 icudtl.dat
09/02/2016 11:42 AM 80,896 libEGL.dll
09/02/2016 11:42 AM 2,222,592 libGLESv2.dll
09/02/2016 11:42 AM 1,075 LICENSE
09/02/2016 11:42 AM 1,376,928 LICENSES.chromium.html
09/02/2016 11:42 AM <DIR> locales
09/02/2016 11:42 AM 394,778 natives_blob.bin
09/02/2016 11:42 AM 12,962,304 node.dll
09/02/2016 11:42 AM <DIR> resources
09/02/2016 11:42 AM 62,150,104 Tour.exe
09/02/2016 11:42 AM 643,204 snapshot_blob.bin
09/02/2016 11:42 AM 82,388 ui_resources_200_percent.pak
09/02/2016 11:42 AM 152,032 Uninstall Tour.exe
09/02/2016 11:42 AM 59,985 views_resources_200_percent.pak
09/02/2016 11:42 AM 81,768 xinput1_3.dll
18 File(s) 105,655,543 bytes
4 Dir(s) 121,922,035,712 bytes free
Second Run:
Directory of C:\Program Files\Tour
09/02/2016 12:32 PM <DIR> .
09/02/2016 12:32 PM <DIR> ..
09/02/2016 11:42 AM 3,466,856 d3dcompiler_47.dll
09/02/2016 11:42 AM 1,942,528 ffmpeg.dll
09/02/2016 11:42 AM 80,896 libEGL.dll
09/02/2016 11:42 AM 2,222,592 libGLESv2.dll
09/02/2016 11:42 AM 12,962,304 node.dll
09/02/2016 11:42 AM 62,150,104 Tour.exe
09/02/2016 11:42 AM 152,032 Uninstall Tour.exe
09/02/2016 11:42 AM 81,768 xinput1_3.dll
8 File(s) 83,059,080 bytes
2 Dir(s) 121,945,260,032 bytes free
Third run:
Directory of C:\Program Files\Tour
09/02/2016 12:32 PM <DIR> .
09/02/2016 12:32 PM <DIR> ..
09/02/2016 11:42 AM 3,466,856 d3dcompiler_47.dll
09/02/2016 11:42 AM 1,942,528 ffmpeg.dll
09/02/2016 11:42 AM 80,896 libEGL.dll
09/02/2016 11:42 AM 2,222,592 libGLESv2.dll
09/02/2016 11:42 AM <DIR> locales
09/02/2016 11:42 AM 394,778 natives_blob.bin
09/02/2016 11:42 AM 12,962,304 node.dll
09/02/2016 11:42 AM <DIR> resources
09/02/2016 11:42 AM 62,150,104 Tour.exe
09/02/2016 11:42 AM 643,204 snapshot_blob.bin
09/02/2016 11:42 AM 82,388 ui_resources_200_percent.pak
09/02/2016 11:42 AM 152,032 Uninstall Tour.exe
09/02/2016 11:42 AM 59,985 views_resources_200_percent.pak
09/02/2016 11:42 AM 81,768 xinput1_3.dll
12 File(s) 84,239,435 bytes
4 Dir(s) 121,711,751,168 bytes free
I don’t know how to turn on installer logging, or if it is on, I don’t know where to find the logs. So if you could give me a pointer for that, I might be able to get more data.
Other things which might be relevant:
- Doing the build on a Mac
- Signing everything
- Running installer on Windows 7 in a Parallels VM (so it’s single-CPU and not fast)
- I had this issue with 6.3.1 also, but not 5.x (before oneClick existed)
- I had this issue building perMachine:false as well
- Same issue if I set oneClick:false and use the boring installer
- Custom script being included to setup protocol handler (replace
__scheme__with my actual scheme):
!macro customInstall
DetailPrint "Register __scheme__ URI Handler"
DeleteRegKey HKCR "__scheme__"
WriteRegStr HKCR "__scheme__" "" "URL:__scheme__"
WriteRegStr HKCR "__scheme__" "URL Protocol" ""
WriteRegStr HKCR "__scheme__\DefaultIcon" "" "$INSTDIR\${APP_EXECUTABLE_FILENAME}"
WriteRegStr HKCR "__scheme__\shell" "" ""
WriteRegStr HKCR "__scheme__\shell\Open" "" ""
WriteRegStr HKCR "__scheme__\shell\Open\command" "" "$INSTDIR\${APP_EXECUTABLE_FILENAME} %1"
!macroend
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 28 (14 by maintainers)
Commits related to this issue
- fix: NSIS Installer Not Working on Second Invocation #722 — committed to develar/electron-builder by develar 8 years ago
- fix(nsis): uninstaller path should be not quoted #722 — committed to electron-userland/electron-builder by develar 8 years ago
- fix(nsis): correct fix of #722 (NSIS Installer Not Working on Second Invocation) — committed to electron-userland/electron-builder by develar 8 years ago
Most upvoted comments
Check it out. The task manager shows the uninstaller is still running, yet the progress bar is at 20%.
+2
ghost on Sep 6, 2016