I've learned to add a task to the Windows 10 Task scheduler with Inno Setup (article).
Filename: "schtasks.exe"; Parameters: "/create /tn ""Greetings hourly"" /tr ""{app}\engine.exe -reprint"" /sc hourly /st 01:00 /f /NP"; Flags: shellexec
I use this to add a Delphi created console application, but when the task executes, the console window pops-up, because in the task properties there's a check in the "Run only when the user is logged on" checkbox. How can I create a task with the checkbox "Run whether the user is logged on or not" selected? If I add the /NP parameter, then the checkbox "Do not store password" is selected, but I don't want this.
I want to add a task that runs invisible and also regardless if the user is logged in or not.