Page 1 of 1

A question re VARIABLES and PROPERTIES

Posted: Wed Apr 12, 2006 10:25 am
by Debstep
I set variables in my script ( initialoze them to default values) tand set these variables through the user interface.

Once I compile my project, If I look in the Properties table of the msi ( in Uncompressed form) these variables do not exist as properties. So I am assuming that these values are somehow sucked up into the Custom DLLs that are created during teh COmpile or somehow embedded in the Setup.exe part of the installation. IS there a way to actually add variables as properties to the MSI table?

I am experimenting with changing these variables from the command line at install time, both through the Setup.exe and through a MSI compiled through tthe Group policy Wizard.

Thanks for any edification as to how this process works

Posted: Wed Apr 12, 2006 1:11 pm
by MichaelNesmith
To set the values of setup variables from the command line, possibly overriding their default values in the process, specify the variables and their values as follows:

<setup.exe> <VARIABLE_1>=<VALUE_1> [ ... <VARIABLE_N>=<VALUE_N>]
In the above example, setup.exe denotes the main setup executable, VARIABLE_1 is the name of a variable to set, and VALUE_1 provides the value the variable is set to receive. You may set values for an arbitrary number of variables from the command line.

Similar to the above example, to perform an advertised install of a product, the following command line could be used:

<setup.exe> ADVERTISE=TRUE

When using the Group Policy Wizard, set the CMDLINE public MSI property for the Group Policy MSI to specify a command line, as in the examples above.

Posted: Wed Apr 12, 2006 1:40 pm
by Debstep
Thanks Michael,

So, If I am settting variables through the command line for the setup.exe, I am actually passing variables to the part of the application that is not part of the msi database right?
Variables can be used to set values used ... strings or registry settings etc, but they do not necessarily exist in the msi database as properties ( the one that exists in an uncompressed build for instance. )

So a variable can be substituted for an existing MSI Property but user variables are not necessarily created as MSI custom properties?
THe Setup portion probably passes some sort of command line (or even a transform ?) to the MSI at run time with the values of the variables?

So if the option to create custom properties in the actual msi existed, then user settings (variables) could possibly be persisted?

enquiring minds :)

regarding the commanline variables in the Group Policy Wizard...I do not have to specify my values while building the Group Policy MSI I can override any values I wish to pass at the CMDLINE for the GP MSI?
What happens If I run something like MyGP.msi /a VARIABLEA=VALUE_A VAriable_B=VALUE_B etc...

Would this command line unpack the msi to the deployment poitn AND set these variables?

Thanks again...

Posted: Wed Apr 12, 2006 1:52 pm
by MichaelNesmith
An example command line for a Group Policy Wizard generated MSI:

msiexec /i gpmsi.msi CMDLINE="VAR1=VALUE1,VAR2=VALUE2"

I do not have the answers to your earlier questions...sorry!

how to put quotes in a param value in the cmdline value

Posted: Wed Apr 19, 2006 4:16 am
by crustyzz
I would like to put quotes (") for the var1 value.
for example:

Code: Select all

 msiexec /i gpmsi.msi CMDLINE="VAR1="VALUE 1",VAR2=VALUE2"


Should I put \" instead of a simple " or may be a |" ?

Code: Select all

 msiexec /i gpmsi.msi CMDLINE="VAR1=\\"VALUE 1\\",VAR2=VALUE2"


Thanks for your help

Posted: Wed Apr 19, 2006 1:56 pm
by MichaelNesmith
Try using single quotes around the out-most MSI.

Posted: Thu Apr 20, 2006 9:52 am
by crustyzz
Excuse me but I don't understand what the out-most MSI means.
Could you give me an example please?

Posted: Thu Apr 20, 2006 12:45 pm
by MichaelNesmith
That one is the group policy MSI.

msiexec /i gpmsi.msi CMDLINE='TARGETDIR="C:\\Program Files\\My Folder"'