Menu
Below you will find a list of parameters supported by msiexec.exe. Msiexec /Option Optional Parameter Install Options Installs or configures a product. We can make the MSI install silently by using the /quiet parameter for msiexec but maybe the embedded setup also needs a parameter to run silently. Often a setup executable accepts parameters such as /S, /SILENT, or /VERYSILENT to run unattended. May 26, 2010 I am trying to pass a parameter to the msi through the command line in C#. Here it is: msiexec /I setup.msi /qn USER=Joe. I created an installer class that writes to a registry key. I have setup a Custom Action for Install that has the code to write to a registry key in it. I want to push MSI installer with parameter using SCCM server. Msiexec.exe /i 'setup.msi' INSTALLFOLDER='SpecifiedInstallationLocation' CONFIGFILE='FileName' Can I use parameter name defined by me or I have to use specific parameter name in command line? Is any specific format to pass parameter? Can I able to pass parameter to MSI installer? Alternatively, if you are using MSI package for installation, passing values are simpler. Just pass the values as key/value pair at the end of the command. Msiexec /i setup.msi PARAMETER1=Value PARAMETER1=Value. Create a custom action. Now you need to create a custom action and set it up to receive the parameters you require.
Active5 years, 9 months ago
I have a custom action inside an MSI installer that makes some changes to some configuration file. my requirement is to run the installation in silent mode so I am using msiexec.Here is the command:
myContextParameter is never passed to the custom action so when I docontext.Parameters['myContextParameter'] I get a null value.
When I run my MSI in UI mode the parameter is passed correctly. I also made sure the name of the property is correctly set in the BartoszKP
CustomActionData .
27.7k1010 gold badges7676 silver badges113113 bronze badges
user207799
4 Answers
I've been beating my head against the wall on this one, so here's what I found out:
You have to set your parameters on the commandline, as well as on the 'CustomActionData' property on each of your Custom Actions (whatever you have under Install, Commit, etc)
Your commandline will look something like this:
msiexec /i myInstaller.msi MYFIRSTPARAM=VALUE1 MYSECONDPARAM=VALUE2
Then, your CustomActionData should look like this:
/myfirstparam=[MYFIRSTPARAM] /mysecondparam=[MYSECONDPARAM]
Now, here's a bunch of special cases:
Hope that helps.
Slider345
Msiexec Pass Parameters 2016Slider345Msiexec Pass Parameters
2,51877 gold badges3131 silver badges4242 bronze badges
MixedCase Download program files. properties are 'private' and will not be passed in from the command line.
ALLCAPS properties are 'public' and can be passed in on the command line.
However only secure public properties are passed through to the 'server' (i.e. retained during UAC elevation). See the SecureCustomProperties property documentation.
Assuming you're trying to access this property in a deferred CA, this is happening on the server side so you need to use a public property (all caps) that is also marked as secure.
Here's an example using WiX:
saschabeaumontsaschabeaumont
20.5k44 gold badges5656 silver badges8383 bronze badges
If you want to be able to pass parameters from the outside you need to use ALLCAPS in your parameter names. I know it sounds weird, but try it! :-)
Klaus Byskov PedersenKlaus Byskov Pedersen
89.4k2323 gold badges165165 silver badges212212 bronze badges
I know this is an old thread, but I tried a variety of things here and it seemed that I was at a loss. I then found the following thread on msdn:
Viewing the MSI in ORCA, you can see a few entries under 'CustomAction.' These Entries will basically override the values passed in from the command prompt. If you simply delete the entries in the CustomAction Table like: 'CustomTextA_SetProperty_EDIT1' and then save the MSI (Save AS has a different behavior in ORCA). You can then pass the Property Values from the command line to the MSI. This will allow me to install remotely using msiexec and I am now be able to pass the parameters to the install via the command line. I imagine this happens because the logic for the CustomAction values is executed after having populated the property values from the command line which means that the CustomAction values overwrite the command line populated values.
Msiexec Command Line
There is also a link at the bottom of the thread to do some manipulation in VS as opposed to ORCA.
John BartelsJohn Bartels
1,82833 gold badges1515 silver badges2323 bronze badges
Comments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |