Delay mounting a network drive at boot?
My problem is the same as listed on this thread - I have a media and file server (running on unRaid) which is where all my files are stored and it is networked and mapped to all the other Windows PC's and the SAMBA shares do show fine and I can access them without any problems. The problem is at reboot/restart of the client machines (all Win 7 HP x64), when none of the client can connect to the mapped drives on logon, the shares show up fine but with a red X on them, and if I click on them manually I can access all the stored content without any issues. The problem is with reconnecting automatically at logon, and i get an error balloon saying Win7 could not reconnect all the mapped drives. This is a problem mainly for my HTPC, since the WMC media libraries are set to access content from the server,and the HTPC set to boot into MCE directly. So when it opens up after a reboot the media libraries all show up as empty and stays that way till I manually click on the mapped shares. I used the fix suggested by Oberwald and my batch file script is as follows: @echo off set delay=60 ping localhost -n %delay% net use J: \\Tower\Movies net use I: \\Tower\Backups net use K: \\Tower\TV Shows net use L: \\Tower\Other Media net use T: \\DESKTOP\Seagate GoFlex Desk 3TB This works except for one thing, only 2 of the above shares do show up after the script finishes running (Movies & Backups), the other ones does not, why is that? Anything wrong with my script, something I need to do different? Please advice. P.S: also the command prompt screen does show for the 60 seconds that the script is running (I persume) - is that supposed to?
June 3rd, 2012 3:19pm

Bump :Abhi Oommen
Free Windows Admin Tool Kit Click here and download it now
June 4th, 2012 6:29pm

Probably the issue is with the spaces on the last three shares. Try using quotation marks for those three like below @echo off set delay=60 ping localhost -n %delay% net use J: \\Tower\Movies net use I: \\Tower\Backups net use K: "\\Tower\TV Shows" net use L: "\\Tower\Other Media" net use T: "\\DESKTOP\Seagate GoFlex Desk 3TB"
June 4th, 2012 7:23pm

Thanks Turgay - that was it. Solved the issue, now everything works as it should. Sometimes the simplest issues which seems so obvious are the ones we completely miss. Appreciate your response. TY again. Abhi Oommen
Free Windows Admin Tool Kit Click here and download it now
June 4th, 2012 8:26pm

One more question regarding this script, all the drives are showing up and are connected automatically after the delay. So all well there. The only issue I have is that the command line prompt window ('cmd' window) is still showing for the duration of the delay (120 sec) while the script is running. Shouldn't "echo off" hide that, or is there another way to hide it - screenshot attached. Asking since this is an HTPC set to boot into WMC and I don't want the window to show for 2 mins whenever someone switches the system on. All help appreciated. Thank You again. Abhi Oommen
June 9th, 2012 2:40pm

You can use a Hidden start tool at http://www.ntwind.com/blog/hstart-v1.1.html since the ping utility is not an actual Windows executable, you need to use "cmd /c" or some sort of wait.exe from http://osdir.com/ml/lang.batchworld/2007-06/msg00003.html @echo off set delay=60 hstart.exe /NOWINDOW "cmd /c ping localhost -n "%delay%"" net use J: \\Tower\Movies net use I: \\Tower\Backups net use K: "\\Tower\TV Shows" net use L: "\\Tower\Other Media" net use T: "\\DESKTOP\Seagate GoFlex Desk 3TB"
Free Windows Admin Tool Kit Click here and download it now
June 11th, 2012 6:04am

Thanks a ton again Turgay. Just using hidden start did the trick. I just used Hstart and pointed it to the batch file above to run without a console window and put that code in the startup programs (did not have to alter the script) and now everything happens in the background when I switch on the system. Thanks again. This thread can be closed now, if I need to close it please do let me know how. Abhi Oommen
June 14th, 2012 9:26am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics