launcher
launcher copied to clipboard
Reset RecoveryActions during uninstall to ensure manual start will be respected
Closes https://github.com/kolide/launcher/issues/2190.
I tested and our original data race theory didn't bear out -- I updated the uninstall function to confirm that the launcher service's start type was set to manual start, and even with backoff and a fresh service handle, the behavior didn't change. I looked in the event logs, and those confirmed that the service's start type was set to demand start (manual) before the service shut down. I also saw in the event logs immediately afterwards that the service manager noted that the launcher svc had terminated unexpectedly and that it would restart in 5 seconds.
Updating the uninstall function to also remove our recovery actions fixed the issue. Now, launcher remains stopped after remote uninstall.
Actually, we could pause slight. Let's chat in #2190
Might want to take this in a different direction, closing for now 🤷♀️