npcap
npcap copied to clipboard
Document installer changes: exit codes, etc.
Need to update documentation for recent changes to the Npcap installer. Specifically, 2 return codes in silent mode:
- ERROR_SUCCESS_REBOOT_REQUIRED (3010)
- ERROR_FAIL_NOACTION_REBOOT (350)
But also audit for other changes that may not be documented.
Good idea. We should definitely document this in the Npcap guide as you suggest. Here are a couple more notes from our discussion:
- The default exit codes are provided by the NSIS installer as documented here:
- 0 - Normal execution (no error)
- 1 - Installation aborted by user (cancel button)
- 2 - Installation aborted by script
- In addition we've added the two special return codes referenced in this issue:
- 350 - ERROR_FAIL_NOACTION_REBOOT - This rare code means we weren't able to install but suggest rebooting and trying again. This only happens in two unusual cases:
- when upgrading from the very old Npcap versions 0.994 or 0.995, which require a little bit of prep work and then reboot before the upgrade.
- When we get ERROR_SERVICE_MARKED_FOR_DELETE from NetCfg when trying to install Npcap. This means we can't reuse the service name until Windows has been restarted and processed the pending deletion.
- 3010 - ERROR_SUCCESS_REBOOT_REQUIRED - This is for the rare case where NetCfg returns NETCFG_S_REBOOT, meaning that Windows successfully registered the new driver but won't start it util the next boot. It could possibly also occur with pending file overwrite/delete actions requiring a reboot, but we work around most of those.
- 350 - ERROR_FAIL_NOACTION_REBOOT - This rare code means we weren't able to install but suggest rebooting and trying again. This only happens in two unusual cases:
It's important to note that the installer is a backgrounded app (even in silent mode) and so to get the "real" error code, you need to launch and wait for it. Two ways to do this are using start /wait in cmd.exe or Start-Process -Wait in PowerShell.