A question re VARIABLES and PROPERTIES

Got a problem you cannot solve? Try here.
Debstep
Posts: 33
Joined: Fri Jan 06, 2006 6:28 pm

A question re VARIABLES and PROPERTIES

Postby Debstep » Wed Apr 12, 2006 10:25 am

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

MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Postby MichaelNesmith » Wed Apr 12, 2006 1:11 pm

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.
Michael Nesmith
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/

Debstep
Posts: 33
Joined: Fri Jan 06, 2006 6:28 pm

Postby Debstep » Wed Apr 12, 2006 1:40 pm

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...

MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Postby MichaelNesmith » Wed Apr 12, 2006 1:52 pm

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!
Michael Nesmith

InstallAware

Home of The Next Generation MSI Installer

Get your free copy today - http://www.installaware.com/

crustyzz
Posts: 28
Joined: Thu Mar 16, 2006 4:18 am
Location: France

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

Postby crustyzz » Wed Apr 19, 2006 4:16 am

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

MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Postby MichaelNesmith » Wed Apr 19, 2006 1:56 pm

Try using single quotes around the out-most MSI.
Michael Nesmith

InstallAware

Home of The Next Generation MSI Installer

Get your free copy today - http://www.installaware.com/

crustyzz
Posts: 28
Joined: Thu Mar 16, 2006 4:18 am
Location: France

Postby crustyzz » Thu Apr 20, 2006 9:52 am

Excuse me but I don't understand what the out-most MSI means.
Could you give me an example please?

MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Postby MichaelNesmith » Thu Apr 20, 2006 12:45 pm

That one is the group policy MSI.

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

InstallAware

Home of The Next Generation MSI Installer

Get your free copy today - http://www.installaware.com/


Return to “Technical Support”

Who is online

Users browsing this forum: No registered users and 173 guests