Wednesday, 8 June 2011

home folders being renamed to "My Documents" - desktop.ini woes

Those admins that have moved from XP to Windows Vista or 7 have probably gone through the desktop.ini woes.

Desktop.ini is the medium in which Microsoft use to give a directory its custom icon or name. For example the My Documents folder has it's custom icon by a reference in the desktop.ini file. Most of the time this works perfectly, but when you are redirecting My Documents from the local location to a network share this can cause problems, especially in education.

We have a requirement for a number of staff members to be able to look at users home directories and view the contents inside. This is easy when the directories are in username format, but when the desktop.ini comes along, it "virtually" renames the folder to "My Documents" and gives it the custom icon.

So the home directories that you create like this.. (see below)

Are changed to this format as soon as a user logs into a computer... (see below)

Microsoft have been kind enough to include a nice fix in their Server 2008 R2 product, that fix is available in the "File Screening Management" functionality provided by File Server Resource Manager.

And the fix...

1. Open "File Server Resource Manager" on the file server that is hosting your home shares.

2. Select "File Screening Management"

3. Select "File Screen templates"

4. Then "Create File Screen Template..."

5. Give the template a name, desktop.ini

6. Set the "Screening Type" to "Active screening

7. Create a new "Maintain file groups", name is desktop.ini and add desktop.ini to files to include, click OK

8. Tick "desktop.ini" as your file groups to block, then click OK

9. Now we need to use our newly created template, to block desktop.ini from creating any files on our home shares folder. Click "File Screens" and then "Create File Screen..."

10. Enter your home share local file path as the "File screen path" and select your desktop.ini template under "Derive properties from this file screen template"

 11. Click create, now desktop.ini is blocked from ever recreating itself in your home share directory.

Remember if you are using DFS you will need to repeat this procedure on each of your DFS file servers. You will also need to cleanup the existing desktop.ini files that have already found their way into users home folders.


  1. Wow, I've been looking for a fix for this for a while. Thanks for posting.


  2. This comment has been removed by the author.

  3. Thanks very much, saved a hell lot of time.