5

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

5
  • 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. ;) Jun 4, 2012 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, 2012 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. ;) Jun 4, 2012 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, 2012 at 12:53
  • @techie007 In reference to your question, I am using GPO Management Editor > User Configuration > Preferences > Drive Maps
    – Jake
    Oct 6, 2012 at 18:32

4 Answers 4

2
+25

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)

1

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

1
  • Is this done at the server or the client machine? I have many clients...
    – Jake
    Oct 6, 2012 at 18:32
0

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:

:CHECKFOLDER1
net use S: \\server1\share /Y
timeout /t 5 /nobreak > NUL
IF NOT EXIST S: GOTO CHECKFOLDER1

:CHECKFOLDER2
net use S: \\server2\share /Y
timeout /t 5 /nobreak > NUL
IF NOT EXIST T: GOTO CHECKFOLDER2

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.

-1

Tick the Reconnect option in your existing Group Policy Preference.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .