• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 603
  • Last Modified:

Problem running script targeted at mapped drive

I need to run a robocopy script which copies to a mapped network drive on several workstations. I created a new password protected account on each machine named "Backup". I mapped the network drive where the file copy is supposed to be stored in the new "Backup" account and set it to connect at logon.  (This network share is connected as a mapped drive in all the other accounts on these machines as well). I then created a new scheduled task using the "Backup" user's credentials within the Backup user's account.
However the robocopy backup is not running as expected. The script is launched but the mapped network drive is not available so the file copy fails. At the time the script runs the computer is usually being used and the mapped drive is available within that session.
I could have sworn that I have done this type of configuration in the past with any problem and am not completely clear why it is failing this time. Any ideas how I can get this to work reliably without putting the script within the active user's account?
2 Solutions
Have you added the user as an administrator on the source machine?
Try re-mapping the drive from within the script. Try something like:
net use m: \\server\share >>mapping.log 2>&1
This way in the log you will see what could be possibly wrong.
Keep in mind that if you have connected the network drive with one user credentials (e.g. the logged-in user) you cannot connect it in the same time with different credentials.
Hope it helps!
That's correct... WinXP has no provision for loading the user's profile during the execution of a scheduled task.
A simpler approach would be to just not use a mapped drive at all...  instead, just use the Univerisal Naming Convention (UNC) style name (like this:   \\SomeServer\SomeShare)
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now