Michael
When running, the scheduled task will have the credentials of the user account you have set up for the task
If you use something like LocalSystem, then be aware that this user does not have any network access, which may explain the error 12 if your *windev* points to a shared printer device.
HTH
Regards,