So when I try to open Excel or Access via task scheduler (on a 2019 MS Server), it doesn't open it -- or at least doesn't open it visibly? Any special hints/tricks here? And this is without any special X switches, etc. Just wanna open Access!
It is possible for you to open something in a way that it is not visible, though it is also possible to command the thing (after it has been opened) to become visible if you wanted. I used to do that for Outlook (opened from Access) all of the time. "Open" in Windows context means the file has been opened, presumably by the right utility program. "Open" has nothing to do with visibility. The Office apps all have a .Visible option, though where you find that setting may depend on which app you are launching. Launching from the task scheduler doesn't have a direct interface to the ".Visible" property, though.
And this is without any special X switches, etc. Just wanna open Access!
That is not the original question you asked. To do what was asked in post #1 of this thread, you need to use the /X option if the task scheduler is used for this situation. All Windows programs (and MS-DOS before that) have default I/O channels that are automagically opened following a successful launch. They are assigned according to how the app was launched. The display, keyboard, and mouse each have one "reserved" I/O channel when you launch from a Windows explorer file icon and ALSO when you launch using the CMD prompt, because the app inherits from its launcher. Interactively by icon launch or a command line launch, your session's defaults are what gets passed along.
For Windows Task Scheduler, that type of launch runs as the SYSTEM process which uses scripts and log files for its default I/O channels. Therefore, an app opened that way inherits its initial channels from SYSTEM - but that account has NO FREAKIN' IDEA what to do with the app, so it leaves it dangling and taking up memory but unable to communicate to get instructions.
Using the /X option in that context TELLS it what to do, gets it started, etc. - and the advice given earlier by several members was based on that background launch context.
You could ask "well, what if I'm there at the time?" The answer is "Yeah, but you ain't logged in as SYSTEM, and the app IS logged in as SYSTEM." Windows security measures will stop your logged in session from seeing that scheduled session because you aren't the same user.
You could ask "well, what if I launch it under my account?" The answer is "Yeah, but the automation still inherits the default I/O channels from its launcher. The permissions would be right so you could use YOUR logged-in process to look at the statistics of the dangling process run under your name - but it still is a dangling process."
You might not realize it but what you are asking is hacker behavior - trying to sneak past Windows rules on interprocess isolation. There is an old rule often quoted about "neat" programming. "If you opened it, you should close it." But the Windows security corollary is "If you didn't open it and aren't an admin, you CAN'T close it."