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

How to persistently map a network drive to another domain?

I'm using Robocopy to backup files from a PC onto another PC that is on a different domain with no trust relationship, so I have to authenticate with whatever user I'm assigned to on the other domain.  Robocopy copies fine so long as I map a network drive FIRST (providing authentication) before running robocopy.  But I need to set this up automatically so that it'll backup on a daily basis without me having to map a network drive every single time.

I'm running this in a windows terminal session, so whenever I log out, the mapping disappears.  Is there an solution to this?
0
mainemonty
Asked:
mainemonty
1 Solution
 
martonejdCommented:
create a batch file to map the drive and put that file in the startup folder.  

net use (driveletter)  \\computername\sharename

just put that in a txt file, then rename it to filename.bat
0
 
za_mkhCommented:
There are more options that you will need since you need to use credentials from another domain
so it would be something like this
net use x:  \\server1\fileshare Password /user:[DomainName\]UserName /savecred /persistent:yes

the /savecred option could save your password and the /persistent option tells the computer to remember the drive mapping.

If you use the command as I listed there, the problem is that anybody who has access to the batch file will see you password which is what you need since you want it to be automatic. Hopefully the /persistent option saves it for your session!

Look at this url for more information:
http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/net_use.mspx?mfr=true
0
 
Nicholas IlerCommented:
When you add a network path there is an option for making it reconnect on log-in.
Other than this I would create a startup script, as the comments refer to above.
0

Featured Post

Fill in the form and get your FREE NFR key NOW!

Veeam is happy to provide a FREE NFR server license to certified engineers, trainers, and bloggers.  It allows for the non‑production use of Veeam Agent for Microsoft Windows. This license is valid for five workstations and two servers.

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