We have faced this issue. This happens becase script is run in batch mode and manually mapped drives will not be available even if you run as logon user mode. The alernative is either include mapping command and then copy in your script.
The other alternative is setup login script for drive mapping and enable logon scripts execution on agent configuration so that everytime user is logged in drive will be mapped automatically.
Yes, seems it is the only work around, I really don't want to change the code, but it does work, thank you very much.