how to manipulate Libraries for windows explorer

This topic contains 3 replies, has 3 voices, and was last updated by Profile photo of Vern Anderson Vern Anderson 1 year, 9 months ago.

  • Author
    Posts
  • #22954
    Profile photo of Terry Walker
    Terry Walker
    Participant

    Can anyone provide some sample powershell code for using the [url=https://msdn.microsoft.com/en-us/library/windows/desktop/dd391719.aspx]IShellLibrary[/url]? I need to create and modify Libraries in a Windows 7 / powershell 3 environment, and there seems to be no convenient way to do it.

    I've pursued 3 searches to dead ends.
    [ol]There was previously a WindowsAPICodePack hosted by Microsoft. It's gone. Versions have appeared elsewhere that claim to be copies, including github, but I can't justify downloading and running these things in my corporate environment unless it comes directly from Microsoft itself.[/ol]
    [ol]There is the [url=http://windowslibrariespsh.codeplex.com/documentation]Codeplex library[/url] that seems to simplify everything into a tidy solution. Unfortunately, it includes .dll downloads that I also can't justify in my corporate environment, because hosted by Codeplex isn't the same thing as published by Microsoft.[/ol]
    [ol]There is the possibility of using C# inline code, but I haven't been able to wrap my head around it after an hour or poking at it. A sample of working code would help me figure out the rest that I need.[/ol]

    Or... if there's some new solution that I haven't stumbled across, I'd be a happy camper to learn that too. 🙂

  • #22956
    Profile photo of Don Jones
    Don Jones
    Keymaster

    The docs suggest you're not supposed to necessarily link IShellLibrary directly, but are supposed to build a wrapper around it, which you can't really do in straight PowerShell.

  • #22957
    Profile photo of Don Jones
    Don Jones
    Keymaster

    The docs suggest you're not supposed to necessarily link IShellLibrary directly, but are supposed to build a wrapper around it, which you can't really do in straight PowerShell.

  • #23146
    Profile photo of Vern Anderson
    Vern Anderson
    Participant

    HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders possibly manipulating the registry for it, after creating a sample library you could easily replicate that with a PowerShell script.

You must be logged in to reply to this topic.