Reputation: 3238
I have a .vbs script that copies files from multiple remote computers. Each server has a shared folder that I map as a network drive (W:). When I run it by double-clicking, it runs fine, but if I run it from Task Scheduler (Win Server 2003) it hangs on this line:
NetworkObject.MapNetworkDrive "W:", "\xxx.xxx.xxx.xxx\sharename", false, [username], [password]
I've tried everything but I can't figure out why it won't run in task scheduler. Please help!
Upvotes: 2
Views: 1811
Reputation: 21
Did you try to run it like:
C:\Windows\system32\cscript.exe yourscript.vbs
Upvotes: 2