+ Post New Thread
Results 1 to 11 of 11
Windows Thread, Drive mapping issues in logon scripts in Technical; Hi - we have been experiencing issues with a staff network drive not always mapping properly in the logon script. ...
  1. #1

    Join Date
    Oct 2008
    Location
    Leeds
    Posts
    215
    Thank Post
    21
    Thanked 17 Times in 17 Posts
    Rep Power
    14

    Drive mapping issues in logon scripts

    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.

  2. #2

    nephilim's Avatar
    Join Date
    Nov 2008
    Location
    Dunstable
    Posts
    11,094
    Thank Post
    1,428
    Thanked 1,692 Times in 1,265 Posts
    Blog Entries
    2
    Rep Power
    363
    Can you post up the script as there may well be an error in the coding...

  3. #3

    Michael's Avatar
    Join Date
    Dec 2005
    Location
    Birmingham
    Posts
    8,941
    Thank Post
    232
    Thanked 1,510 Times in 1,206 Posts
    Rep Power
    328
    Why not run scripts from the NETLOGON share?

  4. #4
    cookie_monster's Avatar
    Join Date
    May 2007
    Location
    Derbyshire
    Posts
    4,185
    Thank Post
    392
    Thanked 278 Times in 239 Posts
    Rep Power
    74
    As said already can you post the script?

    Do you have 'Run logon scripts synchronously' set?

    Run logon scripts synchronously

  5. #5

    Join Date
    Oct 2008
    Location
    Leeds
    Posts
    215
    Thank Post
    21
    Thanked 17 Times in 17 Posts
    Rep Power
    14
    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

  6. #6

    Michael's Avatar
    Join Date
    Dec 2005
    Location
    Birmingham
    Posts
    8,941
    Thank Post
    232
    Thanked 1,510 Times in 1,206 Posts
    Rep Power
    328
    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.

  7. #7

    Join Date
    Oct 2008
    Location
    Leeds
    Posts
    215
    Thank Post
    21
    Thanked 17 Times in 17 Posts
    Rep Power
    14
    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$"

  8. #8
    tarquel's Avatar
    Join Date
    Jun 2005
    Location
    Powys, Mid-Wales, UK
    Posts
    1,740
    Thank Post
    13
    Thanked 44 Times in 34 Posts
    Rep Power
    28
    Just check the script that is running I'd say. i.e. it network drive mapping part should contain something like the following:

    Code:
    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.
    Last edited by tarquel; 19th September 2009 at 09:32 PM. Reason: didnt see Bruce's last post.

  9. #9

    Join Date
    Oct 2008
    Location
    Leeds
    Posts
    215
    Thank Post
    21
    Thanked 17 Times in 17 Posts
    Rep Power
    14
    Yeah, it does seem odd, but I have seen a few posts with this issue, but no solutions.

  10. #10
    browolf's Avatar
    Join Date
    Jun 2005
    Location
    Mars
    Posts
    1,497
    Thank Post
    101
    Thanked 84 Times in 71 Posts
    Blog Entries
    46
    Rep Power
    37
    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.

  11. #11
    cookie_monster's Avatar
    Join Date
    May 2007
    Location
    Derbyshire
    Posts
    4,185
    Thank Post
    392
    Thanked 278 Times in 239 Posts
    Rep Power
    74
    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.

    Code:
    '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

    Code:
    'Disconnect any drive mappings as needed.
    WSHNetwork.RemoveNetworkDrive "R:", True, True
    Last edited by cookie_monster; 20th September 2009 at 01:24 PM.

SHARE:
+ Post New Thread

Similar Threads

  1. Replies: 23
    Last Post: 13th November 2013, 01:29 PM
  2. Logon scripts
    By cookie_monster in forum Windows 7
    Replies: 6
    Last Post: 6th May 2009, 09:07 PM
  3. HELP! - Logon Scripts
    By Hedghog in forum Windows
    Replies: 2
    Last Post: 26th September 2008, 10:50 AM
  4. Logon Scripts
    By techyphil in forum Windows
    Replies: 8
    Last Post: 4th September 2008, 06:26 AM
  5. Mapping network drive without using Scripts
    By tazz in forum How do you do....it?
    Replies: 13
    Last Post: 5th October 2007, 03:18 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •