Link to home
Start Free TrialLog in
Avatar of microdrainage
microdrainage

asked on

Windows Installer Public Properties

I have a Deployment project created in VS.net 2005.

I have added a Checkboxes dialog with two options, the property names of which are APP and DATA.

I use these two names as Conditions for installing different files.

How can you set the values of these two properties from the command line?  For example to do a silent install I thought I would need the following:

msiexec /i project.msi /qn APP=1 DATA=0

This doesn't work, the project is installed based on the default checkbox values.  Are these properties not public or have I got the syntax wrong?
Avatar of dctuck
dctuck
Flag of United Kingdom of Great Britain and Northern Ireland image

The properties from dialog boxes within an deployment project are used by an Installer Class within your program. This is the only way of retrieving those values.

See MSDN for info on installer classes:

http://msdn2.microsoft.com/en-us/library/system.configuration.install.installer.aspx

I don't think there's any way of passing these properties directly to an msi
Avatar of microdrainage
microdrainage

ASKER

The inabilty to alter conditions that are set by Dialogs from the command line appears to by a limitation of msi packages built by VS.net.

However there is a way around this by using two conditions.  The checkbox condition is called CHKDATA.  The command line version is called DATA.  Files are installed if ((UILevel=5) And (CHKDATA)) Or (DATA).

Messy, but it solves my problem.  Does anyone have a better solution?
ASKER CERTIFIED SOLUTION
Avatar of Computer101
Computer101
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial