[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Windows shares not available on local machine with network cable unplugged.

Posted on 2007-10-08
8
Medium Priority
?
1,113 Views
Last Modified: 2013-12-23
Has anyone else noticed that shares on a machine are not even available on the local machine if the network cable is unplugged?

We create a share (say c:\share) and map it to \\mylocalmachine\share

We can access this from the local machine using the unc \\mylocalmachine\share.
Unplug the network drive and we get the message "\\ymlocalmachine\share is not accessible. You might not have permission to use this network resource.. blah blah blah

Does anyone know how to make that work. I *had* assumed it would use the local loopback driver.
0
Comment
Question by:tjsbbi
7 Comments
 
LVL 7

Expert Comment

by:Isigow
ID: 20038412
Just a guess, but does it have to do with DisableDHCPMediaSense? If you pull the network cable XP/Wk3 will disable the network and the nic driver so it stops trying to communicate with the domain (if your on one) and thus will turn off file/print sharing service that is running on the network card.

other option would be if your a member of the domain and trying to give access to domain users instead of local users, thus not being able to authenticate the domain users when the cable is pulled.

Would lean heavier toward option 1 though...

2 options off the top of my head...
Isi
0
 

Author Comment

by:tjsbbi
ID: 20038668
Well the computer is actually using a static ip address. However I tested this with a DHCP setup but it doesn't work. The share still becomes unavailable when the cable is unplugged.

We are not using any domain users.

What we are trying to do is have the application continue to work for a local user of that machine when it is unplugged from the network. We are using a share name because when it *is* connected to the network users on different machines connect using the share. And the software is configured with a well-known share name.
tjs
0
 
LVL 4

Expert Comment

by:itquestions
ID: 20042218
It sound like a drive mapping persistence issue.  You can force the share to always be there by using this vbs login script.

Dim WSHNetwork, objNetwork, clDrives, boolPersistent
Set objNetwork = WScript.CreateObject("WScript.Network")
Set WSHNetwork = WScript.CreateObject("WScript.Network")
boolPersistent = True ' True = Persistent ; False = Not Persistent

On Error Resume Next
'Disconnect ALL mapped drives
Set clDrives = WshNetwork.EnumNetworkDrives
For i = 0 to clDrives.Count -1 Step 2
WSHNetwork.RemoveNetworkDrive clDrives.Item(i), True, True
Next


'Map all drives
objNetwork.MapNetworkDrive "H:", "\\mylocalcomputer\share", boolPersistent
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 

Author Comment

by:tjsbbi
ID: 20042852
This is an interesting script however the issue is that \\mylocalcomputer\share is not accessible when the network cable is unplugged. (Even though the share is on this computer).

We aren't really trying to map a logical drive but if we *were* then this script will fail because \\mylocalcomputer\share cannot be reached if the network cable is unplugged.

Really it looks like the problem is similar to Isigow: suggestion of DisableDHCPMediaSense. Windows detects that the network cable is unplugged and denies requests that require the network stack (even though localhost is still there).
tjs
0
 
LVL 4

Expert Comment

by:itquestions
ID: 20043596
Sorry about that, thanks for the clarification.
0
 

Author Comment

by:tjsbbi
ID: 20043916
Ok. We've found a solution.
It seems that the loopback is *not* installed. I had incorrectly assumed that the 127.0.0.1 functionality was based on the loopback driver.
So I installed the loopbackdriver and left it to dhcp (the default). When there's no network it allocates a local 169.254.xxx.xxx number. The network shares are then all still available when the computer is not connected to a network.

Thanks to everyone
0
 
LVL 1

Accepted Solution

by:
Computer101 earned 0 total points
ID: 20286795
PAQed with points refunded (500)

Computer101
EE Admin
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Creating an OSPF network that automatically (dynamically) reroutes network traffic over other connections to prevent network downtime.
Measuring Server's processing rate with a simple powershell command. The differences in processing rate also was recorded in different use-cases, when a server in free and busy states.
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …

868 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question