Documentation
¶
Overview ¶
Command stepsecurity-dev-machine-guard-task is a GUI-subsystem launcher that invokes the console-subsystem agent under CREATE_NO_WINDOW. Built with `-ldflags "-H windowsgui"`.
Why a separate binary: Windows allocates a console for any console-subsystem process whose parent has none. Task Scheduler under /ru INTERACTIVE is such a parent, so the agent itself would always flash a window. The only fully-reliable suppression is for the parent CreateProcess call to pass CREATE_NO_WINDOW, and the only way to be that parent without flashing our own console is to be GUI-subsystem. The agent stays console-subsystem so interactive CLI use (install, configure, manual scans) still works normally.
Layout: both binaries sit in the same directory. The scheduled task points at this launcher; arguments forward unchanged.
Lifecycle: the agent is assigned to a Job Object with JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE so it dies when the launcher does — including under Stop-ScheduledTask, which only terminates the registered action's PID.