How does one retrieve the extended properties of a file such as the Subject/Author in .Net framework 4.8?

27 Views Asked by At

I am trying to locate my msi from the windows cache location and have tried the below...

private static string LocateMyMsi()
{
    var msiCacheDir = $@"{Environment.GetFolderPath(Environment.SpecialFolder.Windows)}\Installer";
    var msiFiles = Directory
        .GetFiles(msiCacheDir, "*.msi", SearchOption.TopDirectoryOnly)
        .Select(x => new FileInfo(x));
    
    foreach ( var msiFile in msiFiles)
    {
        // no method or properties to get to the extended properties like subject/author
    }
}
0

There are 0 best solutions below