PC Review


Reply
Thread Tools Rate Thread

Accessing File Version

 
 
Angela Spranger
Guest
Posts: n/a
 
      9th Dec 2003
I need to access the version of a file from within my C#
app. Does anyone know how to do this?
 
Reply With Quote
 
 
 
 
=?Utf-8?B?QnJ1Y2UgQmVudG9uIFttc2Z0XQ==?=
Guest
Posts: n/a
 
      9th Dec 2003
You should be able to use the FileVersionInfo clas

[C#]
public void GetFileVersion()
// Get the file version for the notepad
FileVersionInfo myFileVersionInfo = FileVersionInfo.GetVersionInfo("C:\\WINNT\\Notepad.exe")

// Print the file name and version number
textBox1.Text = "File: " + myFileVersionInfo.FileDescription + '\n'
"Version number: " + myFileVersionInfo.FileVersion


 
Reply With Quote
 
Angela Spranger
Guest
Posts: n/a
 
      10th Dec 2003
thank you

I had found a way to do it but this way was easier.



>-----Original Message-----
>You should be able to use the FileVersionInfo class
>
>
>[C#]
>public void GetFileVersion() {
> // Get the file version for the notepad.
> FileVersionInfo myFileVersionInfo =

FileVersionInfo.GetVersionInfo("C:\\WINNT\\Notepad.exe");
>
> // Print the file name and version number.
> textBox1.Text = "File: " +

myFileVersionInfo.FileDescription + '\n' +
> "Version number: " + myFileVersionInfo.FileVersion;
> }
>
>.
>

 
Reply With Quote
 
 
 
Reply

« XP PIAS | HELP »
Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
accessing contacts on older version brucerx Microsoft Outlook Contacts 5 29th Mar 2010 03:40 AM
Dynamically accessing the most current version of an assembly zumbo@gmx.net Microsoft C# .NET 1 1st Feb 2007 03:31 PM
Accessing BIOS on XP Home Version Fred Windows XP Basics 14 27th Aug 2004 03:25 PM
Accessing BIOS on XP Home Version Fred Windows XP Hardware 14 27th Aug 2004 03:25 PM
Accessing BIOS on XP Home Version Fred Windows XP Setup 14 27th Aug 2004 03:25 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:22 PM.