5

I have a network drive (for instance, G: on Server A). And I am trying to map an additional network drive (H:) to a new server (Server B). I tried the net use command, giving to rise to error 1219 on Window XP.

net use h: \\ServerB\docs /user:ServerB\user Password 

I am connecting the network drive of Server A using Server A's account. And I have to use both of network drive simultaeusly, so I don't think I can the net use * /del command to connect to Server B.

What can I do?

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Samuel.P
  • 83
  • 1
  • 1
  • 5

2 Answers2

9

Any util commands:

net use (to see all existing connections)

net use * /del /yes (to delete all existing connections)

Script

@echo off

set "svrname=server"
set "share=share$"
set "usr=administrator"
set "pwd=password"

for /f "tokens=2" %%# in ('net use^|find /i "\\%svrname%"') do net use %%# /delete>nul

net use l: \\%svrname%\%share% /user:%usr% "%pwd%">nul
Kiquenet
  • 14,494
  • 35
  • 148
  • 243
4

If you use the server IP address instead of the DNS name, it gets around this silly Windows limitation.

So instead of

net use h: \\ServerB\docs /user:ServerB\user Password 

If 'Server' has an IP address of 192.168.0.1 you can use

net use h: \\192.168.0.1\docs /user:ServerB\user Password 

Hope this helps

Mike
  • 41
  • 1
  • This was the only option that worked for me, the solution from Kiquenet gave the same error 1219 for me – bolvo Apr 27 '16 at 07:57