passing variables to msi


I saw in another MSI, that its possible to pass variables to an MSI, which will change the values of a item.

The example attached DATAPATH= to the end of the msiexec command, which consequently changed the value of a registry key within the MSI.

Is this difficult? or does WI just search the MSI for an item with the same name, and applies the new value?

Rather than controlling a registry key, i'm looking to control the value of a shortcut.

Because the software i'm trying to deploy is server based, i'm trying to make it easier for future admins, to quickly change the servers path (incase the software is migrated).

I'm hoping for something like msiexec /i "C:\foo.msi" foo="\\resources_server\foo.exe"

Which would then change the installed start menu shortcut "foo"s target to "\\resources_server\foo.exe"

Is this possible?


Matthew Millar

0 Comments   [ + ] Show comments

Answers (5)

Posted by: MSIPackager 13 years ago
3rd Degree Black Belt
Yes it's easy - you need to use a public property (as opposed to a private property) to pass the values on the command line.

A public property must be all uppercase characters e.g. SERVERPATH - you then reference it internally in your MSI / MST as [SERVERPATH]

You should initialise the property with a default value in the property table, then pass the alternative value on the command line as you saw - i.e. msiexec /i myapp.msi SERVERPATH=\\server\path /qb

Google "public properties" for more info from M$ [:)]

A word of warning though: if your package is repaired it will revert to the value in the property table, not what you passed on the command line. For this reason I prefer to create transform/s (MST) for the different configurations then install via msiexec /i myapp.msi transforms=mytransform.mst /qb (or whatever)

Posted by: shweta_kar 13 years ago
Blue Belt
To make properties reatin their value when passed through commandline during repair , just follow the below steps:

Create a system search for it.
Conditionalise AppSearch under InstallExceuteSequence table with condition as Installed.
Posted by: staffmm 13 years ago
Senior Yellow Belt

Thanks for the reply.

That makes sense, now i think about it.

I'll google public properties.

I've got alot of reading up to do about MSI.

Thanks for the help [:)]


Where abouts would i find that setting?

I'm currently using WinInstall LE.


Posted by: cygan 13 years ago
Fifth Degree Brown Belt
I've got alot of reading up to do about MSI

what you need is a

1) quick grasp of the windows installer technology
2) knowledge of the msi tables , what they do and how to populate or manipulate them
3) grasp of ORCA
4) custom actions ie immediate/ deferred (when and how to use them)
5) troubleshooting tools ie procmon, regmon, filemon, installrite, regspy, wisecompcapture etc etc
6) using properties ie private / public / system etc

this will give you a good foundation to build on
Posted by: anonymous_9363 13 years ago
Red Belt
Stumbled across this series of articles the other day. Nice backgrounder...
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login


This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