473,386 Members | 1,795 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,386 software developers and data experts.

Version Number of my application

Hi

I want to check that users have the latest version of an app by checking
it's version number against that held on the server. Would anyone know how
to access this via code.

Thanks
Nov 21 '05 #1
9 1387
FileVersionInfo.GetVersionInfo(applicationPath)

"Chubbly Geezer" wrote:
Hi

I want to check that users have the latest version of an app by checking
it's version number against that held on the server. Would anyone know how
to access this via code.

Thanks

Nov 21 '05 #2
"BrianDH" <Br*****@discussions.microsoft.com> schrieb:
FileVersionInfo.GetVersionInfo(applicationPath)


.... this will only work locally, IIRC.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>
Nov 21 '05 #3
Application.ProductVersion is what you are looking for?

"Chubbly Geezer" <ch************@newsgroup.nospam> wrote in message
news:uH**************@TK2MSFTNGP10.phx.gbl...
Hi

I want to check that users have the latest version of an app by checking
it's version number against that held on the server. Would anyone know how
to access this via code.

Thanks

Nov 21 '05 #4
OK thanks. that's almost what I need.

However, if I check the values returned from 2 different files (both exactly
the same but in 2 locations) they are always different because the file
location is also returned. What I really need is to just pull back the
version number and not all the other info.

Thanks

Chubbly

"BrianDH" <Br*****@discussions.microsoft.com> wrote in message
news:ED**********************************@microsof t.com...
FileVersionInfo.GetVersionInfo(applicationPath)

"Chubbly Geezer" wrote:
Hi

I want to check that users have the latest version of an app by checking
it's version number against that held on the server. Would anyone know
how
to access this via code.

Thanks

Nov 21 '05 #5
Yes it is thanks. Can I direct that to a file held on a server to compare
versions?

Chubbly

"Siva M" <sh******@online.excite.com> wrote in message
news:OH**************@TK2MSFTNGP14.phx.gbl...
Application.ProductVersion is what you are looking for?

"Chubbly Geezer" <ch************@newsgroup.nospam> wrote in message
news:uH**************@TK2MSFTNGP10.phx.gbl...
Hi

I want to check that users have the latest version of an app by checking
it's version number against that held on the server. Would anyone know
how
to access this via code.

Thanks

Nov 21 '05 #6
You can call GetFileVersionInfo() Win32 API to get the version of the server
exe (using share path such as \\server\share\myexe.exe) and compare it with
the local one.

A sample of GetFileVersionInfo() can be found here (in C# though):
http://msdn.microsoft.com/library/de...detutorial.asp

HTH

"Chubbly Geezer" <ch************@newsgroup.nospam> wrote in message
news:e0**************@TK2MSFTNGP14.phx.gbl...
Yes it is thanks. Can I direct that to a file held on a server to compare
versions?

Chubbly

"Siva M" <sh******@online.excite.com> wrote in message
news:OH**************@TK2MSFTNGP14.phx.gbl...
Application.ProductVersion is what you are looking for?

"Chubbly Geezer" <ch************@newsgroup.nospam> wrote in message
news:uH**************@TK2MSFTNGP10.phx.gbl...
Hi

I want to check that users have the latest version of an app by checking
it's version number against that held on the server. Would anyone know
how
to access this via code.

Thanks


Nov 21 '05 #7
"Chubbly Geezer" <ch************@newsgroup.nospam> schrieb:
However, if I check the values returned from 2 different files (both
exactly the same but in 2 locations) they are always different because the
file location is also returned. What I really need is to just pull back
the version number and not all the other info.


Take a look at the members of 'FileVersionInfo' ('FileBuildPart',
'FileMinorPart', 'FileMajorPart', 'FileVersion', 'ProductBuildPart',
'ProductMinorPart', 'ProductMajorPart').

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #8
Look for the FileVersionInfo class in Help

"Chubbly Geezer" <ch************@newsgroup.nospam> wrote in message
news:uH**************@TK2MSFTNGP10.phx.gbl...
Hi

I want to check that users have the latest version of an app by checking
it's version number against that held on the server. Would anyone know how to access this via code.

Thanks

Nov 21 '05 #9

Try

Dim myFileVersionInfo As FileVersionInfo =
FileVersionInfo.GetVersionInfo("E:\Subscriptions\N EW - Subs Reporting
Install\SubsReporting.exe")

If myFileVersionInfo.ProductVersion <> Application.ProductVersion Then

If MessageBox.Show("This product has been updated and you are running an
older version." & vbCrLf & vbCrLf & "Do you wish to get the latest
updates.?", "SUBS REPORTING : WARNING !", MessageBoxButtons.YesNo,
MessageBoxIcon.Question) = DialogResult.Yes Then

Call Shell("C:\Program Files\WARC\Subs Reporting\SubsReportingUpdater.exe",
AppWinStyle.NormalNoFocus)

Application.Exit()

Else

Application.Exit()

End If

End If

myFileVersionInfo = Nothing

Catch objE As Exception

MessageBox.Show(obje.Message, "Error encountered ==> frmMenu_Load")

End Try

"Gary Dunne" <Mo*********@Eircom.Net> wrote in message
news:OD**************@TK2MSFTNGP09.phx.gbl...
Look for the FileVersionInfo class in Help

"Chubbly Geezer" <ch************@newsgroup.nospam> wrote in message
news:uH**************@TK2MSFTNGP10.phx.gbl...
Hi

I want to check that users have the latest version of an app by checking
it's version number against that held on the server. Would anyone know

how
to access this via code.

Thanks


Nov 21 '05 #10

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

Similar topics

2
by: Terence Shek | last post by:
Is there a way to set the application binding policy so that it always binds to the latest version of an assembly? I'm hoping there is a way to avoid updating the application's binding...
12
by: joanne | last post by:
how to tell application version after i installed it at client side? i did make the version and product code while doing the packaging and deployment. Thanks a lot.
9
by: Nikolay Petrov | last post by:
How to get the current version number of my app so i can put it at the title bar? TIA
5
by: Nathan | last post by:
I have a VB project with a setup project in the same solution. Each time I rebuild the setup project, I change the Version number in the setup project's properties. Is there any way for my VB...
3
by: Geoff | last post by:
Hi Can anybody help me with the following problem? I have a vb.net application which has a setup project. In the setup I can specify the version number of the application. I would like to...
9
by: shorti | last post by:
I reviewed a similar post on an older version of DB2. I was wondering if there was anything available now that is more precise in gathering the db2 version for the new v8 calls. I am running...
5
by: Lyners | last post by:
I have a VB.NET application that is deployed to an end user. I would like to display on screen the application version of the application so that I know the end user id using the latest version of...
0
by: ev951 | last post by:
I am not that familiar with XML or XSL and I am trying to sort application version number strings in an XML file that my team uses for application installations on our Linux servers. I have tried...
5
by: Mufasa | last post by:
Is there any way to get a version number of a web site? I used System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString() in 1.1 and it seemed to return a version number. When I...
14
by: Phil | last post by:
I have been using this code to display the version number, and this has worked well, but I am now changing from using the ClickOnce publishing to a proper setup project, and this no longer works. ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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
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
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...

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.