Why can I map a local drive if I'm connected to the network but can't if not?

K

Kelvin

I need to map a drive to a local share for users that are off the network.
net use p: \\ComputerName\ShareName

I can map this if the user is connected to the network, but if I unplug the
laptop, I get this error "system error 1231 has occurred. the network
location cannot be reached".

What do I need to do to be able to map this drive when the user is off the
network?

Any help would be appreciated!

Kelvin
 
T

Terry R.

On 10/30/2009 9:52 AM On a whim, Kelvin pounded out on the keyboard
I need to map a drive to a local share for users that are off the network.
net use p: \\ComputerName\ShareName

I can map this if the user is connected to the network, but if I unplug the
laptop, I get this error "system error 1231 has occurred. the network
location cannot be reached".

What do I need to do to be able to map this drive when the user is off the
network?

Any help would be appreciated!

Kelvin

Hi Kelvin,

You have to be connected and able to access the drive to map it.

So use a batch file to test for the existence of the drive and proceed
to map if it exists and exit without attempting if it doesn't. Then you
won't get any error messages.


Terry R.
 
K

Kelvin

Sorry, not sure I follow.

With the eithernet cable attached to the laptop I can map the cable fine.
Without doing anything else, if I just pull the plug from the laptop, the
drive becomes unavailable.
"P: is not accessible" is the error when I click on the drive.
I plug the cable back in, wait a few second and the drive is there
(accessible) again.

I'm thinking there's a service or something that needs to be installed for
this to work when it's off the network...

I've run GPUpdate thinking there was a rights issue. But it does it with me
logged in as a Domain Admin as well as the user who I gave Power User rights
to...

I spend 99% of my time in a Doamin emvironment so am thinking this is sort
of a workgroup type issue...

I will incorporate this when I can get the drive to be accessible with the
cable unblugged...
I do have the net use command in a bat file, but am not testing if the drive
exists...

Kelvin
 
D

David B.

So your trying to access a network share when your not connected to the
network? Think about that for a moment...

--


--
Kelvin said:
Sorry, not sure I follow.

With the eithernet cable attached to the laptop I can map the cable fine.
Without doing anything else, if I just pull the plug from the laptop, the
drive becomes unavailable.
"P: is not accessible" is the error when I click on the drive.
I plug the cable back in, wait a few second and the drive is there
(accessible) again.

I'm thinking there's a service or something that needs to be installed for
this to work when it's off the network...

I've run GPUpdate thinking there was a rights issue. But it does it with
me logged in as a Domain Admin as well as the user who I gave Power User
rights to...

I spend 99% of my time in a Doamin emvironment so am thinking this is sort
of a workgroup type issue...

I will incorporate this when I can get the drive to be accessible with the
cable unblugged...
I do have the net use command in a bat file, but am not testing if the
drive exists...

Kelvin
 
J

John John - MVP

That's like pulling the cable wire out of the TV and then wondering why
it is that you can't receive any cable channels...

John
Sorry, not sure I follow.

With the eithernet cable attached to the laptop I can map the cable fine.
Without doing anything else, if I just pull the plug from the laptop, the
drive becomes unavailable.
"P: is not accessible" is the error when I click on the drive.
I plug the cable back in, wait a few second and the drive is there
(accessible) again.

I'm thinking there's a service or something that needs to be installed for
this to work when it's off the network...

I've run GPUpdate thinking there was a rights issue. But it does it with me
logged in as a Domain Admin as well as the user who I gave Power User rights
to...

I spend 99% of my time in a Doamin emvironment so am thinking this is sort
of a workgroup type issue...

I will incorporate this when I can get the drive to be accessible with the
cable unblugged...
I do have the net use command in a bat file, but am not testing if the drive
exists...

Kelvin
 
K

Kelvin

No, I'm mapping the drive the the local computer, that has a shared folder..

I have an application that when the users are on the network have a "P:"
drive.
When their off the network I still need them to have a "P:" drive.
\\fileservername\sharename\programfolder
\\laptopname\sharename\programfolder

Kelvin


David B. said:
So your trying to access a network share when your not connected to the
network? Think about that for a moment...
 
3

3c273

If the drive you are trying to map is on the same machine, use the subst
command instead.
subst p: c:\path_to_local_share
Louis
 
A

amdrit

Subst is the command you want to use when mapping locally. Mapping drives
as you propose, you are really using the net.exe to do so, it is attempting
to get your loopback address (127.0.0.1) and since you are not plugged in
your loopback doesn't exist.
 
A

amdrit

That is just a silly response. If he were trying to connect to an external
resource, your barb would apply. He is connecting locally and essentially
didn't realize the mechanics of net use commands or that subst would be the
viable option for local resources.


John John - MVP said:
That's like pulling the cable wire out of the TV and then wondering why it
is that you can't receive any cable channels...

John
 
K

Kelvin

Thanks to those that sugested the subst command, that is the answer I was
looking for!

Thanks!

Kelvin
 
J

John John - MVP

Given his explanation the response was to be expected:

"With the eithernet cable attached to the laptop I can map the cable
fine. Without doing anything else, if I just pull the plug from the
laptop, the drive becomes unavailable."

Louis had the answer, his crystal ball is clearer than mine today...

John
 
L

LVTravel

Kelvin said:
No, I'm mapping the drive the the local computer, that has a shared
folder..

I have an application that when the users are on the network have a "P:"
drive.
When their off the network I still need them to have a "P:" drive.
\\fileservername\sharename\programfolder
\\laptopname\sharename\programfolder

Kelvin

Create three batch files and place them on the desktop or a shortcut to them
on the quick launch toolbar, one for on network and two for off network.

On network would be:

net use p: \\ComputerName\ShareName /persistent:no

They run this batch file when on the network. The /persistent:no will
un-map the drive when the computer is turned off to enable the off-network
batch file to run OK.


Off network use the Subst command.

To create the drive letter run this command in the batch file and place the
path in the command that the program needs to look at.

SUBST P: C:\path_for_substitute_data_folder

Before shutting down run this batch file to allow the P drive to be
"unattached" to enable the net use command to be used later.

SUBST P: /D
 
B

Bruce Chambers

Kelvin said:
Sorry, not sure I follow.

With the eithernet cable attached to the laptop I can map the cable fine.
Without doing anything else, if I just pull the plug from the laptop, the
drive becomes unavailable.
"P: is not accessible" is the error when I click on the drive.
I plug the cable back in, wait a few second and the drive is there
(accessible) again.

All perfectly normal.

I'm thinking there's a service or something that needs to be installed for
this to work when it's off the network...


It CAN'T work when it's 'off the network." I don't even understand how
you could possibly expect to connect to a network share if the computer
isn't connected. The very concept makes no sense.




--

Bruce Chambers

Help us help you:


http://support.microsoft.com/default.aspx/kb/555375

They that can give up essential liberty to obtain a little temporary
safety deserve neither liberty nor safety. ~Benjamin Franklin

Many people would rather die than think; in fact, most do. ~Bertrand Russell

The philosopher has never killed any priests, whereas the priest has
killed a great many philosophers.
~ Denis Diderot
 
B

Bruce Chambers

amdrit said:
That is just a silly response. If he were trying to connect to an external
resource, your barb would apply.

No, it's still apt.
He is connecting locally...


No, he's not even trying to connect locally if he's using a Net command.





--

Bruce Chambers

Help us help you:


http://support.microsoft.com/default.aspx/kb/555375

They that can give up essential liberty to obtain a little temporary
safety deserve neither liberty nor safety. ~Benjamin Franklin

Many people would rather die than think; in fact, most do. ~Bertrand Russell

The philosopher has never killed any priests, whereas the priest has
killed a great many philosophers.
~ Denis Diderot
 
A

Anteaus

If you map to \\127.0.0.1\share that should still work.

Or, install a loopback adaptor with another IP address.

Or as mentioned use subst.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top