Archive: Posts Tagged ‘profile’

HOWTO: Remove public folder links (c:\users\public) from windows Libraries

No comments September 16th, 2010

A while ago i wrote a howto about this and thought it would be a nice first post. It was originally posted on the citrix forums here.

Yesterday I figured out howto remove the public folder links from the windows libraries, and how to make my own links. Im writing this howto in to get this documented as i havnt found anything about it anywhere. If you dont know what i mean then start an explorer window on a 2008+ server or windows vista/7. And in your explorer pane to the left you have libraries. These libraries make whatever links you assign to it appear as one folder. By default you have Documents, Music, Pictures and Videos, and you might not want all of them in your citrix/terminalserver environment. And if we look at the settings for one of them like Documents, its going to point to your private documents folder and the local public documents folder that all users have access to which often isnt very good at all. If you right click on it you can remove the public link and add more of whatever links you want in it. And you can create your own libraries. And this is how you customize so that new users gets the libraries you want them to have:

The libraries are stored in “%userprofile%\AppData\Roaming\Microsoft\Windows\Libraries” and gets created on your first logon. They are text files named name.library-ms and you can only open them in an editor by specifically writing the filename. I use cmd.exe, browse to the location and if you type dir you will see the correct filenames of the libraries.
cd %userprofile%\AppData\Roaming\Microsoft\Windows\Libraries
2010-04-08 12:50 <DIR>; .
2010-04-08 12:50 <DIR>; ..
2010-04-08 12:50 3 548 Documents.library-ms
2010-04-08 12:50 3 505 Music.library-ms
2010-04-08 12:50 3 540 Pictures.library-ms
2010-04-08 12:50 3 519 Videos.library-ms

type notepad Documents.library and you will see the settings for this library. The settings file is an XML and i haven’t figured out how to change it very much yet thou, its serialized. But every link in the library is between the <searchConnectorDescription> tags. So if you have two links in the library and the second one is public you can remove the second pair of these tags and you will have removed the public link from the library.

The easiest way thou is to customize in the explorer gui. Dont touch the first link if you want it to continue to point to the users homedir, i dont know what it links to, it seems like its linked to %homedrive% or something like it which is what you mostly want and not directly to the users homedrive ie. \\servername\homefolder.
Anyways once your done with the libraries you co to c:\users\Default\appdata\roaming\microsoft\windows and create a folder named Libraries. Then copy your customized libraries to that folder.

And when new profiles gets created they will get your libraries as you have specified them!

To me i just removed the music library and the videos library. And removed the links to c:\users\public in the remaing two libraries, as i dont want anything to be saved on the citrix servers and dont want it to be shared between different customers that use the same server.