Jump to content

Recommended Posts

Posted

I had this problem. Copy the below and save it as a .vbs file. Get it to run at logon and it will look for and delete the desktop.ini file. I have it in use here and it always works.

 

'On Error resume next

 

'Dimension variables

Dim oShell, filesys, text, readfile, path

'Set shell object

Set oShell = CreateObject( "WScript.Shell" )

'Get users home directory UNC path from environment variable and add

'\Desktop.ini to the end to give the name of the file

path = oShell.ExpandEnvironmentStrings("%HOMESHARE%") & "\Desktop.ini"

'Create File system object

Set filesys = CreateObject("Scripting.FileSystemObject")

'Check to see if the file exists

If filesys.FileExists(path) Then

'If it does, open the file and make it a normal hidden file

Set readfile = filesys.GetFile(path)

readfile.Attributes = 2

'Delete it

readfile.Delete(True)

'Create a new Desktop.ini file and leave it blank

Set text = filesys.CreateTextFile(path)

text.Write " "

text.Close

Else

'If it doesnt exist create a new Desktop.ini file and leave it blank

Set text = filesys.CreateTextFile(path)

text.Write " "

text.Close

End If

 

'Open the new file

Set readfile = filesys.GetFile(path)

'Make the file read only and hidden

readfile.Attributes = readfile.Attributes Or 1 Or 2

 

 

 

Thanks

Sean

Posted

Bringing this old chestnut up again.

 

We started re-directing documents at the beginning of the year and so noticed the desktop.ini issue.

 

I thought I had it sorted by using the file server resource management and creating a file screen but that DOES INDEED BREAK FOLDER REDIRECTION which took us a while to notice.

 

Redirecting to a folder in the users home area is not really an option in our case.

@Chuckster , did you create this as a policy for local machines. I'm having a bit of a problem getting the key imported properly could you elaborate a bit more

Posted
Bringing this old chestnut up again.

 

We started re-directing documents at the beginning of the year and so noticed the desktop.ini issue.

 

I thought I had it sorted by using the file server resource management and creating a file screen but that DOES INDEED BREAK FOLDER REDIRECTION which took us a while to notice.

 

Redirecting to a folder in the users home area is not really an option in our case.

@Chuckster , did you create this as a policy for local machines. I'm having a bit of a problem getting the key imported properly could you elaborate a bit more

 

Copy the code into Notepad and save it as Filename.reg. Copy the .REG file to your Netlogon folder (%longonserver%\netlogon)

 

Then, create a .BAT file with the following..

 

@echo off

%windir%\regedit.exe /s \\schoolname.internal\netlogon\filename.reg

 

Place the .BAT file in a GPO under Comp Config\Policies\Windows Settings\Scripts

 

And put it in Startup.

 

Hope this helps.

  • Thanks 1
Posted
Copy the code into Notepad and save it as Filename.reg. Copy the .REG file to your Netlogon folder (%longonserver%\netlogon)

 

Then, create a .BAT file with the following..

 

@echo off

%windir%\regedit.exe /s \\schoolname.internal\netlogon\filename.reg

 

Place the .BAT file in a GPO under Comp Config\Policies\Windows Settings\Scripts

 

And put it in Startup.

 

Hope this helps.

 

I ran the reg file locally and just get a blank entry

 

Reg.jpg

Posted
We fixed this by following Microsoft's guidance - move everyone's documents to a sub-folder within their named folder, so it ends up with \\server\share\username\documents.

 

All our accounts are set up in that way.

 

Had the same issue - followed the same guidance - problem solved.

Posted (edited)
Had the same issue - followed the same guidance - problem solved.

 

Not really an easy option for us, traditionally everyone has put documents in the root of their home areas. This year we went down the redirection route but users have lots of folders and files in the root of their home drives. With 900 staff accounts it could be a problem moving these to the Documents folder, especially as they are in most year round. We had to rename all 900 of the staff folders a few months back and this took me a lots of late nights and few weekends to complete in stages.

Edited by Davit2005
Posted
Not really an easy option for us, traditionally everyone has put documents in the root of their home areas. This year we went down the redirection route but users have lots of folders and files in the root of their home drives.

 

With 900 staff accounts it could be a problem moving to the Documents folder.

 

You move the files into a new directory, and set their home directory to that directory?

Posted
Not really an easy option for us, traditionally everyone has put documents in the root of their home areas. This year we went down the redirection route but users have lots of folders and files in the root of their home drives.

 

With 900 staff accounts it could be a problem moving to the Documents folder.

 

We had 1350 student accounts and 150 staff accounts.

 

I just told them that their H:\ drive would be unchanged but if they clicked a "My Documents" shortcut it would take them to a newly created folder in their H:\ drives.

 

I did nt have one complaint or query.

 

Users are more adaptable than perhaps you might think....

Posted
I ran the reg file locally and just get a blank entry

 

[ATTACH=CONFIG]27202[/ATTACH]

 

That's correct, so it has worked.

 

Delete the .ini file from every user area and you'll then see that the next time a user logs on to a workstation their user directory doesn't get renamed as 'Documents'. It will remain as their username.

Posted
You move the files into a new directory, and set their home directory to that directory?

 

This would easy I guess, but how would we deal with Home Areas that have folders created by the user in the root??

Posted (edited)
This would easy I guess, but how would we deal with Home Areas that have folders created by the user in the root??

 

run a script to copy everything from the root of their home area to a folder called Documents, and exclude system folders like recylcer, appdata and just to make doubley sure exclude "Documents", so it doesn't try to move documents into a documents folder

 

See post #24

Edited by smithson83
  • Thanks 1
Posted
I didn't notice it at first until I watched one of our students logging in with mandatory profile and it took over 2 minutes, most of which was 'preparing desktop'.

 

I changed the group policy setting for Document redirection to create the folder and then added in the appropriate share path.

 

[ATTACH=CONFIG]26965[/ATTACH]

 

I was having the same problem and fixed it using FSRM method. I will give MS method a try now.

  • 1 month later...

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...