Do you run the scheduled task as the same user as when you run the script interactively? Any error messages in Event Viewer? Try using "system("net use ....") or die "error $?";" to get the child process error in Event Viewer, or alternatively, write this error into a log file.
the hardest line to type correctly is: stty erase ^H
Comment on Re: perl on windows: using `net use` command
Hi,
I do run as the same user interactively as I set as the owner of the scheduled task. I wrote the value of the scalar value of the `net use ...` command (which I mistook as the error code), and have modified it to write out the $? value, which I see now is equal to 512. Any ideas with this new tidbit?
Thanks,
Matt
Update on this problem: the drive mount is now working in this scheduled task after my administrator bounced the server on which I was having problems. The consensus around here was that the drive was not mapping because some old, conflicting mapping or credentials were cached. Thank you to everybody for their help. Matt