1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How to? Read Win7's Computer Libraries

Discussion in 'Support' started by Charles G, Jan 11, 2016.

  1. Charles G

    Joined:
    Apr 2, 2011
    Messages:
    1,012
    Likes Received:
    0
    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. vefatica

    Joined:
    May 20, 2008
    Messages:
    7,874
    Likes Received:
    30
    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
     
  3. TEA-Time

    Joined:
    Jun 2, 2008
    Messages:
    282
    Likes Received:
    1
    NirSoft already did with UserAssistView.

    http://www.nirsoft.net/utils/userassist_view.html

    While you're at it, have a look around the site. Lots of cool utilities there.
     
  4. Charles G

    Joined:
    Apr 2, 2011
    Messages:
    1,012
    Likes Received:
    0
    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.....
     
  5. Alpengreis

    Joined:
    Jan 12, 2014
    Messages:
    228
    Likes Received:
    6
    Could this be the solution?

    If you are already in your related Library:

    global /s2 doubleKillerPro.exe -addfolder %_cwd
     
  6. Charles G

    Joined:
    Apr 2, 2011
    Messages:
    1,012
    Likes Received:
    0
    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. Charles G

    Joined:
    Apr 2, 2011
    Messages:
    1,012
    Likes Received:
    0
    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....
     
  8. Alpengreis

    Joined:
    Jan 12, 2014
    Messages:
    228
    Likes Received:
    6
    ahh, okay - I understand (now) :-)
     
  9. vefatica

    Joined:
    May 20, 2008
    Messages:
    7,874
    Likes Received:
    30
    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. vefatica

    Joined:
    May 20, 2008
    Messages:
    7,874
    Likes Received:
    30
    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
     
  11. Charles G

    Joined:
    Apr 2, 2011
    Messages:
    1,012
    Likes Received:
    0
    @vince,

    Yes it is exactly what I am looking for! What can I get a copy of @knownpath[] please?
     
  12. vefatica

    Joined:
    May 20, 2008
    Messages:
    7,874
    Likes Received:
    30
    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.
     
  13. TimButterfield

    Joined:
    May 20, 2008
    Messages:
    401
    Likes Received:
    1
    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. Charles G

    Joined:
    Apr 2, 2011
    Messages:
    1,012
    Likes Received:
    0
    I don't use SYSUTILS but my system is x64.
     
  15. vefatica

    Joined:
    May 20, 2008
    Messages:
    7,874
    Likes Received:
    30
    Well, there's a new SYSUTILS64.ZIP containing @KNOWNPATH here:

    ftp://lucky.syr.edu/4plugins/x64/sysutils64.zip
     
  16. Charles G

    Joined:
    Apr 2, 2011
    Messages:
    1,012
    Likes Received:
    0
    @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. vefatica

    Joined:
    May 20, 2008
    Messages:
    7,874
    Likes Received:
    30
    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
     
  18. Charles G

    Joined:
    Apr 2, 2011
    Messages:
    1,012
    Likes Received:
    0
    the showlibs.btm orginally from you - is attached...
     

    Attached Files:

  19. w_krieger

    Joined:
    Nov 2, 2008
    Messages:
    176
    Likes Received:
    0
    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
     
  20. Charles G

    Joined:
    Apr 2, 2011
    Messages:
    1,012
    Likes Received:
    0

Share This Page