title: xcopy with credentials on remote machine
body: <p>I am trying to access a remote server on a different domain through its IP address. In run command I entered the following</p>
  
  <pre><code>\\XXX.XXX.XXX.XXX\C$\Program Files\
  </code></pre>
  
  <p>I get a pop up window asking for username and password. I enter it, and accessed the path. When I try accessing the folder again it do not ask for my password. But when I restart, it does give the popup again. </p>
  
  <p>Is there a way to add my credentials?? Lets say my domain\username is <code>MyDomain\RapsyTree</code>. I tried the following:</p>
  
  <pre><code>cmdkey /generic:TERMSRV/YYY.YY.YYY.YYY /user:YourDomain\rapsalands /pass:secretPass
  </code></pre>
  
  <p>The credentials are getting added. But I am still getting the pop up for username and password.</p>
  
  <p>Actually I am trying to <code>xcopy</code> some files on this server on different domain. But I need to do it with different credentials. I am using batch files. Any pointers will be of great help. Let me know if I am not clear. I am using <code>Windows 7</code> Thanks!</p>