Jump to content

Windows 7 renamed our user network folders to my documents


Recommended Posts

Posted

Hi! I`m having a problem with Windows 7 recently deployed in our network.

When user log into windows 7 machines their network home folder gets renamed to My Documents. But when I run dir command via command prompt it shows all folders with proper user names. Please see attached screen shots.

Is there anything I could do to prevent it from happening and get proper folder names back??

Thank you for help in advance.homes.JPGhomes.JPG

Posted

Its the desktop.ini file in the users folder that does this.

 

You could either bulk delete them or replace them all with a read only / permission fixed version - I've not tried either option yet so test and backup before you try this.

Posted (edited)

One thing M$ recommend is adding a My Documents folder inside you Home Directories and redirecting to these instead of the root directories.

 

For example if a user has a directory of

 

Wickedgenius

 

It will show as

 

My Documents

 

So make the folders like this

 

Wickedgenius\My Documents

 

and then aim AD at the My Documents folder, therefore it won't change it and you can still see which is which. There may be other things to do before you try and do this though. We haven't yet implemented it because of the time it will take to move everything around but I vaguely remember something about the desktop.ini file needing removing or something like that but can't be sure what it was now. I will try to find out where we got this info and post a link for you tomorrow.

 

 

See here as well: http://www.edugeek.net/forums/windows-7/47835-windows-7-gotchas-tips-fyi.html ;)

Edited by Wickedgenius
Posted
The above is a bit tricky when you have mixed Xp and Win7/Vista with accounts allready setup. :)

 

That is our main reasoning behind not doing it yet, it would require us to change every profile and then delete the profiles from the machines so that the users could log in and then have them still work. When you have a number of machines it's not easy. Just installed a new version of the anti-virus in the last two weeks of the summer and it was horribly boring and we got little else done for 1 of the weeks, the other week was spent putting Windows 7 in a few of out Suites.

 

I see it being a problem soon though when Teachers want to start accessing Students work :confused:

Posted
replace them all with a read only / permission fixed version

I blocked them using the file type blocking thing on 2003 R2 and up, you can block all "desktop.ini" from being created.

 

I disabled it tho recently when I was trying to work out the cause of our slow windows 7 logon issues and I've not turned it back on since, so YMMV

 

Failing that, I've read on here that you can use Group policy preferences to make Windows delete it straight away after logon.

Posted

It is pretty annoying. I don't mind getting around it by typing the username in the path bar, but teachers are used to having read access to students directories for marking etc - they are obviously a bit puzzled when they now see hundreds of my documents.

 

Think we're just going to move all the My Docs into another folder with username on it during half term

Posted

Hi guys!

Thanks for the prompt replies. I`m still looking into it as we have 1000+ users and renaming/ deleting ini`s it`s not really not an option.

I have tried:

 

----------------------------------------------------------

Grant the user exclusive rights to the redirected folder. To do this, follow these steps:

 

1. Log on to the computer by using domain administrator credentials.

2. In the Start Search box, type gpmc.msc, right-click gpmc.msc, and then click Run as administrator.

 

Note If you are prompted for an administrator password, type the password. If you are prompted for confirmation, provide confirmation.

3. Right-click the Group Policy Objects node, and then click New. Type the name of the policy. For example, in the New GPO dialog box, type Windows Vista Folder Redirection Policy.

4. Right-click the Group Policy object that you created in step 3, and then click Edit.

5. Under User Configuration, expand Windows Settings, and then expand Folder Redirection.

6. Right-click the Documents folder, and then click Properties.

7. On the Target tab, configure the following:

* In the Setting box, click Basic—redirect everyone’s folder to the same location.

* In the Target Folder Location box, click Create a folder for each user under the root path.

* In the Root Path box, type the UNC file path to which you want to redirect the Documents folder.

8. In the Documents Properties dialog box, click the Settings tab, and then configure the following:

* Click to select the Grant the user exclusive rights to Documents check box.

* Click to select the Move the contents of Documents to the new location check box.

9. Click OK.

----------------------------------------------------------

 

Still trying to figure it out..

Posted

I have setup a gpo to delete the desktop ini file, but it errors.

It cannot delete because it does not have permission.

 

Any ideas on how to get the gpo to delete it correctly.

alan.

Posted

I just put the following command line into a batch file and attached it to a user logon policy at the top level of our domain to fix this problem:

 

del %HOMESHARE%%\desktop.ini /A

 

This should delete the desktop.ini file for you and make the folders readable again once they logon (and the script runs automatically). However, you should test it first to make sure it works alright in your environment.

Posted
It is pretty annoying. I don't mind getting around it by typing the username in the path bar, but teachers are used to having read access to students directories for marking etc - they are obviously a bit puzzled when they now see hundreds of my documents.

 

Think we're just going to move all the My Docs into another folder with username on it during half term

 

I created a little database that opens the students home folder for the teachers. All they do is put the name in. It took a while to do but as I had excel spreadsheets with all usernames generated on it anyway it's been a useful tools for me too. Added a section so I can get passwords as well as we set them in year 7 for the whole time a student is with us.

Posted
Hi! I`m having a problem with Windows 7 recently deployed in our network.

When user log into windows 7 machines their network home folder gets renamed to My Documents. But when I run dir command via command prompt it shows all folders with proper user names. Please see attached screen shots.

Is there anything I could do to prevent it from happening and get proper folder names back??

Thank you for help in advance.[ATTACH=CONFIG]8044[/ATTACH][ATTACH=CONFIG]8044[/ATTACH]

 

The real problem is when you redirect the user to their home folder Windows 7 by default turns on synchronization. This then rewrites the "desktop.ini" file in the home folder. To correct this we added a new Group Policy, attached is the settings.

 

nosync.jpg

Posted

Ok, i have a setting in a gpo that runs a bat file that removes the file.

However, windows must create this file just after login, so the file comes back.

 

I have done the same on the logout script, but it means while the student is logged in, the folder is called my documents.

 

I have tried the settings in the gpo that has been mentioned for not creating them, but it does not work in out enviroment.

 

alan.

  • 2 weeks later...
Posted

HI, thanks to everyone for all the info on this.

This is what i have done, i got some of the info from another forum so i cannot take the credit for this, Im just passing the info on.

 

To rectify the problem a script called Rights.cmd is run on login via a GPO that removes the rights of Administrators and Staff from reading the ini file and therefore you see the users home directory correctly.

 

Rights.cmd

 

%windir%\system32\icacls.exe %homedrive%\Desktop.ini /deny "Domain Admins":r

 

%windir%\system32\icacls.exe %homedrive%\Desktop.ini /deny Administrators:r

 

%windir%\system32\icacls.exe %homedrive%\Desktop.ini /deny Staff:r

  • Thanks 1
Posted

I don't understand the issue with this at all.

 

Is everyone *not* redirecting the other 10 folders in Vista/7 that need doing to stop them pointing to the local machine? I have them all redirected to the users home folder as a subfolder so that it's not an issue.

 

Other things to look out for: You get *two* documents etc (one pointing to the local drive) in the users folder of you don't use move the contents or remove the 11 folders from the default/mandatory/netlogon profile that is used to create the users profile.

  • 3 weeks later...
Posted

I also wrote a PowerShell script - I think it's a modification of the one that rpwillis posted as I remember the Salamander from another forum somewhere :-) I have put in red the parameters you would want to change for your environment. I am finding PowerShell to be a great tool!

 

(the smiley face is actually two colons followed by the word DENY)

 

 

 

$InitialFolder = "\\depot\studentstest$\"

 

#$Files = Get-ChildItem $InitialFolder -include desktop.ini -recurse -force

#$folders = Get-ChildItem W:\

 

$folders = Get-ChildItem | where-object {$_.psiscontainer};

foreach ($folder in $folders)

{

$Files = Get-ChildItem $folder -Filter desktop.ini -Force

Write-Host Processing $folder , $folder.count files found -foreground "BLACK"

 

Foreach ($File in $Files)

{

if ($File -ne $null)

{

$colRights = [system.Security.AccessControl.FileSystemRights]"Read"

$InheritanceFlag = [system.Security.AccessControl.InheritanceFlags]::None

$PropagationFlag = [system.Security.AccessControl.PropagationFlags]::None

 

$objType =[system.Security.AccessControl.AccessControlType]::DENY

 

$objUser = New-Object System.Security.Principal.NTAccount("Administrators")

 

$objACE = New-Object System.Security.AccessControl.FileSystemAccessRule `

($objUser, $colRights, $InheritanceFlag, $PropagationFlag, $objType)

 

$objACL = Get-ACL $File

$objACL.AddAccessRule($objACE)

 

Set-ACL $file $objACL

}

}

 

}

Posted

I can't get this script to work but i don't think its going to help anyway.

I have managed to get the other script to work from here Richard Willis – SharePoint Learning Kit Coordinator, SalamanderSoft Owner » How To Stop Home Folders Being Renamed Documents in the Network Share

However the problem is that all our users have full control over their profile path.

so currently the desktop.ini has full control to the user and deny for security group "year 7" so i still see it as "my documents"

what would be good is if that script read the folder name (because its named after the username) and set deny read for that user.

Posted
I got that script to work now. I have to put in the group or user of the affected person. so if im a domain admin i have to deny myself to the desktop.ini so that i can see it. therefore i also then have to add teachers to the deny. its no good adding deny for the student as they are not the ones with the problem
  • 1 month later...
Posted
Explicitly Disabling this settings in GP worked for me, can only be found on a 2008R2 machine though.

 

No its on my 2008 server and its not R2.

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 account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...