Windows 7 and Vista laptops in my company domain has network drives set up by Win2k8 Server GPO. Normally, when the laptops has ethernet cable plugged in before boot, the network drives connect and appear as expected at the end of startup sequence.

However, when the laptop has ethernet cable unplugged, the network drives are not connected, which is fine, but the disconnected icons disappear as well. i.e. the drives are not set up.

At the end of the startup sequence, upon reaching desktop, the wireless adapters will connect to the network and the laptop will be able to find the network drive. Hence I want the drives to be setup nonetheless, so that the next attempt to connect, say, via a desktop shortcut, will reestablish the network drive connection. How can this be done?

I want to see disconnected drives such as these

  • 1
    Using a script to map drives is not "hacky", especially when resource availability is delayed during login by user-space things like Wireless connection agents. Besides, I doubt your users would care how you do it. ;) – Ƭᴇcʜιᴇ007 Jun 4 '12 at 4:03
  • For the folks I have here, anything beyond their comprehension is a hack. To them, it must work if I say it should. period. Anything else is my fault. So if they see the drives there showing the disconnected icon, they will believe is a Windows feature. If I tell them "please double click the network.bat if you don't see your drives" they will think is my fault that I am not setting up properly for them, causing them to have one more step to work after logging in. – Jake Jun 4 '12 at 7:29
  • I was talking about logon/logoff scripting, not a batch file they click. ;) Really though you're mapping should work at login, if not, you might have bigger problems. ;) – Ƭᴇcʜιᴇ007 Jun 4 '12 at 11:50
  • I'll try, but if the GPO for drives doesn't work, I doubt the logon scripts will work. Also the other issue is that some machines are laptops. I don't want the network drives to disappear. Ideally, they should stay in My Computer and when the user connects to VPN, the drive is accessible again. – Jake Jun 4 '12 at 12:53
  • @techie007 In reference to your question, I am using GPO Management Editor > User Configuration > Preferences > Drive Maps – Jake Oct 6 '12 at 18:32

Did you try a simple batch script, like:

subst K: c:\path

adjust the drive letters and the path, save it as file with bat-extension and put this in your startup folder (usually \Users\All Users\Microsoft\Windows\Start Menu\Programs\Startup)


You may want to consider linking the login and desktop security contexts using this registry hack:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System EnableLinkedConnections = 1

You can also try to delay the execution of group policy (and your logon scripts) by adding a new DWORD called GpNetworkStartTimeoutPolicyValue with Decimal Value 300 (for five minutes) at this registry location:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon

  • Is this done at the server or the client machine? I have many clients... – Jake Oct 6 '12 at 18:32

I already posted the solution here and solved this issue with net use command and one small script. You can add unlimited shares in same way:

net use S: \\server1\share /Y
timeout /t 5 /nobreak > NUL

net use S: \\server2\share /Y
timeout /t 5 /nobreak > NUL

Insert the above code in .bat file and put in startup folder. To open this folder, press Win+R and type shell:startup command.

In the future, this script will run automatically on startup and try to "mount" these shares in every 5 seconds. It will exit, if shares are available.

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.