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
A question re VARIABLES and PROPERTIES
-
- Posts: 3452
- Joined: Thu Dec 22, 2005 7:17 pm
- Contact:
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.
<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/
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/
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...
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...
-
- Posts: 3452
- Joined: Thu Dec 22, 2005 7:17 pm
- Contact:
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!
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/
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/
how to put quotes in a param value in the cmdline value
I would like to put quotes (") for the var1 value.
for example:
Should I put \" instead of a simple " or may be a |" ?
Thanks for your help
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
-
- Posts: 3452
- Joined: Thu Dec 22, 2005 7:17 pm
- Contact:
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/
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/
-
- Posts: 3452
- Joined: Thu Dec 22, 2005 7:17 pm
- Contact:
That one is the group policy MSI.
msiexec /i gpmsi.msi CMDLINE='TARGETDIR="C:\\Program Files\\My Folder"'
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/
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/
Who is online
Users browsing this forum: No registered users and 180 guests