473,378 Members | 1,411 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

FileVersionInfo.GetVersionInfo for outlook add in

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 Service application

in Windows forms I have the

Application.ExecutablePath , but I don't find the same thing forother
application types

thanks
Oct 4 '06 #1
2 2796
Hi Semedao,

I'm not very clear about what do you mean by "simple way" to get
FileVersionInfo.GetVersionInfo for outlook addin. Do you mean how to get
the full path of the assembly and pass to GetVersionInfo()?

To get an assembly's full path, use following code:

System.Reflection.Assembly current =
System.Reflection.Assembly.GetExecutingAssembly();
string exe = current.GetModules()[0].FullyQualifiedName;
FileVersionInfo fi = FileVersionInfo.GetVersionInfo(exe);
Console.WriteLine(exe);
Console.WriteLine(fi.FileVersion);

I guess this also answers your second question.

Please let me know if I misunderstood your question or you need further
information.

Regards,
Walter Wang (wa****@online.microsoft.com, remove 'online.')
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.

Oct 5 '06 #2
thanks , I already solve it
"Walter Wang [MSFT]" <wa****@online.microsoft.comwrote in message
news:Df**************@TK2MSFTNGXA01.phx.gbl...
Hi Semedao,

I'm not very clear about what do you mean by "simple way" to get
FileVersionInfo.GetVersionInfo for outlook addin. Do you mean how to get
the full path of the assembly and pass to GetVersionInfo()?

To get an assembly's full path, use following code:

System.Reflection.Assembly current =
System.Reflection.Assembly.GetExecutingAssembly();
string exe = current.GetModules()[0].FullyQualifiedName;
FileVersionInfo fi = FileVersionInfo.GetVersionInfo(exe);
Console.WriteLine(exe);
Console.WriteLine(fi.FileVersion);

I guess this also answers your second question.

Please let me know if I misunderstood your question or you need further
information.

Regards,
Walter Wang (wa****@online.microsoft.com, remove 'online.')
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no
rights.

Oct 5 '06 #3

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

Similar topics

2
by: Fritz Switzer | last post by:
Can anyone provide a small snippet in C# that pulls out the Contacts in Outlook XP. I've seen a couple of examples in C++ and VB in previous newsgroup posts, but either the originals didn't work...
1
by: SLE | last post by:
Hi there, I need the setter equivalent for System.Diagnostics.FileVersionInfo.GetVersionInfo(). Has anybody implemented a SetVersionInfo()? Some example code or url would be more than...
3
by: Loyd Nelson | last post by:
I am trying to use the IsDebug property of the FileVersionInfo class at runtime to determine if the current application is a debug version. I know the current configuration that is being compiled...
0
by: NolanB | last post by:
I'm trying to use this class in a mult-threaded app (C#). I'm running on a hyper-threaded CPU (so it looks like 2 x CPUs to the OS) and there is no difference in timings when i run with 1 thread...
1
by: Jim | last post by:
Hi. I would like to validate the version string that I get from FileVersionInfo. Is there a way via the object model to do this? I am currently doing this: FileVersionInfo fileVersionInfo =...
1
by: Tyrone | last post by:
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...
10
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...
4
by: henrycortezwu | last post by:
Hi All, I'm thinking of including this method of sending attachments using the code in the link below, it uses Outlook Objects. How to send attachments in an e-mail message by using Visual Basic...
2
by: Martin Zugec | last post by:
Hello, I am trying to detect OLESelfRegister in file version info (to detect if library requires registration), but to my surprise FileVersionInfo ignores this flag :( Dim Info As...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.