Delay mounting network drive at boot?

Anonymous
2010-04-17T12:13:51+00:00

I have a network drive that I have mapped as a drive on my toshiba nb205 notebook.  It works fine with one exception, boot-up time. 

When the notebook is booted it can never connect to the mapped drive, if I manually open the drive it will then connect and be fine.

My theory is that windows is trying to connect to the drive before the network connection is established. 

Is there a way to delay mounting the network attached drive until the network establishment is complete?

Windows for home | Previous Windows versions | Internet and connectivity

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments
Answer accepted by question author
Anonymous
2010-04-17T13:17:11+00:00

Try this:

  1. Click Start, then type the three letters cmd into the Search box and press Enter.
  2. Type these commands and press Enter after each:

    net use /persistent:no

    net use * /del /yes

    notepad "%UserProfile%\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup\netlogon.bat

  1. Type the following lines:

    @echo off

    set delay=60

    ping localhost -n %delay%

    net use E: "\SomePC\SomeShare"

  1. Save and close the file

From now on your network connection(s) will be made 60 seconds (or whatever delay you set) after you log on. You must, of course, replace "SomePC" and "SomeShare" with actual names. You also need to be careful with your typing. The commands I used will not tolerate many variations.

Was this answer helpful?

70+ people found this answer helpful.
0 comments No comments

45 additional answers

Sort by: Most helpful
  1. Anonymous
    2017-09-12T06:41:00+00:00

    is the delay in seconds or milliseconds??

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2017-03-21T07:56:05+00:00

    You can use my vbs script:


    Option Explicit

    Dim strDriveLetter, strRemotePath

    function mapdrive (strDriveLetter,strRemotePath)

    Dim objNetwork, objFSO

    Set objFSO = CreateObject("Scripting.FileSystemObject")

    Set objNetwork = CreateObject("WScript.Network")

    If objFSO.DriveExists(strDriveLetter) = True Then

       objNetwork.RemoveNetworkDrive strDriveLetter

    End If

    objNetwork.MapNetworkDrive strDriveLetter, strRemotePath, True

    end function

    ' wait 30 seconds

    wscript.sleep 30000

    mapdrive "G:","\Serve\FolderA"

    mapdrive "K:","\Server\FolderB"

    mapdrive "L:","\Server\FolderC"

    WScript.Quit


    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2016-10-23T11:04:45+00:00

    I don't really want a huge bat file - I just want to connect to the network a little earlier in the boot sequence.

    This thread is now more than six years old and had dealt with numerous questions (which causes a degree of confusion when going through the lot). If you still have a question then I recommend you start a new thread and formulate it clearly while avoiding statements such as "I guess this solution works". "This" can bean just about anything!

    Was this answer helpful?

    0 comments No comments
  4. Anonymous
    2016-10-23T10:57:35+00:00

    I've just received 8 emails from Microsoft so I guess this solution works.  however I have  35TB in NAS boxes and I just need to get them up and running without having click on them first.  I don't really want a huge bat file - I just want to connect to the network a little earlier in the boot sequence.  However I've just installed the latest build  of Windows 10 and so far they are all available (letters M through Z) so here's hoping that Microsoft has finally sorted the defect that has been around since XP!!

    Was this answer helpful?

    0 comments No comments