How to automatically include a file version in title

Got a problem you cannot solve? Try here.
Post Reply
fletcherjames
Posts: 32
Joined: Mon Mar 13, 2006 3:36 pm
Location: Leesburg, VA
Contact:

How to automatically include a file version in title

Post by fletcherjames »

We have (manually) converted all but one of our application setups from Wise Installer, and I'm working on the last one. I have a couple of related questions:

a) I would like to display my application version in the title or another variable which can be shown during setup (i.e. "Click OK to install CrossEyes Version 4.0.020"). I would like to have that info updated automatically based on the version number of my main .dll file. This info, however, should not be allowed to affect the application name as it appears in the Add-Remove program list.

b) It would also be terrific if that version would automatically appear as the version on the setup kit (.exe or .msi) when viewing its properties in Windows Explorer (i.e. if this info could be extracted at compile time.)

In my prior (Wise) installer, I accomplished a) but not b), by saving a copy of the file to the Temp folder, and then extracting the info from there. Is there a better way to do this with InstallAware?
Fletcher James
SteveDude
Posts: 253
Joined: Wed Apr 11, 2007 6:07 pm

Edit Dialogs

Post by SteveDude »

You can just edit the Dialogs so it says $TITLE$ - $MYDLLVERSION$
fletcherjames
Posts: 32
Joined: Mon Mar 13, 2006 3:36 pm
Location: Leesburg, VA
Contact:

Post by fletcherjames »

That's part of the solution, but where do I get the info to stuff in $MYDLLVERSION$?

* Can that be gotten at compile time, and used as the version number on the setup kit?

* If not, then can it be gotten at runtime from a .DLL which has yet to be installed (i.e. pull the info from inside the package?)

* If not, then I guess I'm where I was with Wise, in this regard -- drop a copy of the .dll in a Temp folder, extract the info, and then delete the file & folder.
Fletcher James
SteveDude
Posts: 253
Joined: Wed Apr 11, 2007 6:07 pm

...

Post by SteveDude »

...haven't tried it at compile time, but you could add the dll as a support file and then read the info from there...might be the easiest. Read Help for folder. $SUPPORTFILES$ or somthing like that.

...you also could add a preqeq that would run the same compiled wise script in a filebag you are using now and read the info from that.

...if it is not a single exe, you can read it from the installation folder.

...since you rebuild it each time you change the DLL just edit the varible.

...do this before any dialogs are displayed.

You can also change the value of $TITLE$ so you do not have to edit the dialogs, but be sure to change it back before you create the shortcut or use a different varible when creating it.

I've done it this way (Not proper Syntax)...

Set $TITLE2$ = $TITLE$
Set $TITLE$ = $TITLE$ - $MYVERSION$

CreteShortcut $MYDISTRIBUTOR$\\$TITLE2$\\MyEXE.exe

Steve




With IA there is more than one way to skin a cat.
Post Reply