Solved

Map Network Drive keeps disconnecting

Posted on 2014-01-21
21
5,623 Views
Last Modified: 2014-01-22
Hello Experts,

I have a laptop running Windows 7 Professional SP1. I have two mapped network drives and when I restart my laptop the network drives do not reconnect. Also, if the laptop is inactive for sometime I have noticed that the map network drives will drop. They reconnect if I were to double click on each of them, but I would like to them just connect once the laptop turns on and not disconnect if the laptop is idle.
0
Comment
Question by:asp_net2
  • 10
  • 10
21 Comments
 
LVL 90

Accepted Solution

by:
John Hurst earned 500 total points
ID: 39798865
For each drive, run:

NET USE X: /Delete  (where X is the drive).  Repeat for each drive.

Now run NET USE to see if any entries remain in the list.

Then run NET USE /PERSISTENT:NO

Then restart the computer and re-map the drives.  Do they now stay connected?

.... Thinkpads_User
0
 
LVL 9

Expert Comment

by:BigPapaGotti
ID: 39798881
I think what is happening is that the drives try to map before the wireless network is connected. What I would try to do is create a script that will pause for about 30 seconds and then map the network drives. You can place this script in your startup folder so it runs every time your. Computer starts.
 To create the script open notepad and type in the following where x and w are your network drive letters you want to have save this file with a .bat file extension and test to ensure it works properly:

timeout /t 30 /nobreak > NUL
Net use x: \\server name\sharename
Net use w: \\server name\sharename

As for your computer going idle is the pc going to sleep or not. I would check the power options in control panel to see if the wifi card is being deactivated after a certain amount of time.
0
 
LVL 90

Expert Comment

by:John Hurst
ID: 39798887
Wireless needs to connect before server operations.

What I do is use a script file on the user's Desktop to map drives after the connection is made.

Still go through my post above to remove phantom maps no longer used.

.... Thinkpads_User
0
 
LVL 4

Author Comment

by:asp_net2
ID: 39798892
Hi,

I'm not using WiFi at all. In fact I have WiFi disabled and only using NIC.
0
 
LVL 4

Author Comment

by:asp_net2
ID: 39798894
Will the script still work without using WiFi and if so can someone please help me. This is driving me crazy!!
0
 
LVL 90

Expert Comment

by:John Hurst
ID: 39798899
Yes a script will work wired or wireless.

Check persistence first as I suggested and let us know about that.

If you wish to use a script, set up a batch file on the desktop with NET USE commands in it to map drives and folders.

... Thinkpads_User
0
 
LVL 4

Author Comment

by:asp_net2
ID: 39798934
thinkpads_user,

Ok, so I used notepad and added the following lines below but I changed my server name to map to my location and saved it as a .bat file. What do I need to do now with that .bat file in order for the network shares to run?

timeout /t 30 /nobreak > NUL
Net use x: \\server name\sharename
Net use w: \\server name\sharename
0
 
LVL 90

Expert Comment

by:John Hurst
ID: 39798939
Copy the .bat file to the desktop and call it "Connect to server" . Once copied, double click it to run it.

I really wish you would go back to my first post and check persistence. Since you have a wired connection, that may well be the issue.

... Thinkpads_User
0
 
LVL 4

Author Comment

by:asp_net2
ID: 39798947
Hi thinkpads_user,

I will check the persistence now. I just re-created the map network drives. Do I now just run what you supplied for the persistence check?
0
 
LVL 4

Author Comment

by:asp_net2
ID: 39798973
Hi thinkpads_user,

The first method that you supplied did indeed work. Now when I restart or shutdown the laptop the map network drives DO NOT disconnect now. Now, do I need to worry about the laptop being on for so long before it stops working?
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 90

Expert Comment

by:John Hurst
ID: 39799569
If you shut down the laptop in an orderly manner each time, it should remember its mappings and you should be fine.

If disconnections are random (disconnect the cable, shut down later), then I always use a disconnect script.

Net use x: /Delete
Net use w: /Delete

Make a .bat file, copy it to the desktop and call it "Disconnect Server"

You can also do this:

Delete network drives as before.

