Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|improve this question

1 Answer 1

up vote 2 down vote accepted

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 10.3.3.3 -n 1 -w 500 | find "Reply"
if errorlevel 1 echo Machine Not Found && goto :eof
net use Q: \\10.3.3.3\Share

This will ping 10.3.3.3 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 10.3.3.3.

share|improve this answer
    
Is that timeout duration value easily editable or buried? –  Styne666 Sep 8 '11 at 18:50
    
I'll update my answer with some more info on this... :) –  Ƭᴇcʜιᴇ007 Sep 8 '11 at 20:55

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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