0

I'm working with powershell but I'm kinda new to this So my problem is, I have a folder full of msi-packages. If I go properties -> Details, a description can be found in the comment section. Since I don't want to click everything, I would like to list them with powershell.

Here's a Picture of the value I need

So far I got this:

get-childitem c:\windows\installer\* -include *.msi

I can't find a solution and I'm grateful for any help.

  • I found [C++ source](http://prop.codeplex.com/) to list them, but not a satisfying way of doing the same from PowerShell. Heck, didn't even find VBScript to do so, which would be trivially convertable to PowerShell. However you can use that program to get the details and parse its output from PowerShell. A bit convoluted and less than ideal, but should work. It even has CSV output if you know the properties you want beforehand. – Joey Oct 13 '15 at 07:40

1 Answers1

2

This isn't my solution; I am just pasting it here from this link

Here is some example code:

http://powershell.com/cs/blogs/tobias/archive/2011/01/07/organizing-videos-and-music.aspx

Say you had a video file: C:\video.wmv

$path = 'C:\video.wmv'
$shell = New-Object -COMObject Shell.Application
$folder = Split-Path $path
$file = Split-Path $path -Leaf
$shellfolder = $shell.Namespace($folder)
$shellfile = $shellfolder.ParseName($file)

You'll need to know what the ID of the extended attribute is. This will show you all of the IDs:

0..287 | Foreach-Object { '{0} = {1}' -f $_, $shellfolder.GetDetailsOf($null, $_) }

Once you find the one you want you can access it like this:

$shellfolder.GetDetailsOf($shellfile, 216)
InteXX
  • 6,135
  • 6
  • 43
  • 80
Kiran Reddy
  • 2,836
  • 2
  • 16
  • 20
  • 1
    you can check the [get-filemetadata script](https://gallery.technet.microsoft.com/scriptcenter/get-file-meta-data-function-f9e8d804#content) on technet – Loïc MICHEL Oct 13 '15 at 07:48
  • yes i think this one is probably what the OP wants. thx for the link @Kayasax – Kiran Reddy Oct 13 '15 at 07:55