TIL there's a ridiculous and brand new bug in a place I never expected: In the schtasks command, even if you enclose the path of the executable to run in quotes, it will now split the path along spaces. So if the full path is "c

Program Files\task.exe", in the resulting Task Scheduler item, it'll only try to execute c

Program and consider Files\task.exe to be an argument.
FFS Microsoft if you
still can't get spaces in paths working correctly, then why the fuck did you name one of the most common folders in the filesystem with one??!!
EDIT: After digging some more, it looks like this is actually a bug that Microsoft fixed? I'm seeing references that you have to double-quote paths with spaces to get schtasks to handle them correctly. This script has worked perfectly for years and just now it's an issue.