Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Deployment Project Version 2005

Status
Not open for further replies.

unclecake2

Programmer
Jul 20, 2009
20
US
Hi, I have decided to build a custom update program for my programs. I have created a deployment project and it works fine as a stand alone install program.

I want to update the program based upon the version number. My question is how do I get the version from a compiled deployment project to determine if an update is required. What I do is I build the project and copy the .msi and Setup.exe to a network drive. I would like the program to look at the version on the network and prompt the user to upgrade.

For now I am having problems getting the version. I wrote the code and I am getting the version of my VS .NET program not the compiled program.
 
Unless you want to update everything every time you have an update then you will want to also check individual dlls as well to get version number of a file you can use:

Code:
Dim CurrentFileVersionInfo As FileVersionInfo
CurrentFileVersionInfo = FileVersionInfo.GetVersionInfo("C:\this.dll")

If the file version was 1.2.3.4 then

1 = CurrentFileVersionInfo.ProductMajorPart
2 = CurrentFileVersionInfo.ProductMinorPart
3 = CurrentFileVersionInfo.ProductBuildPart
4 = CurrentFileVersionInfo.ProductPrivatePart

-I hate Microsoft!
-Forever and always forward.
-My kingdom for a edit button!
 
I am not so clear on some things. When I compile my project it produces some dlls. I then create a deployment project with the compiled dlls.

I then have an .exe and a .msi file in my Release directory, which I normally put on the network. I then install that on the users computers. I am not really sure how to compare the dll version numbers, like you (Sorwen) referenced to determine if I need an update.

I am probably doing something wrong, so any suggestions would be helpful.
 
If you update based off the exe/msi version then you don't need to because unless you change the default they will automatically have any updated dlls you use in the project.

-I hate Microsoft!
-Forever and always forward.
-My kingdom for a edit button!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top