# Solved: Using the "Net Use" command to map a drive



## Alex Ethridge (Apr 10, 2000)

I am attempting to map a drive letter to a computer at a remote location. I know that computer's IP address; but, the NET USE command isn't working to map that drive--at least not the way I am formatting it. I have verified the remote computer's IP address. 

Here's what I have tried so far"

net use Z: 192.168.1.104 /persistent:no
net use Z: \\192.168.1.104\ /persistent:no
net use Z: http:\\192.168.1.104 /persistent:no
net use Z: http:\\192.168.1.104\ /persistent:no

No Z drive shows in My Computer after executing the command.

Any suggestions?


----------



## Crum1515 (Oct 29, 2009)

I am not too savvy with netuse.

Are you on the same network/domain?

I don't think you can map to just the PC's IP, I think you need to share a resource and then map to it, or something along those lines. I will run this by our engineer real quick and see what he says.


----------



## JohnWill (Oct 19, 2002)

You need to specify a share name.

NET USE
[devicename | *] [\\computername\*sharename*[\volume] [password | *]]
[/USER:[domainname\]username]
[/USER:[dotted domain name\]username]
[/USER:[[email protected] domain name]
[/SMARTCARD]
[/SAVECRED]
[[/DELETE] | [/PERSISTENT:{YES | NO}]]

NET USE {devicename | *} [password | *] /HOME

NET USE [/PERSISTENT:{YES | NO}]


----------



## Alex Ethridge (Apr 10, 2000)

We have other computers in this building that have drive R and drive Z mapped to drive C and D on remote systems. A user name and password are required on the remote system's C drive but non on the remote system's D drive. They show up in My Computer (on the system with drive R and Z that work) as follows:

D-drive (\\192.168.1.104) (R
C (\\192.168.1.104) (Z

When I use *net use R: \\192.168.1.104\C /persistent:no*

net use R: \\192.168.1.104\C /persistent:no
The password or user name is invalid for \\192.168.1.104\C.

Enter the user name for '192.168.1.104': XXX
Enter the password for 192.168.1.104: XXX
System error 53 has occurred.

The network path was not found.

C:\>


----------



## Alex Ethridge (Apr 10, 2000)

JohnWill,

I was typing while you were posting.

Thanks, I'll' try that.


----------



## Alex Ethridge (Apr 10, 2000)

Here's what worked:

*NET USE R: \\192.168.1.104\D-drive /PERSISTENT:NO
NET USE Z: \\192.168.1.111\C /PERSISTENT:NO*

When this batch executes, it asks for a user name and password for R, which we enter; but, no user name and password is required for Z as none is required on the remote system.

I had the NetBIOS names reversed for the IP's and that is partly why it didn't work before. I discovered that when I decided to dearch the registry for those IP numbers and see what the Registry had for them. That was when I also discovered I had to enter the NetBIOS name, which is the drive label on the remote system's drives.

Thanks for the help.


----------



## JohnWill (Oct 19, 2002)

Yep, that looks right.

You can use the computer name instead if the IP address, this makes the mapping work even if DHCP changes the IP address of the remote computer.


----------



## Alex Ethridge (Apr 10, 2000)

Thanks for the suggestion and I'll reference it for the future; but, those IP addresses are about 150 miles away (VPN) and I had limited access and only information with questionable reliability about their names.

There are two other computers in the building I was working in that have been using those IPs for over a year so I think I can safely assume those are static--for now.


----------



## JohnWill (Oct 19, 2002)

True, if they're static IP addresses, it doesn't make any difference. 

*You can mark your own threads solved using the







button at the top of the first page of the thread in the upper left corner.©*


----------

