Updating DisplayVersion to reflect ARP list version

Got a problem you cannot solve? Try here.
figo
Posts: 27
Joined: Thu May 21, 2009 3:06 am
Contact:

Updating DisplayVersion to reflect ARP list version

Postby figo » Wed Apr 14, 2010 4:29 pm

I am trying to update the DisplayVersion that is displayed in the ARP list but for some reason it ALWAYS writes the version specified in the "Product Version" entry from within the "Project Settings". The problem is that since I have an automated way of generating the version number for each installer, I cannot set this variable prior to compiling the msi. I have tried passing in a #BUILDVERSION# variable and within the code set the 'VERSION' variable to the value in BUILDVERSION but that does not work. It still uses the version specified in the project settings.

Any ideas?
--------

If all else fails, Improvise!

http://www.luiscasillas.com

sdeschenes
Posts: 76
Joined: Wed Sep 12, 2007 3:34 pm

Re: Updating DisplayVersion to reflect ARP list version

Postby sdeschenes » Fri Apr 16, 2010 10:33 am

In order to set the version # of your product in ARP, you need to set the DisplayVersion value in the registry, under \SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$TITLE$.

figo
Posts: 27
Joined: Thu May 21, 2009 3:06 am
Contact:

Re: Updating DisplayVersion to reflect ARP list version

Postby figo » Fri Apr 16, 2010 12:04 pm

I am aware of what key needs to be updated, the problem is that if the $VERSION$ is updated during compilation with a specific value, the value is not being reflected in the ARP list. It still uses the value that is specified in the "Product Version" (Project Settings). Here is the code I am using:

Code: Select all

...
Set variable VERSION to 1.0.8
Write Registry Key HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$TITLE$\DisplayVersion, $VERSION$
Apply install (get result into variable SUCCESS)
...


is this a bug? Can anyone else repro?

TIA
--------



If all else fails, Improvise!



http://www.luiscasillas.com

sdeschenes
Posts: 76
Joined: Wed Sep 12, 2007 3:34 pm

Re: Updating DisplayVersion to reflect ARP list version

Postby sdeschenes » Fri Apr 16, 2010 12:18 pm

Is your installer localized?

figo
Posts: 27
Joined: Thu May 21, 2009 3:06 am
Contact:

Re: Updating DisplayVersion to reflect ARP list version

Postby figo » Fri Apr 16, 2010 12:21 pm

Sorry for my Naiveness, what do you mean by localized? I have not localized my installer via "Localized" icon within the design view.

hope this answers your question.

- L
--------



If all else fails, Improvise!



http://www.luiscasillas.com

sdeschenes
Posts: 76
Joined: Wed Sep 12, 2007 3:34 pm

Re: Updating DisplayVersion to reflect ARP list version

Postby sdeschenes » Fri Apr 16, 2010 12:46 pm

I mean localized for different languages, such as Portuguese or Spanish. If you change values stored in variables after localizing your installer, you won't see what you changed because the string files will contain the original value at the time you localized your installer. (It is rather complicated).

figo
Posts: 27
Joined: Thu May 21, 2009 3:06 am
Contact:

Re: Updating DisplayVersion to reflect ARP list version

Postby figo » Fri Apr 16, 2010 12:49 pm

I guess to answer your question: No I am not currently localizing my installer for other languages.

Are you able to reproduce this issues out of curiosity?
--------



If all else fails, Improvise!



http://www.luiscasillas.com

sdeschenes
Posts: 76
Joined: Wed Sep 12, 2007 3:34 pm

Re: Updating DisplayVersion to reflect ARP list version

Postby sdeschenes » Fri Apr 16, 2010 1:17 pm

I set the version of my setup to 1.0. In the script, I set the VERSION pre-defined variable to 2.0. After installing my setup, I went to ARP and the version of the installation is 2.0.

Now, I set a compiler variable, BUILDVER to 2.0, and in my code, set VERSION to #BUILDVER#. When I ran my setup, I had a message box display the value of VERSION and it matched the value that was set to BUILDVER. After the setup completed, I checked ARP and the version of my setup is 2.0, which is what was set in the compiler variable.

figo
Posts: 27
Joined: Thu May 21, 2009 3:06 am
Contact:

Re: Updating DisplayVersion to reflect ARP list version

Postby figo » Fri Apr 16, 2010 1:25 pm

humn... interesting.

So you did not explicitly need to write to the DisplayVersion registry location? I am pretty much doing the same thing you mentioned in your second example but I do not get the same results. I will try to step through each step and let you know my findings.

thanks for following up on this.

- L
--------



If all else fails, Improvise!



http://www.luiscasillas.com

sdeschenes
Posts: 76
Joined: Wed Sep 12, 2007 3:34 pm

Re: Updating DisplayVersion to reflect ARP list version

Postby sdeschenes » Fri Apr 16, 2010 1:37 pm

Yes, I had to write the DisplayVersion value.

I am using InstallAware 8, which doesn't write the version of the setup. I have to explicitly write the DisplayVersion. I believe in InstallAware 9, this issue was fixed.

The logic I used in my example and the logic you described in your initial post should work, regardless of InstallAware version. As you mentioned, you can't set the VERSION before compilation. It should be possible to change variables, compiler or standard, during compilation. You said you have an automated way of generating the version number of the installer. Do you build your installers using the command line?

figo
Posts: 27
Joined: Thu May 21, 2009 3:06 am
Contact:

Re: Updating DisplayVersion to reflect ARP list version

Postby figo » Fri Apr 16, 2010 1:50 pm

Yes I build my installer using the command-line. So the workflow is as follows:

1) Run NAnt scripts and generate a build number
2) as part of my NAnt script I execute the miabuild.exe with the necessary compiler variables (including the version number into a #BUILDVER#)
3) In my installer script code I Set the VERSION variable to #BUILDVER#.

I know that the VERSION variable is being updated correctly as I display the version in my dialogs. What puzzles me is that the same value is not written into DisplayVersion. Perhaps this is a bug when passing the values via command-line.

If you do not mind could you see if executing the build via command-line works for you?

TIA
--------



If all else fails, Improvise!



http://www.luiscasillas.com

sdeschenes
Posts: 76
Joined: Wed Sep 12, 2007 3:34 pm

Re: Updating DisplayVersion to reflect ARP list version

Postby sdeschenes » Fri Apr 16, 2010 2:20 pm

I built my setup using the command-line, with the BUILDVER compiler variable. After executing my setup, I checked ARP and the version # of my setup appearing in ARP is the same as the version # I set to the BUILDVER compiler variable.

As a possible workaround, instead of setting VERSION to your BUILDVERSION compiler variable, have you tried explicitly writing the DisplayVersion by setting it to #BUILDVERSION#?


Return to “Technical Support”

Who is online

Users browsing this forum: No registered users and 77 guests