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
Npcap OEM 0.9990: Silent install failure leaves npcap files behind #2013
Comments
NSIS is not a transactional installer system, so we're hampered a bit by that. For installation, you can try the For uninstallation, we don't really have a good way to "undo" a file removal, so I will make some changes to avoid bailing out early on uninstallation and instead perform as many of the uninstall steps as possible, using the delete-on-reboot capability where possible. |
Yes, NSIS may be dumb, but even so, it should not be too hard to "stage" the install in some way, to a reasonable degree. For example, when installing Npcap, if this is an upgrade (prior version exists), you can back up the existing files and registry branches to a subdirectory in %ProgramFiles%\Npcap. Then run the uninstaller as usual; then run installation. If the installer fails for any reason, you can clean up the incomplete install, leaving only logs. Then, if this was an upgrade (previous version existed), restore the backed-up files and registry branches, and probably top it off by running Or maybe just dump NSIS and migrate to WiX Toolset (MSI)? It would have several advantages:
|
Hi @akontsevoy . Yes, MSI would be better and we are hoping to move Npcap OEM to that instead of NSIS. It is issue #1175 . But we have some higher priority work to finish first. I will add your list of MSI advantages to that issue discussion. |
Npcap 0.9991, released yesterday, should address most of the installer failures you encountered, and its uninstaller will do a more thorough job of cleaning up after itself. Note that an upgrade runs the uninstaller for the previous version, so some of these improvements will not be seen until upgrades to upcoming versions. Nevertheless, I'm closing this issue. Please open a new issue if you have problems with Npcap 0.9991 or later installer/uninstaller. |
As of 0.9990, #1910 is still not completely fixed. A failed install (such as failure to install the driver) now exits with a proper exit code, but still leaves files behind, most importantly %SystemRoot%\System32\Npcap\wpcap.dll and the HKLM\Software\Npcap registry branch. This is causing our application to misdetect that Npcap is already installed, and we had to introduce yet another clumsy workaround (namely to check if the npcap service is installed).
The expected behavior is that an installation should be transactional -- all or nothing. A failed installation should clean up any files or registry values (better yet, roll them back to a previous version if one was installed), leaving behind only installation logs.
The text was updated successfully, but these errors were encountered: