Jeff said:
On 18/03/2013 04:56, Paul wrote:
Ken Springer wrote:
My apologies for the somewhat misleading subject line, but after 10
minutes of pondering, couldn't come up with anything better.
First, yes I'm aware that the actual files/contents of a library are
stored elsewhere, the library is just a list of contents.
Working/dealing with those are the intended subject.
Background:
I'm one that does not believe in having user data on the boot
drive. On
a time available basis, I'm helping a friend of mine relocate the
folders in her user documents to another partition on her laptop hard
drive.
I want to do the same with Library data, but so far web searches have
been of no value, or the article is actually talking about the actual
documents and folders, not the "library" entries you see when you
open a
library in Windows Explorer.
Somewhere, there has to be a file or something that records what the
contents of a library are, be it folders, files, or shortcuts.
I'm looking for the data that lists the folders and shortcuts
contained
in any library. I want to relocate that information to another
partition as well as any user created library. That way, should
the OS
need to be reinstalled, the libraries do not have to be rebuilt. A
restore from a System Image should contain the information on where
the
library contents are now stored, similar to the users documents.
This obviously needs to include user created documents.
Suggestions? Questions?
http://msdn.microsoft.com/en-us/magazine/dd861346.aspx
"A library in Windows 7 is stored as an XML definition
file that has a file extension of .library-ms."
I don't know if that'll help, but it might be a start.
At least it doesn't use the registry.
Interesting. Agent Ransack find all the library-ms folders at
C:\Users\{username]\AppData\Roaming\Microsoft\Windows\Libraries (except
for "Recorded TV" which is at C:\Users\Public\Libraries).
Are those AppData folders real folders or specialised ones? If you
right-click on "Libraries" as a sub-folder of Desktop in Windows
Explorer, there are several options, but there is no "Properties".
Similarly, if any of the actual library sub-folders is right-clicked,
"Properties" appears, but clicking on that only gets one tab -
"Library". Contrast that with
C:\Users\{username]\AppData\Roaming\Microsoft\Windows\Libraries, where
right-clicking gives the usual extensive options. That includes
Properties | Security, where "Special Permissions" is not ticked. I
wonder if it would be possible to get rid of libraries completely by
getting full control of those folders? I believe that, even if you
delete them, Win7 recreates them at boot.
I have a Windows 7 in a VM right now, and I booted Linux in there, to
list
all the files (so "hidden" would not be a problem).
Each library is controlled by a *.library-ms file.
That's how it keeps track of the folders. These are the five files
I was able to find (Win7 SP1).
/Users/username/AppData/Roaming/Microsoft/Windows/Libraries/
Documents.library-ms
Music.library-ms
Pictures.library-ms
Videos.library-ms
/Users/Public/Libraries/
RecordedTV.library-ms
Those files appear to be hidden while I'm in Windows 7 (at
least in Explorer).
I added a couple folders to my "Music" library. The added folders
were on my D: and E: partitions.
If I look in the file "Music.library-ms" (which is an XML text file),
<url>E:\first</url>
...
<url>F:\second</url>
So the two folders I added to Music library, on partitions other
than C:, are now part of the library.
Included in the XML file, is a reference to "@shell32.dll,-34588",
and on the older OSes, that's what causes custom views of things
to be created. So that's the call that checks the XML file, and
decides what to show as "being in that library". Since the libraries
can have different media types, the "-34588" number would be
different for each .library-ms file. That's so music files could
be treated different than video files, when their folder
is being displayed.
A library has a default storage location, and that can be
set to any of the constituent folders (including the
system default before you start adding folders to it).
*******
There's an example of setting the Library here.
http://social.technet.microsoft.com...n/thread/1752b73f-256f-4030-a6b4-75c2b434c1d4
In this picture, they've set the Documents library to a server
of some sort.
http://ajzgnq.blu.livefilestore.com...ESu--LU40VPW7kx/FolderRedirection2.jpg?psid=1
But the actual tracking, of what folders "belong" to the library,
that's an XML text file. It's a list of all the folders. If
you were to move the library, perhaps moving the thing it
defaults to, to another partition, is the best you can do.
If a person adds folders to the library, they're not
actually stored in the library - just made to look like
they are.
In the example I did, I expect if I dropped a music file into
my "music library", it's stored on the default folder for it
on C: (because I didn't change that at all). If I changed
the default folder for such dragging and dropping, to E:\first,
then my storage space on E: gets chewed up.
As near as I can tell, you don't have to move the Library
to another disk. You could change the default storage
location for drag and drop, so any files being dropped
into the library, are sent off to a different partition.
I also notice in the XML file,
<url>knownfolder:{4BD8D571-6D19-48D3-BE97-422220080E43}</url>
Windows uses indirection for some objects, and so I'd look
in the Registry for the "long string thing", to find out
what actual folder that points to. And tracing that backwards,
appears to get rather complicated (there's a whole structure to
walk backwards through).
Better to move it with the GUI I guess
Hmmm. Maybe I can test that.