none
shlib.exe enum problem

    Întrebare

  • I'm using shlib.exe to remove the Public Documents and related from users libraries.  Unfortunately, whenever I run "shlib remove [library] [path in library]" and then "shlib enum [library]", then I get no results, even when there are clearly items still in the library.  If I add a third folder and remove it again, then it works OK, but it seems to fail when I remove a "built-in" path in the library.  This occurs on Windows 7 and Windows 2008 R2 on the domain.

    I realize that shlib is an extra and not a supported part of Windows 7.  Still, if nothing else, I wanted to make someone aware of this "bug".  I also wanted to see if anyone else has used this program and found this problem.  If so, were you able to solve it or work around it?


    • Editat de rpseekell 22 martie 2012 15:13 Add. Info
    22 martie 2012 15:09

Răspunsuri

  • I finally broke down and make my own solution.  From another thread of mine, I learned of a Windows API Code Pack (http://archive.msdn.microsoft.com/WindowsAPICodePack) that made the desired tasks much easier than I thought; all I had to do was wrap the functions in a command-line app.  So now I can enumerate libraries, add items to libraries, remove items from libraries, and set the default save location from script or command line with ease.

    Thanks for helping me figure out shlib, but this is much better, and I thought you should know.

    P.S. I'd still like to see Group Policy Preferences in Server 8 be able to modify libraries.

    • Editat de rpseekell 23 aprilie 2012 13:50 Future idea
    • Marcat ca răspuns de rpseekell 23 aprilie 2012 13:50
    23 aprilie 2012 13:49

Toate mesajele

  • Hi,

    Would you please let us know more details about this application, such as where you got it?


    If a post solved your problem, click “Mark as Answer” on the post. If a post helped you, click "Vote As Helpful" on the left side of post.

    26 martie 2012 10:00
  • My apologies. I thought it was more widely known. 

    I learned about two Windows-7-library-editing tools from http://www.grimadmin.com/article.php/creating-modifying-windows-7-libraries, which stated that the two are merely compiled code from Microsoft.  "If you look around, there are a few places where Microsoft provides sample code that uses this [IShellLibrary Interface] interface, and I've compiled a couple of them and made them available for download (allowed via the MSDN Code Gallery Licenses)." 

    So, since I cannot find those sample code projects, I am trying to get back to the creator(s) and give him/her/them some feedback.  I don't know where to do that, so I picked here.  Thanks for any information or suggestions you have.

    26 martie 2012 14:33
  • Hi,

    I have searched for you, have a look at
    Shell Library Command Line Sample.

    In addition, due to it is related to development, it is recommended to post the thread in 
    Windows Desktop Development Forum.

    Hope this helps.


    If a post solved your problem, click “Mark as Answer” on the post. If a post helped you, click "Vote As Helpful" on the left side of post.



    29 martie 2012 08:53
  • Thanks for finding the source of the code, but I'm not trying to develop anything.  My primary concern is finding a tool that can modify libraries by script or policy.  I don't need to co-develop a tool for this task.  Thanks anyway.
    29 martie 2012 18:23
  • Hi,


    I have searched how to remove default Libraries for you and here is what I find.


    To hide a default library, you need to run a script on the network to modify the Library Description file, and you need to set a Group Policy setting to hide the link to this library on the Start menu. The script should set the hidden attribute of the Library Description file (*.library-ms). This conceals the library from users in the Windows Explorer navigation pane and Items View. However, this does not hide the library in the Start menu or in the Include in Library option in the context menu. This also does not prevent the user from opening the library from an application or the Library application programming interface (API).


    The following example script hides the Pictures library:

    @echo off
    
    %systemdrive%
    
    cd\
    
    cd %appdata%\Microsoft\Windows\Libraries
    
    attrib +h Pictures.library-ms

    You need to set a Group Policy setting for every library that has a link you want to conceal in the Start menu. You can find these Group Policy settings under User Configuration\Administrative Templates\Start Menu and Taskbar.


    For more information, please refer to Administrative How-to Guides.


    Hope this helps.


    If a post solved your problem, click “Mark as Answer” on the post. If a post helped you, click "Vote As Helpful" on the left side of post.


    6 aprilie 2012 09:10
  • Thanks for your help. I really appreciate that you are helping me find answers.  However, I am not looking to hide a library but to modify it and remove the Public Documents, Pictures, etc. from it.  If you know of a way to remove a folder from a library by script or Group Policy, then please let me know, but I'm guessing we need Windows Server 8 or 9 for that.  The shlib program I mentioned, based on sample code from Microsoft, at least lets me remove a folder from a library, although it is buggy.

    I was merely taking a chance to ask this question, so if you don't know, that is fine and don't worry about it.

    6 aprilie 2012 11:36
  • I finally broke down and make my own solution.  From another thread of mine, I learned of a Windows API Code Pack (http://archive.msdn.microsoft.com/WindowsAPICodePack) that made the desired tasks much easier than I thought; all I had to do was wrap the functions in a command-line app.  So now I can enumerate libraries, add items to libraries, remove items from libraries, and set the default save location from script or command line with ease.

    Thanks for helping me figure out shlib, but this is much better, and I thought you should know.

    P.S. I'd still like to see Group Policy Preferences in Server 8 be able to modify libraries.

    • Editat de rpseekell 23 aprilie 2012 13:50 Future idea
    • Marcat ca răspuns de rpseekell 23 aprilie 2012 13:50
    23 aprilie 2012 13:49