473,508 Members | 2,216 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

.GetVersionInfo

I want to be able to display the attributes of a jpg file using the
fileversioninfo class.

I have tried the following code below but it doesn't work, where am i going
wrong? does it need special permissions?

FileVersionInfo FileProperties =
FileVersionInfo.GetVersionInfo(@"C:\test.txt");

Console.Write(FileProperties.FileDescription + '\n');

Console.Write(FileProperties.FileVersion + '\n');

Console.Write(FileProperties.InternalName + '\n');

Console.Write(FileProperties.OriginalFilename + '\n');

Console.Write(FileProperties.ProductName + '\n');

Console.Write(FileProperties.ProductVersion + '\n');

Console.Write(FileProperties.Language + '\n');
Nov 16 '05 #1
1 2113
There is nothing wrong with it by default text files do not have version information therefore the property is null.
Nov 16 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
5461
by: timb | last post by:
Hi, I have windows service, in the event of an exception calling (which is important enough to write away to a customer event log) i would like to write away the software version as part of the...
2
2607
by: Robert | last post by:
I have an application migrated from 1.1 to 2.0 via VS2005. Under 1.1 I could do the following to return the version information (as found in the assemblyinfo.vb file) GetVersion =...
10
3762
by: Magnus Koch | last post by:
Hi, I'm working on a little deployment app to support .Net file deployments to about 7 different locations on the network. It's somewhat intelligent in that it only deploys changed files, and...
2
2853
by: JoeB | last post by:
Hi Trying to call the following (c++) dll: void getVersionInfo( long p_lIndex, char* p_cVersionNumber, int p_iVersBufSize, char* p_cDescription, int p_iDescBufSize, BOOL& p_bCompulsory ); ...
18
2364
by: Paul Watson | last post by:
I need to call some Windows APIs. Is the only way to download ctypes or the win32 interfaces? Is there any plan to get ctypes batteries into the standard Python build?
1
1732
by: roopeman | last post by:
I wrote one program which can query processes info., it 's work well in my local Computer, but failed and got the below error when i query remote host processes,anybody can help me ? that 's when...
4
3814
by: techspirit | last post by:
Hi all, 1) I found out from the vb.net group that it is possible to get an associated icon for a file. My requirement is to display all programs from the Start Menu for the user along with the...
2
2801
by: semedao | last post by:
Hi , I am looking for the simple way to get the FileVersionInfo.GetVersionInfo for outlook add in - for the host com also I want to know how to get it in: Console application and in...
3
1387
by: nautonnier | last post by:
This may have been covered before but I didn't find anything after doing a google search. Does VS.NET 2005 have a way to put build or version numbers within aspx pages? I'm envisioning an...
0
7127
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7331
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7391
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7054
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5633
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5056
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4713
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3204
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1564
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.