Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

Variable Registry


1 reply to this topic

AcidJazz

AcidJazz
  • Full Members
  • 6 posts

Posted 20 December 2006 - 16:27

In Basic MSI (and even Installscript MSI) I believe its possible to have variables for your registry entries (ie. [MAX_VERSION]). I cannot figure out for the life of me how to do that in an Installscript project. I don't even know if it is possible. I'm using InstallShield 10.5.

Oh yeah I dont want to do it in the actual script, but if that's all there is I guess that's what I have to do ;P

Edited by AcidJazz, 20 December 2006 - 16:29.


rusgrafx

rusgrafx
  • Full Members
  • 6 posts

Posted 19 March 2007 - 20:43

The variable's name should be written in angle brackets, like <MAX_VERSION>.
Here's how I use it. During the product's build process some variables are being written by the makefiles to a file called Settings.rul. This file is included in the installer by the following construct at the top of Setup.rul.

CODE
#include "Settings.rul"


In that Settings.rul file I define the value like this:

CODE
#define MAX_VERSION "3.10.000"


Then in onBegin() method I export the value, so it would be accessible from any part of the installer

CODE
FeatureSetTarget(MEDIA, "<MAX_VERSION>", MAX_VERSION);


And finally you can put <MAX_VERSION> anywhere you want in your registry's values and it will be resolved to "3.10.000".
Regards,
RUS ULANOFF