Most persistence libraries for scheduled tasks either drag in NuGet dependencies, require elevated registration, or leave behind task names that look like they came from a red team checklist.
TaskSchedulerPersist takes the opposite approach. It is a .NET Framework 2.0 library that talks to the Windows Task Scheduler through raw COM interop — every interface declared inline with the correct GUIDs and marshaling attributes, no Microsoft.Win32.TaskScheduler package required. Task names derive from the machine GUID under HKLM\SOFTWARE\Microsoft\Cryptography, so each host gets a unique, bland identifier prefixed with _.
The trigger model is dual: user logon and session unlock, each with a configurable five-minute delay scoped to the current user’s SID. The action runs under the interactive token — no admin required to register. A static constructor calls the registration logic on assembly load, so the library can activate through Assembly.Load without a conventional entry point. Release builds emit placeholder tokens for operator-defined payloads; a post-build step writes the compiled DLL as Base64 for transport.
The design target is T1053.005-style persistence that fits older .NET runtimes and corporate Windows estates where Framework 2.0 is still present and third-party task libraries are not an option.
Built for authorized red team operations, penetration testing, and security research with written permission.