Extended file attributes

tamandt

Member
Joined
Apr 1, 2006
Messages
13
Programming Experience
3-5
Extended file attributes (Resolved)

I am fairley new to .net, been using VB6 and C++.

I need help finding a way to get extended file attributes. Specifically I need to read the "Company" field. GetFileInfo does not seem to support this.

I need to find out this info on all EXE,OCX,and DLL's in the windows, system, and system32 directory.

Any help would be appreciated.

Thanks.
 
Last edited:
Hello,
Maybe you will think i am silly but i am afraid i do not understand your Q :(
If it's related to how to get System Information like OS version, user, company etc. you can use WMI for the purpose of simply you can do this:
VB.NET:
MessageBox.Show([SIZE=2]Environment.MachineName.ToString) [SIZE=2][COLOR=#008000]'will return company that is OS registered to[/COLOR][/SIZE][/SIZE]

Regards ;)
 
Not OS Company

Im not looking for the OS registration. Im looking for file company.

I am a programmer/pc technician/manager of technicians. I went to school for programming, ended up as a network admin.

Basically our technicians occasionally have to remove unwanted files from a pc manually. Besides deleting temp. directories this includes ocx,dll,exe in windows, system, and system32.

I need to read the file attribute "Company" such as dll's made by "Microsoft Corporation". or "Sonic"

The idea is this will list all files not on a "Safe company list" and ask them if they need be deleted. The technician will then look up each file. If the file has a company that is safe, it will be added to the safe list. if its a bad company, it will be added to the ban list. If it has no company, it will still be looked up, and individual files may be added to the list as safe or ban.

Basically back to the point, i need to read the company file attribute (which is not normally visible via explorer)

I am doing this to speed things up. Also because the technicians i manage do not feel they are capable of manually finding bad files. Although most of them are, they are just scared of deleting things they do not know.

I have done this process well over 100 times on PC's when virus scanners and spyware scanners (we use 5) do not fix a problem. I am hoping to somewhat automate the process, at least shorten the time it takes to do it.

So if anyone knows how to get extended attributes specifically "Company" your help would be appreciated.
 
FileVersionInfo class is a bit easier, wouldn't you know, it hid itself in the System.Diagnostics namespace.
VB.NET:
[SIZE=2][COLOR=#0000ff]Dim[/COLOR][/SIZE][SIZE=2] filepath [/SIZE][SIZE=2][COLOR=#0000ff]As [/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]String[/COLOR][/SIZE][SIZE=2] = [/SIZE][SIZE=2][COLOR=#800000]"c:\windows\system32\calc.exe"
[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]Dim[/COLOR][/SIZE][SIZE=2] fvi [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2] FileVersionInfo = FileVersionInfo.GetVersionInfo(filepath)
MsgBox(fvi.CompanyName)
[/SIZE]
 
Thanks

Thank you JohnH that worked perfect.

Kulrom, the only way i can describe what I mean is this.

If you hover over a dll or exe or ocx with the mouse pointer, a baloon appears that gives you detailed information about the file.

With mp3, you get cd name, author, bitrate......... all information not normally visible using windows explorer. You can of course add these fields..

The same occurs with dll...etc....
The information that I need about these files, is the companyname. The company that wrote them.

I will be doing this for every single dll, ocx, and exe in the system directories.

Thank you all for your help
 
Back
Top