Now map drives (folders) via Windows Explorer. In the Map session, uncheck the setting that says "Remember network connection" (something like that). With that unchecked, network drives should not be remembered when you shut down.

.... Thinkpads_User
0
 
LVL 4

Author Comment

by:asp_net2
ID: 39799824
Hi thinkpads_user,

 >> If disconnections are random (disconnect the cable, shut down later), then I always use a disconnect script.

Not sure what you mean by the above statement.

>> Make a .bat file, copy it to the desktop and call it "Disconnect Server"

So if I were to keep experiencing disconnects then I should create a .bat file with the following code snippet above? Also, do I need to include that .bat file within startup and if so which is the best way to do that?

I must have shutdown and restarted the laptop at least 7 times and it never dropped the network shares so hopefully it's fine now thanks to you.
0
 
LVL 90

Expert Comment

by:John Hurst
ID: 39799842
If you have a laptop on Ethernet with open files / shares and then unplug Ethernet to move the machine to another desk / room, you will have to reconnect. At that point, it is possible to get a new drive letter (not always, just possible) and then you have the problems you had.

Now removing persistent drives and clearing up the problem is likely to be fine for a long while. It could happen again. Persistent drives are common, they work, but they screw up too.

... Thinkpads_User
0
 
LVL 4

Author Comment

by:asp_net2
ID: 39799847
Ok, so is there a solution that I could implement if need be that would always map the network drives all the time using the same map network drive letter?
0
 
LVL 90

Expert Comment

by:John Hurst
ID: 39799860
I service different clients, so I have Connect scripts (as above) and Disconnect scripts (as above). I connect Z:  (say) and then disconnect Z: when complete. I never have random disconnections and I have been using the same scripts for years (different machines and operating systems).

... Thinkpads_User
0
 
LVL 4

Author Comment

by:asp_net2
ID: 39799883
Ok, could I have just one .bat script run with the disconnect and reconnects if I were to experience more issues with this in the future or would I need to different .bat scripts one for disconnect and one for reconnect?

The drive letters that I would always need are G: and Z: Would you be able to supply me with what I would need for the disconnect and reconnect for one .bat file or the two separate .bat files if I would need them? I'm not good at all witih .bat files so just want to make sure I would be doing it write.
0
 
LVL 90

Expert Comment

by:John Hurst
ID: 39799905
As per above posts, for a connect script, use:

Net use x: \\server name\sharename
Net use w: \\server name\sharename

Select the Drive letters and shares you need. Enter the scripts in connect.bat and copy it to the desktop.

As per above posts, for a disconnect script, use:

Net use x: /Delete
Net use w: /Delete

Select the SAME drive letters as above. Enter the scripts in disconnect.bat and copy it to the desktop.

Restart and test the scripts.

As I noted above, persistent drives are common and generally work. You do NOT have to use scripts at all.

If your server scripts the connect, then just set the map to be non-persistent in Windows Explorer Map Network Drive.

There is more than one way to do all this.

.... Thinkpads_User
0
 
LVL 4

Author Comment

by:asp_net2
ID: 39799932
Ok, last question. I was not sure what you meant by the following below. How would I do that and when would I do that if need be?

>> If your server scripts the connect, then just set the map to be non-persistent in Windows Explorer Map Network Drive.
0
 
LVL 90

Expert Comment

by:John Hurst
ID: 39799957
In your operating system, find Windows Explorer, open it and then find Map Network Drive.  For each Drive mapping, set as below. Once set, the drives should be non-persistent and it only needs to be set once.

Windows-8-Map-Network-Drive-Settings
... Thinkpads_User
0
 
LVL 4

Author Closing Comment

by:asp_net2
ID: 39799964
Thank you for all your help with this post!!
0
 
LVL 90

Expert Comment

by:John Hurst
ID: 39799982
@asp_net2 - You are most welcome and I was happy to help.

.... Thinkpads_User
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

We recently endured a series of broadcast storms that caused our ISP to shut us down for brief periods of time. After going through a multitude of tests, we determined that the issue was related to Intel NIC drivers on some new HP desktop computers …
Use of TCL script on Cisco devices:  - create file and merge it with running configuration to apply configuration changes
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

744 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now