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 Installer Not Working on Second Invocation

See original GitHub issue
  • 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

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:28 (14 by maintainers)

github_iconTop GitHub Comments

2reactions
ghostcommented, Sep 6, 2016

smokinggun Check it out. The task manager shows the uninstaller is still running, yet the progress bar is at 20%.

0reactions
ghostcommented, Sep 16, 2016

Confirmed that this problem is no longer present in 6.7.7. Thank you!

Read more comments on GitHub >

github_iconTop Results From Across the Web

NSIS ExecWait not launching secondary installer
My secondary installer does require elevation. I found the first error: I was using RequestExecutionLevel user instead of admin when I changed ...
Read more >
System::Call not working with custom DLL - NSIS Forums
System::Call not working with custom DLL Hi, I've written a function in my own DLL to find out if the user has permission...
Read more >
Two installations in one installer - NSIS - SourceForge
This script shows how we can install two programs with one installer, where each program has its own Directory and InstFiles page.
Read more >
Using NSIS To Make Installable Java Applications
NSIS, as their owners call it, is "the scriptable win32 installer/uninstaller system that doesn't suck and isn't huge." How does NSIS work?
Read more >
NSIS - electron-builder
perMachine = false Boolean - Whether to show install mode installer page (choice per-machine or per-user) for assisted installer. Or whether installation always ......
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