none
BUG ? Windows 7 Folder Redirection rename the Home folder in "My Documents"

    Question

  • Hello,
    I experience an annoying behavior with the folder redirection with Windows 2008 R2 and Windows 7

    i think this is a sort of bug.

    Server : Windows 2008 R2 STD (US)
    Station : Windows Seven (Fr)

    We defined a hidden share as the home folder in Active Directory.

    Ex :
    \\Server\Users$\User1 (home folder for user 1)
    \\Server\Users$\User2 (home folder for user 2)
    Etc.

    In my GPO:
    When i configure the Folder redirection Setting with this parameter :
    Basic - redirect everyone's folder to the same location
    Redirect to the users home directory

    Move the content of Documents to the new location
    Also apply rediretion policy to windows 2000 etc...

    When i log to the client, the redirection works well.

    When i log to the server and browse my "users" directory, the user directory appear like he was renamed in "My Documents"

    Ex :
    D:\users\My Documents
    D:\users\My Documents
    D:\users\My Documents
    ...

    The folder are not really renamed, it was just the display that was incorrect.

    If i use a command line to browse the directory, the folder appear with the good name.
    D:\users\user1
    D:\users\user2
    D:\users\user3
    ...

    Someone can help to resolve this behavior ?
    Friday, March 05, 2010 4:33 PM

Answers

All replies

  • I've recently been frustrated by this issue too.


    Ended up settling with method 3 for the time being.
    • Marked as answer by Bruce-Liu Friday, March 12, 2010 9:14 AM
    Saturday, March 06, 2010 6:16 PM
  • Thks,
    I haven't found this kb.

    A little bit frustrating anyway ;)

    Monday, March 08, 2010 9:03 AM
  • Hi. I am experiencing this also. I work for a High School and Teachers want to access student work but all redirected folders are locked exclusively. If I turn the exclusive option off then teachers can't access the student work either because now all 1500 student folders are called "My Documents". It seems the only option is to turn folder redirection off. Ironically, staff can't access student work when folder redirection is off as students end up saving their work locally to the machines instead of the shared network drive.

    I can see that this problem existed in Vista so it is pretty evident that their won't be a fix for 7 either.

     

    Ok I have ranted and I feel better now :-)

     

    Wednesday, May 05, 2010 9:14 PM
  • Hi Mark

    Can I have more info on the desktop.ini files and adding deny permissions onto it?  Which desktop.ini files did you apply this to?  The ones within the redirected folders, roaming profiles, everywhere?  And also, does this make deleting folders off the fileserver a pain when a user leaves?

    Also, did you script the changes to the files? If so, is it possible to get an script template for this?

    Thanks

    Thursday, May 13, 2010 11:30 AM
  • Hi,

    Sorry, I was being daft about which desktop.ini file to remove permissions to. I found that.  It does work and its enough to go live with our proposed folder redirection on our new terminal servers.  However a sample vbscript would still be appreciated as there's 200 folders in which I will need to change this.

    Thanks

    Thursday, May 13, 2010 1:46 PM
  • Another easy workaround is to add the "filename" column to the detail view. This will show the folder name.

    View > Choose Details...

    or

    Right-Click the column heading and select "More...".

     

    • Proposed as answer by laserbrian Thursday, May 27, 2010 7:09 PM
    Thursday, May 27, 2010 7:08 PM
  • this behavior is idiotic. when XP users browse my "Users" folder, they see the actual names of the folders (first.last). but when win7 users browse the Users folder, they see a bunch of "My Documents." is this considered progress? what is the logic behind this?

     

    i am confused, in workaround method #3, as to which "desktop.ini" files to deny permissions to, and which "administrator" to deny it, in me

    Wednesday, June 30, 2010 5:07 PM
  • this behaviour is by design?

    !!!

    this is typical of microsofts recent asinine design decision making, and further evidence that the latest generation of windows server and desktop products are not sufficiently well architected or tested for the enterprise. 

    Monday, July 05, 2010 8:40 AM
  • I dont know if that denying read to desktop.ini will work as it may interfere/ generate errors in the backup. Unless i just dont back up desktop.ini...

     

     

    Solution is crappy. Maybe a GPO to turn off this writing of the desktop.ini file or the writing of this extra windows 7 data. We are not going to move to windows 7 rigjht now, but its a pain to administer when there are a few win7 clients on the network and you want to audit for file infractions and such. All the infractions are labeled my documents.. argG!

    Tuesday, August 10, 2010 3:57 PM
  • I've found out if you run Attrib -r on the folders, the folders display the right way.

    I just havent found a smart way to do it on all the folders, and haven't found out if the problem comes back again

    • Proposed as answer by WillieMac99 Monday, July 25, 2011 3:49 PM
    Monday, September 20, 2010 3:31 PM
  • I've written a PowerShell script which denies read access to the desktop.ini file to a specified group. Anyone in this group will then not have the documents renamed .

    http://blog.salamandersoft.co.uk/index.php/2010/09/how-to-stop-home-folders-being-renamed-documents-in-the-network-share/

     

    Richard
    Friday, September 24, 2010 3:08 PM
  •  

     

     

     

     

     

     

     Windows 7 Tutorials

    Friday, February 11, 2011 1:45 AM
  • Had the exact same problem. Used "Attribute changer" - http://download.cnet.com/Attribute-Changer/3000-2248_4-13676.html and removed the read only attribute on the affected folders.
    • Proposed as answer by Shaun_Ec Monday, January 13, 2014 10:38 PM
    Tuesday, August 02, 2011 9:47 AM
  • This is how you run it on all the folders from the command prompt:

    attrib -r E:\Userdata\*.* /s /d

    Just change "E:\Userdata" to the root folder where all your user folders are.

    Thursday, August 04, 2011 1:25 PM
  • attrib -r E:\Userdata\*.* /s /d

    I believe this is a BAD idea as it will deny read rights to ALL files and folders.

     

    I have re examined this problem because it was severely pissing off my users.

    from this link: http://www.craig-tolley.co.uk/2010/12/20/redirected-my-documents-folders-showing-as-documents-rather-than-the-users-name/

    I have added a VBS script to the user logoff section of my group policy. This will delete the file on logout. I have been unable to determine how to stop generation of this desktop.ini file, does not seem possible. Copy of the VBS script from the link above is reproduced below, incase the link goes dead. I did not write it.

    On Error Resume Next
    Set WSHShell = WScript.CreateObject("WScript.Shell")
    Set FSO = CreateObject("Scripting.FileSystemObject")
    
    DocsPath = WSHShell.SpecialFolders("MyDocuments")
    
    If FSO.FileExists (DocsPath & "\desktop.ini") Then
      FSO.DeleteFile (DocsPath & "\desktop.ini")
    End If
    


    what this will do, when applied at logoff, is delete the desktop.ini file from the users "my documents". Sort of like a clean up.

    Doesn't solve the problem by any means, but should make after hours work easier at least.

    • Proposed as answer by Eddie EC Monday, January 30, 2012 5:09 PM
    Monday, December 05, 2011 8:01 PM
  • Thanks for this. Fantastic solution
    Thursday, January 05, 2012 9:27 AM
  • It is because the GPO that is setting your homedirectories is also applied to your machine (device) instead only apply it to the user level and then the Windows 7 machine will not rename the folder
    Thursday, January 19, 2012 7:23 PM
  • Nope.

     

    as you can see the containers involved are only user containers. There are no computers in either "users" or "administrators" containers. Unless i have done something wrong that I am not noticing.

     

     

    Thursday, January 19, 2012 7:48 PM
  • For smaller environments, would creating a single blank desktop.ini file with Read-Only checked, and then pasting that into each users home directory work?

     

    I mean it did fix the view, and it should prevent recreation of the file because the read only option is checked.


    Will it create log on delays/errors?


    Monday, February 06, 2012 2:51 PM
  • Am 06.02.2012 15:51, schrieb bebarce.el-tayib:
    >
    > For smaller environments, would creating a single blank desktop.ini
    > file with Read-Only checked, and then pasting that into each users
    > home directory work?
    >
     
    The read only attribute has to be set on the directory containing the
    desktop.ini file to make explorer respect it. The attributes of the
    desktop.ini itself do not matter, but usually they are "SH".
     
    sincerely, Martin
     

    A bissle "Experience", a bissle GMV... Wenn meine Antwort hilfreich war, freue ich mich über eine Bewertung! If my answer was helpful, I'm glad about a rating!
    Tuesday, February 07, 2012 4:30 PM
  • I have found that you can use right click in explorer and add a column called " Filename" And it will display the  MY documents folder "Real name"

    Today is a good day to ...

    Monday, February 20, 2012 4:47 AM
  • A simple FORFILES command can clean up the user home directory on mass to quickly work around this issue:

    forfiles /P d:\userdrives /s /m desktop.ini /c "cmd /c del /F /A:HSA @file"

    Thursday, March 22, 2012 1:53 AM
  • We experienced the exact same problem. I just created a policy that deletes the desktop.ini file since we don't use it.

    Lasse


    /Lasse

    Tuesday, April 03, 2012 11:54 AM
  • In our environment this seems to work too:

    Add this permission to \\server\share$\User1 for User1:

    Deny Write Attribute (This Folder Only)

    so far it has stopped the 'renaming' for all new Win 7 (ex-XP) users.  For existing 'renamed' folders we'll have to do use one the methods described in the earlier posts.

    Monday, April 30, 2012 8:56 PM
  • I added a few things here to produce a log file in case you want to go back and see what happened:

    forfiles /P d:\users /s /m desktop.ini /c "cmd /c echo @path && cmd /c del /F /A:HSA @file" > c:\del_desktop_ini.log


    Monday, August 13, 2012 4:41 PM
  • Is there a way to keep this detailed view permanent for all users?
    Saturday, September 01, 2012 12:18 PM
  • Symptom:
    When a user logs in to a Windows 7 computer, and the home folder exists on a network share, the folder is renamed to My Documents instead of the users name.

    When browsing the home folder with windows 7, a filename column can be added to view the proper name of the folder.   However, in an environment with both XP and Wimdows 7, XP does not have the ability to add the filename column to explorer.  

    (Note:  This article assumes you are familiar with editing the registry, and doing registry imports from a file.  As always, backup your registry before editing. )

    Cause:

    When a user with a home folder redirected to  a network share logs in to a Windows 7 machine, windows 7 creates a desktop.ini file in the user home folder.   The desktop.ini contains the line:

    LocalizedResourceName=@%SystemRoot%\system32\shell32.dll,-21770

    The line causes the folder to appear with the name My documents.

    The entire desktop.ini contents:

    [.ShellClassInfo]
    LocalizedResourceName=@%SystemRoot%\system32\shell32.dll,-21770
    IconResource=%SystemRoot%\system32\imageres.dll,-112
    IconFile=%SystemRoot%\system32\shell32.dll
    IconIndex=-235

    Soultion:

    To view the folders with the original name in Windows XP:
    Changing the desktop.ini to reflect %filename% makes XP see the home folder  as the file name, just like Windows 7 does when you add the filename column. (Note, the icon changes in XP, so at least you can tell when someone has logged into windows 7).
     
    Instead of:
    LocalizedResourceName=@%SystemRoot%\system32\shell32.dll,-21770

    Change the desktop.ini file to reflect %filename%:
    LocalizedResourceName=@%filename%


    [.ShellClassInfo]
    LocalizedResourceName=@%filename%

    IconResource=%SystemRoot%\system32\imageres.dll,-112
    IconFile=%SystemRoot%\system32\shell32.dll
    IconIndex=-235

    This can be set in the registry in the following key:
     [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{FDD39AD0-238F-46AF-ADB4-6C85480369C7}]

    so when Windows 7 creates the desktop.ini file, it incorporates this setting.



    The regfile to change it  is:

    Windows Registry Editor Version 5.00

    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{FDD39AD0-238F-46AF-ADB4-6C85480369C7}]
    "LocalizedName"=hex(2):40,00,25,00,66,00,69,00,6c,00,65,00,6e,00,61,00,6d,00,\
      65,00,25,00,00,00


    Setting PreCreate value to 0 in the same registry key stops the desktop.ini file creation altogether!

    I searched the registry to find the value, LocalizedResourceName=@%SystemRoot%\system32\shell32.dll,-21770 to determine which key was used to create the desktop ini.

    Then since Windows 7 can add the column filename in explorer, I thought I would try %filname%

    Note: I ran a script to delete all the existing desktop.ini files, then applied the reg hack.

    Scott


    Networking: It's not just a job, it's an OBSSESION!










    • Proposed as answer by SGDought Wednesday, November 28, 2012 5:53 PM
    • Edited by SGDought Wednesday, November 28, 2012 8:26 PM
    Wednesday, November 28, 2012 5:42 PM
  • I solved this by putting a Group Policy preference to delete u:\desktop.ini at startup.  It doesn't seem to have caused any issues and now all the students' work areas show up as their usernames now and not "My Documents".
    • Proposed as answer by _clairehr_ Wednesday, May 15, 2013 3:10 PM
    Wednesday, May 15, 2013 3:10 PM