I have a QNAP server on my home network which I've mapped a few folders in Windows-7x64 using NFS. This works perfectly except for when I switch the server off (or disconnect it from the network). When the server is not available, Windows boots fine up until just after you've typed in the password and pressed enter, at which points it sits on KSOD doing apparently nothing.

Based on this question I loaded up in safe mode, 'disconnected' the mapped drives and now I'm back in normal mode, exactly as before.

What I want to know is how I can keep drives mapped when the server isn't available and still have Windows boot up? Or failing that, where's the best place to dig to find out?


It will probably finish booting to the desktop, it will just take a while, as you are waiting for each mapped drive's time-out period to lapse before Explorer will finish loading.

This Ask Leo blog entry has lots of good info on it: Why does Windows Explorer take so long to display sometimes?

You may want to write a batch file that will map the drives you want, but ensure they are not set to map 'persistently', so they get killed on log off. Then at next boot Explorer should load quickly (no maps), and if you want the drives you can just run the batch file to map them (setup a desktop shortcut to the batch).

Perhaps use Windows' Task Scheduler to have the mapping batch run every time, but delayed until 30 seconds to a minute after log on, that way it won't slow down Explorer's loading time.

You could also probably set up a task to run a batch containing net * /del or a like to ensure all mappings get killed at log off, including ones created as persistent.

Edit/More info after comment question:

"Is that timeout duration value easily editable or buried?" 

There doesn't seem to be a place you can actually define it. Check out http://support.microsoft.com/kb/977346 for a possible workaround (I don't think it'll help your case, but hey can't hurt to try).

More info on batching it:

If you end up creating a batch file to map the drives, and don't want to delay it via the Task Scheduler, you can use Ping to test the connection before attempting to map it. Ping can be set to use a specific timeout, so you can set it low, and if it fails to ping, don't map.

Something as such in a batch file:

ping -n 1 -w 500 | find "Reply"
if errorlevel 1 echo Machine Not Found && goto :eof
net use Q: \\\Share

This will ping once (-n), with a time-out (-w) set to 500 milliseconds. It will then try to find "Reply" in the results. If it doesn't find that (no reply because machine doesn't exist) then it echoes that it wasn't found and jumps to the end of the file. Otherwise, if it finds "Reply" it will attempt to map Q: to the share "Share" on

  • Is that timeout duration value easily editable or buried? Sep 8 '11 at 18:50
  • I'll update my answer with some more info on this... :) Sep 8 '11 at 20:55
  • just implemented a similar set of scripts to this. pinging the server, if it responds (and correctly gives a file from a network share on there), then it sets up the mappings, if it doesn't respond (or responds wrong), delete the mappings
    – topherg
    Dec 10 '14 at 15:30

For me, this worked:

;### kill the long "restoring network connections" at logon (defer=ghosted connections)
"RestoreConnection"=dword:00000001 ;(0=no attempt, you must click it)
;### Ghost the connection if not responding within RestoreTimeout

;### network drive map timeout in Explorer if connection is lost (def is 60 sec)

Except I set RestoreConnection to 0, since I do not need the drives ready all the time. Then the black screen timeout is gone.

Source: http://www.sevenforums.com/network-sharing/274680-timeout-mapping-network-drives-windows-login.html

  • 1
    Great!!! i did use "DeferConnection"=dword:00000000 Nov 28 '16 at 13:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.