Bruce123 Posted September 19, 2009 Posted September 19, 2009 Hi - we have been experiencing issues with a staff network drive not always mapping properly in the logon script. Specifically, the drive doesn't appear in My Computer / Windows Explorer, but if you go to Tools -> Unmap it is there. If you unmap it and map it it works properly and appears in My Computer. I understand that this is due to the logon script running before the explorer.exe shell process has had a chance to start (user's network drives are a feature of explorer.exe). Does anyone else have this issue? How is it resolved? The drive mapping is actually to a DFS link, but I don't think that it is relasted to this. Thanks, Bruce.
featured_spectre Posted September 19, 2009 Posted September 19, 2009 Can you post up the script as there may well be an error in the coding...
Michael Posted September 19, 2009 Posted September 19, 2009 Why not run scripts from the NETLOGON share?
cookie_monster Posted September 19, 2009 Posted September 19, 2009 As said already can you post the script? Do you have 'Run logon scripts synchronously' set? Run logon scripts synchronously
Bruce123 Posted September 19, 2009 Author Posted September 19, 2009 Sorry;I don't know the script to hand, but I don't think there is anything wrong with it. The script is in a group policy object linked to the domain I'm not sure if I have the setting "run logon scripts syncronously" set; although, the setting seems related to the issue, the two options: enabled/disabled, don't seem to allow me to ensure that explorer.exe has started before the script script runs, only after the script runs. If you enable this policy, Windows Explorer does not start until the logon scripts have finished running. This setting assures that logon script processing is complete before the user starts working, but it can delay the appearance of the desktop. If you disable this policy or do not configure it, the logon scripts and Windows Explorer are not synchronized and can run simultaneously. I've also noticed that the drive is rarely mapped users logon for the first time, which I think relates to there being no roaming profile to download; thus causing timing issues. Thanks, Bruce
Michael Posted September 19, 2009 Posted September 19, 2009 I'm not sure if I have the setting "run logon scripts syncronously" set You should disable this policy, otherwise Windows processes one after the other and not together, hence slowing logon considerably.
Bruce123 Posted September 19, 2009 Author Posted September 19, 2009 To be honest, I think I did disable it for this very reason. But I think that there are occasions when the logon script runs before explorer.exe starts, which I think is the drive mapping issue. I think I need something like (in pseudo code): repeat wait 1 second until explorer.exe = running net use J: \\domain\dfsshare$"
tarquel Posted September 19, 2009 Posted September 19, 2009 (edited) Just check the script that is running I'd say. i.e. it network drive mapping part should contain something like the following: net use x: \\server\share You might need a net use x: /DELETE in a line before it if that drive letter has already been mapped i.e. as a safety precaution so that it completes correctly. You shouldnt need to do any waiting within the script when it comes to a logon script like this.... i havent in 12 years lol Have a feeling that there might be another setting in the GP that you need to check, but cant remember what it is offhand. Regards Nath. Edited September 19, 2009 by tarquel didnt see Bruce's last post.
Bruce123 Posted September 19, 2009 Author Posted September 19, 2009 Yeah, it does seem odd, but I have seen a few posts with this issue, but no solutions.
browolf Posted September 19, 2009 Posted September 19, 2009 have that problem occasionally, we just have a batch file that gets put on the desktop in the login script. anyone complains about missing drives, we tell em to run the batch file. if that doesn't work, it's indicative of a more serious problem.
cookie_monster Posted September 20, 2009 Posted September 20, 2009 (edited) I'm sure some people set "run logon scripts syncronously" to make logon scripts run more reliably, I know our citrix supplier sets this on their sites and I've found that our logon scripts work 100% of the time with this set, without this set it seems they don't always work. I think in the past this has been due to very slow client PC's though but it's worth a try. It's more likely to be that the drive is being remembered, do you use roaming profiles? If you use a vb logon script you could add this section to clear all mapped drives before you map any new drives. 'Disconnect ALL mapped drives Set clDrives = WshNetwork.EnumNetworkDrives For i = 0 to clDrives.Count -1 Step 2 WSHNetwork.RemoveNetworkDrive clDrives.Item(i), True, True Next or this line to get rid of one line only 'Disconnect any drive mappings as needed. WSHNetwork.RemoveNetworkDrive "R:", True, True Edited September 20, 2009 by cookie_monster
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now