Yeah, there really isn't any way to get around having a version number.
However, there is a not widely published (i.e. still experimental) new syntax
(in latest drops of WiX v3) that can extract the version of a file during Bind
time. That means you could do something like:
<Product ... Version="!(bind.FileVersion.MyMainExecutableFileId)">
What that does is grab the version out of the file with the
File/@Id="MyMainExecutableFileId" (or whatever executable file you wanted) and
uses that as the Product Version. Of course, you still need to version your
executable file but you really should be doing that anyway. Reminder, this
only works in very recent builds of WiX v3.
Also, as Ken notes you can do Product/@Id="*" (that's the WiX v3 syntax, WiX v2
is all question marks) to get a different Product Code. Of course, it is a bit
more difficult to programmatically find your installed product but presumably
you don't care and just want Major Upgrades to work.
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ken MacDonald
Sent: Friday, May 02, 2008 13:54
To: Colin Bleckner
Cc: wix-users@lists.sourceforge.net
Subject: Re: [WiX-users] Allow installer to install over itself
I did something kind of like this for a very lightweight install: I made every
package into a major install, using the ??????? syntax to update the
appropriate UIDs and using a upgradecode, and generated a new version number
each time using the year, month, day, and time of day as the major/minor/rev
number, something like 2008.0502.1645 which is always a newer version than the
one installed - it seems to just install fine over the last one every time.
Details a little hazy as it's been a while, but sounds like it could work for
you.
HTH,
Ken
On Fri, May 2, 2008 at 4:42 PM, Colin Bleckner <[EMAIL PROTECTED]<mailto:[EMAIL
PROTECTED]>> wrote:
Hey guys,
I'm building an application that's going through lots of small revisions
right now. It's annoying to install, though, because we must first
uninstall the previous installation, then install the new one. I'm
trying to figure out how to fix this. The application is internal,
alpha quality stuff, so I don't want to maintain version numbers and
stuff, I think I just want an installer that can install over itself.
Is it possible to do this? I don't want to change GUIDs or version
numbers with every build, I'd just like to have an installer that copies
over the existing files and registry keys. My installation process is
pretty simple (just copying a couple files and setting a few registry
settings). I've been reading through this page, but it seems like more
than what I want or need: http://www.tramontana.co.hu/wix/lesson4.php
I naively tried adding an UpgradeCode to my product then adding an
Upgrade element that references that GUID, but I'm not sure what to do
with it. If I run the exact same installer twice in a row it installs
both times, but if I build a new installer I get the "this product is
already installed" error message. Any suggestions?
Thanks!
Colin
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net<mailto:WiX-users@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/wix-users
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users