/build/static/layout/Breadcrumb_cap_w.png

passing variables to msi

Hi,

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?

Thanks,

Matthew Millar

0 Comments   [ + ] Show comments

Answers (5)

Posted by: MSIPackager 14 years ago
3rd Degree Black Belt
0
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)

Cheers,
Rob.
Posted by: shweta_kar 14 years ago
Blue Belt
0
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 14 years ago
Senior Yellow Belt
0
@msipackager

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 [:)]

@shweta

Where abouts would i find that setting?

I'm currently using WinInstall LE.

Thanks,

Matthew
Posted by: cygan 14 years ago
Fifth Degree Brown Belt
0
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 14 years ago
Red Belt
0
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.
 
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