I have a program operation that is initiated when a user is logged on, but it is long-running and non-interactive in nature, and could be completed in the background. I'm confused by the process lifecycle in windows.
Can any user process reliably continue to run (in the background) in the face of:
- User signing out
- Switching to a different account (without logoff)
- User locking the screen
- Power state switch (sleep/hibernate)
There exist programs that can restart automatically following a reboot/power cycle (e.g. Edge reopens its tabs after an automatic software update). Are those special cased, or are those simply regular programs hooking into some power-event API?