• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 267
  • Last Modified:

get the installer version of Visual Studio setup project

Hi,

I use Visual Basic 2005 (ASP.NET) to develop my web applications. To install them, I do setup projects with the version property set to the software version. This is the version that appears in the list of "Control Panel / Programs and Features".

Is there any way to get this information in runtime for show it to the user?

Thanks in advance, Marcelo Camarate
0
Marcelo Camarate
Asked:
Marcelo Camarate
  • 6
  • 3
1 Solution
 
DocSeltsamCommented:
Hi there,

I'd do it pragmatically and simply store the software version in your software.
You could use the version property during the buld time as far as I know.

--TheDoctor
0
 
CodeCruiserCommented:
0
 
Marcelo CamarateAuthor Commented:
Hi DocSeltsam, Thanks for your reply.

If I follow your sugestion, I have to be changing the software version in the project properties, right?

But that's exactly what I want to avoid. I already have to change the Version property in the Setup Project every new version. Would have to keep reminding myself to change it elsewhere, increasing the chances of error. That's why I'm trying to use the Version property of the Setup Project.


Hi CodeCruiser, Thanks for your reply.

I develop my web applications in ASP.NET / VB.NET 2005 and don't have ProductVersion in the Page.Application property.

Regards, Marcelo Camarate

Your sugestion
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
CodeCruiserCommented:
Are you deploying the website using a Windows Installer?
0
 
Marcelo CamarateAuthor Commented:
Hi CodeCruiser,

Sorry for reply only now but I was doing other things more urgent.

Your suggestion does not solve my problem. The only thing that I want is to get the number that is put in the version property of the Setup project, like below:

Regards, Camarate
 Version Property example
0
 
Marcelo CamarateAuthor Commented:
Hi everyone,

Can anyone help me in this challenge?

Thanks in advance, Marcelo Camarate
0
 
Marcelo CamarateAuthor Commented:
Hi everyone,

I keep waiting for some response. There is no workaround for this?

Regards, Marcelo Camarate
0
 
Marcelo CamarateAuthor Commented:
Hi everyone,

Hi everyone,

After much Internet search, I solved the problem. I created a DLL project like the following code.

Imports System.ComponentModel
Imports System.Configuration.Install
Imports System.Windows.Forms
Imports System.Security.Cryptography
Imports System.io
Imports System.IO.Stream
Imports System.Text

<RunInstaller(True)> Public Class INIFile
    Inherits System.Configuration.Install.Installer

    Dim PathApp As String

    Public Overrides Sub Install(ByVal stateSaver As System.Collections.IDictionary)

        MyBase.Install(stateSaver)

        Dim Version as string = Me.Context.Parameters.Item("VERSION")

    End Sub

End Class

Open in new window


Then I created a Custom Actions to call the DLL passing as parameter in CustonActionData /VERSION = "[ProductVersion]".

Regards, Camarate
0
 
Marcelo CamarateAuthor Commented:
Is in my last answer.
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 6
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now