How to? Read Win7's Computer Libraries

#1
Is it possible to read the folders that are marked as being part of the Documents library, and iuf so - how please?

I want to make a command line similar to:

"doubleKillerPro.exe -addfolder "folder 1" -addfolder "folder 2"

where folder 1, folder 2, etc are the root folders under the Library "Documents" - for example.
 
#2
I think someone will have to figure out what's going on here; it looks pretty cryptic to me.
Code:
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\UserAssist
 
#4
Maybe I should have been clearer in my OP. Here is what I am looking to find :
Capture.PNG
And for example - Pictures -> My Pictures would result in all folders listed here.....
 
#6
under windows 7 - I can't see where the root folder for "Libraries" would be. So I guess my question is more about if there is a way to determine what the names of the Libraries are and for each one - what the folders are that are listed under each....
 
#7
under windows 7 - I can't see where the root folder for "Libraries" would be. So I guess my question is more about if there is a way to determine what the names of the Libraries are and for each one - what the folders are that are listed under each....
 
#9
Hmmm! It's not as bad as I thought (the registry key) but it ain't easy. Have a look here:
Code:
c:\users\vefatica\application data\microsoft\windows\libraries> d
2012-05-18  14:48  332  desktop.ini
2012-05-18  14:49  720  Desktop.lnk
2012-03-09  11:12  3,563  Documents.library-ms
2012-07-08  22:42  3,521  Music.library-ms
2012-03-10  01:44  3,556  Pictures.library-ms
2016-01-12  00:16  1,284  ScoobyDoo.library-ms
2012-03-10  01:44  3,535  Videos.library-ms
Each ".library-ms" file (XML, apparently) defines a library. And the "url" entries in each library list the contents (which apparently must be real file system containers). If you had a nice list of "known folders" and their GUIDs (google), and took the time to plow through these files and match up GUIDs and real names, you could probably get what you want. Here's what I found. The first one is no surprise; those are the GUIDs of the "Documents" folder and the "Public Documents" folder. The last one, "ScoobyDoo" is a library I made myself; I put the folder "u:\" in it.
Code:
c:\users\vefatica\application data\microsoft\windows\libraries> grep -i url Documents.library-ms
  <url>knownfolder:{FDD39AD0-238F-46AF-ADB4-6C85480369C7}</url>
  <url>knownfolder:{ED4824AF-DCE4-45A8-81E2-FC7965083634}</url>

c:\users\vefatica\application data\microsoft\windows\libraries> grep -i url Music.library-ms
  <url>knownfolder:{4BD8D571-6D19-48D3-BE97-422220080E43}</url>
  <url>knownfolder:{3214FAB5-9757-4298-BB61-92A9DEAA44FF}</url>

c:\users\vefatica\application data\microsoft\windows\libraries> grep -i url Pictures.library-ms
  <url>knownfolder:{33E28130-4E1E-4676-835A-98395C3BC3BB}</url>
  <url>knownfolder:{B6EBFB86-6907-413C-9AF7-4FC2ABF07CC5}</url>

c:\users\vefatica\application data\microsoft\windows\libraries> grep -i url Videos.library-ms
  <url>knownfolder:{18989B1D-99B5-455B-841C-AB7C74E4DDFC}</url>
  <url>knownfolder:{2400183A-6185-49FB-A2D8-4A392A602BA3}</url>

c:\users\vefatica\application data\microsoft\windows\libraries> grep -i url ScoobyDoo.library-ms
  <url>U:\</url>
 
#10
With the help of a plugin @KNOWNPATH which turns a string GUID into a path, and a little BTM (far below) I can get this. Is that what you're after, Charles?
Code:
c:\users\vefatica\application data\microsoft\windows\libraries> showlibs.btm
Documents.library-ms
  C:\Users\vefatica\Documents
  C:\Users\Public\Documents
Music.library-ms
  C:\Users\vefatica\Music
  C:\Users\Public\Music
Pictures.library-ms
  C:\Users\vefatica\Pictures
  C:\Users\Public\Pictures
ScoobyDoo.library-ms
  U:\
Videos.library-ms
  C:\Users\vefatica\Videos
  C:\Users\Public\Videos
Code:
do f in *.library-ms
   echo %f
   do l in /p tpipe /input="%f" /grep=3,0,0,0,0,0,0,0,url /replace=4,0,0,0,0,0,0,0,0,".*<url>([^^<]*)</url>$",$1
     iff "%@left[12,%l]" == "knownfolder:" then
       echo ^t%@knownpath[%@right[-12,%l]]
     else
       echo ^t%l
     endiff
   enddo
enddo
 
#12
@vince,

Yes it is exactly what I am looking for! What can I get a copy of @knownpath[] please?
It will be in SYSUTILS. I'll have to upload a new one (after dinner). Do you use SYSUTILS? ... 32-bit or 64-bit?

Does anyone know if there's an easy way to pull info from an XML file (as I did with TPIPE /grep) in C/C++? If that isn't too hard, I could make a plugin to handle the .library-ms files.

P.S., I don't know how robust this strategy is ... what surprises might be found in .library-ms files.
 
May 20, 2008
429
2
#13
It looks like the start node, data, end node is all on one line. You might be able to process as plain text instead of parsing XML. Since you know you are looking for "<url>" to start, a simple strstr should let you find the beginning. Find the end node. Get data between. Repeat search after end node. It's not pretty or generic, but might suffice.
 
#14
It will be in SYSUTILS. I'll have to upload a new one (after dinner). Do you use SYSUTILS? ... 32-bit or 64-bit?

Does anyone know if there's an easy way to pull info from an XML file (as I did with TPIPE /grep) in C/C++? If that isn't too hard, I could make a plugin to handle the .library-ms files.

P.S., I don't know how robust this strategy is ... what surprises might be found in .library-ms files.
I don't use SYSUTILS but my system is x64.
 
#16
@vefatica the current sysutils64.dll no longer has the @knownpath included. Would love to have an updated susutils64 with it back in please! I know it has the showlib command but I'd like to have access to the knownpath routine instead....
 
#17
Charles, do you remember how it worked? The only thing I can get to work right now is the likes of this.
Code:
p:\4sysutils\release> echo %@knownpath[%@right[-12,knownfolder:{FDD39AD0-238F-46AF-ADB4-6C85480369C7}]]
C:\Users\vefatica\Documents
 
Nov 2, 2008
180
0
#19
There's a program called Librarian from [title] that allows you to add additional files to the libraries, and also allows you (apparently) to add new libraries. I added a number of files on my data-tree to this, eg d:\save\video