views:

11

answers:

1

You should all have noticed if you right click a file in the windows explorer, there is a tab named Details. Is there any trick to get these properties, and specifically the product name, whether this is a .NET file or not, over C#?

Thank you.

+2  A: 

You can use the FileVersionInfo class for that purpose.

FileVersionInfo fvi = FileVersionInfo.GetVersionInfo(fileName);
Console.WriteLine("Product name : {0}", fvi.ProductName);
Thomas Levesque
Real nice, i haven't heard this class...so far..thanx dude. Problem is that this doesn't show anythiung on a .cab file :(
Neither does the Properties window ;)
Thomas Levesque