After a lot of testing I eventually figured it out. It turns out when a scheduled task runs another program, all mapped drives become "unavailable" to the program. You have to "re-map" the drives when the program runs in the context of a scheduled task.
I had the PHP script do:
Code: Select all
$cmd = 'net use > net_use.txt';
and every mapped drive has a status of "unavailable" when run as a scheduled task, but status of "Ok" when run directly from the command line. If I re-mapped the drives (or mapped new drives to the same paths with different drive letters) it worked.