none
Persistent Drive Mappings Not working

    Question

  • I need some help with what I think should be a simple solution but it has been plaguing me for some time.  I have an environment that is a mix of Windows 7 and Windows XP clients.  All I need to accomplish is to have a login script that maps a set of drives as persistent.  The scenario is when a laptop user leaves the office, then goes to a remote location and powers on his laptop to connect via VPN.  The drives that are mapped are not available so once the user makes the VPN connection the drives are not available until they are manually mapped.  If the user simply sleeps the laptop and then logs back on, they are available but the customer is concerned about the drives not being there after a reboot.  So here are the steps:

    1) User logs on at his desk and gets all drive mappings.
    2) User shuts down at the end of the day and takes his laptop
    3) User powers on his laptop at home.  No drives are listed in Explorer.
    4) User connects to VPN, still no drives.
    5) User unable to access drives until manually mapping them.

    I have tried multiple methods of doing the login script including Kix, VB, net use, and GPP (which doesn't work right with XP when using conditions) but none of them work.  If I map the drive manually from the Map A Network Drive option in Explorer it does work.  It is only the drives that are mapped as part of the domain login script.  The key is to get them to remain an option, even a disconnected option (because they will reconnect after VPN is established and the user attempts to access) when the laptop is booted offline.

    Any thoughts?

    Tuesday, March 26, 2013 7:46 PM

Answers

All replies

  • Hello,

    (which doesn't work right with XP when using conditions)

    You can use GPP on Windows XP.
    You need to have KB943729 installed.

    I would recommend GPP with this options:


    MVP Group Policy - Mythen, Insiderinfos und Troubleshooting zum Thema GPOs: Let's go, use GPO!

    Tuesday, March 26, 2013 8:00 PM
  • I would love to use GPP.  Sorry I should have clarified that I have that hotfix installed but I cannot use Item-Level Targeting with drive mappings and XP.  It simply doesn't work right (maps extra drives, doesn't listen to the targets, etc).  I had MS look at it and they couldn't explain it other than "GPP were created after XP".  Trust me...I wanted to use GPP right from the start because it works perfectly for the 
    Tuesday, March 26, 2013 8:03 PM
  • I had MS look at it and they couldn't explain it other than "GPP were created after XP"
    Which item level targeting did you use for XP?

    MVP Group Policy - Mythen, Insiderinfos und Troubleshooting zum Thema GPOs: Let's go, use GPO!

    Tuesday, March 26, 2013 8:18 PM
  • Security group membership and OS version, both combined in the same policy and separate.  The one thing that happened every time was a random drive was mapped to the DFS root.  The mapped drives are all DFS shares and for unknown reasons the GPP would always map a drive to the root even though it was not assigned to do so.  And that only happened on the XP clients, but it did happen to every XP client we tested with.
    Tuesday, March 26, 2013 8:20 PM
  • OK, never have heard of this before.
    I would be curious to see a tracing file of this...

    Of course you could use GPP for Windows Vista, 7, 8 by seperating this policy with a WMI-Filter.
    And for XP you can use a skript.


    MVP Group Policy - Mythen, Insiderinfos und Troubleshooting zum Thema GPOs: Let's go, use GPO!

    Tuesday, March 26, 2013 8:30 PM
  • That would assume I had a working script though :-).  

    Interesting enough it never created any tracing files in the one test machine I was using.  I would have to spin up a new WinXP machine to go back down the tracing route.  Either way, right now it is the script I am concerned about.  Although I do like your idea of the WMI Filter to at least get the Win7 machines working.

    Tuesday, March 26, 2013 8:37 PM
  • OK, for the script, it quite easy:

    The logon script will be:
    NET USE G: /DELETE /YES
    NET USE G: \\server\share/persistent:yes /YES

    If you need to check any group memberships, it will be more complicated.

    http://www.computerperformance.co.uk/Logon/logon_group_membership.htm
    http://community.spiceworks.com/scripts/show/379-map-network-drive-if-user-memberof-group-vbscript

    Anyway, I would give GPP another chance.


    MVP Group Policy - Mythen, Insiderinfos und Troubleshooting zum Thema GPOs: Let's go, use GPO!

    Tuesday, March 26, 2013 8:54 PM
  • I used that script but the drives do not remain in Explorer in Win7 when the client is rebooted when not on the network.  If I run net use they do show as Unavailable but I cannot get back into them without re-mapping the drive.  But they are not in explorer as disconnected drives.  I have not yet tested that in Windows XP though.
    Tuesday, March 26, 2013 8:56 PM
  • If I run net use they do show as Unavailable but I cannot get back into them without re-mapping the drive.  But they are not in explorer as disconnected drives.

    Strange.
    Maybe you can make an export of:

    reg query HKCU\Network /v



    MVP Group Policy - Mythen, Insiderinfos und Troubleshooting zum Thema GPOs: Let's go, use GPO!

    Tuesday, March 26, 2013 8:59 PM
  • Did you mean /z for verbose?

    Regardless, that key shows all 3 mapped drives both when on the network and when off the network, post-reboot.  It's odd. 

    Tuesday, March 26, 2013 9:29 PM
  • Did you mean /z for verbose?

    My mistake, I meant /s not /v.


    MVP Group Policy - Mythen, Insiderinfos und Troubleshooting zum Thema GPOs: Let's go, use GPO!

    Tuesday, March 26, 2013 9:40 PM
  • The output for the drives is the same with or without the network connection.  There is a difference between the manually mapped drives and the login script ones.  The manually mapped ones Username key is a REG_DWORD with a value of 0x0 and the login script ones have the UserName key as a REG_SZ and null for the value.  Additionally, the manually mapped on has a value of 1 under ConnectionType and the login script is set to 0.  Sorry for the lack of cut and paste, but it's in a VM.

    Tuesday, March 26, 2013 10:06 PM
  • Hello,

    OK, the ConnectionType should not make any difference.

    http://technet.microsoft.com/en-us/library/cc957211.aspx

    At the moment I can't test it.

    Meanwhile you can do something else.
    Please redirect your logon script to a file.
    Maybe we will be able to see any error message.

    mylogonscript.bat >%temp%\mylogonscript.log 2>&1


    MVP Group Policy - Mythen, Insiderinfos und Troubleshooting zum Thema GPOs: Let's go, use GPO

    Wednesday, March 27, 2013 5:30 PM
  • No errors either.

    Either way, I used the WMI Filters to create two GPOs.  VB does the trick for Windows XP and GPP works for Win7.  I'm able to get what I ned using it that way.  Thank you for your help!

    Thursday, March 28, 2013 9:06 PM