Menu
Mar 14, 2017 I can pass the argument well enough, at least in calling the function through powershell locally. Downloading isn't a problem, but every time I run msiexec or Start-Process, all I get is the msi help window, and no installation.
![]()
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:
Willy wonka candy game.
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.
Slider345Slider345
2,51877 gold badges3131 silver badges4242 bronze badges
MixedCase 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: Mp3 songs play online free.
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.
There is also a link at the bottom of the thread to do some manipulation in VS as opposed to ORCA.
John Bartels
Msi Install ParametersJohn Bartels
1,82833 gold badges1515 silver badges2323 bronze badges
Active1 year, 7 months ago
I want to push MSI installer with parameter using SCCM server. i.e.
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?
If I use same command in batch file then it will works properly.
MaulikMaulik
3 Answers
In general questions about SCCM or corporate deployment tools may be better answered on the StackExchange system administrator site serverfault.com. Deployment is a crucial part of development.
However, please do try to make questions as clear and specific as possible in the future, and give serverfault.com a go for topics such as this.
In addition to Phil's advice: When pushing packages out via SCCM you are not just restricted to setting properties on the command line as you indicate, you can also use transforms to configure just about anything you want in the original MSI file. Transforms are just database fragments (change sets) applied to the original MSI at install time.
Setting command line parameters (uppercase PUBLIC properties) is the 'light weight' way to configure the install of MSI files. You can only set the properties exposed and defined by the MSI file itself (you can't 'invent' your own parameters as you ask). Transforms are the 'heavy weight' way to configure MSI packages - you can basically change anything you want in the whole package (generally used for corporate deployment).
There is a longer description of setting properties and using transforms here: How to make better use of MSI files. Maybe have a quick skim, might be helpful. I think it is at least better than the above description.
The process of finding the configurable PUBLIC properties for each MSI generally involves opening the MSI and checking the Property table. Most of the time the property will be listed there, but it also happens that a property is defined only in the GUI dialogs (indicates a poorly designed MSI). You can inspect all of this using an MSI file viewer such as Orca (or another, third party tool). A vendor's web page may also contain instructions on how to deploy their MSI silently in a corporate environment. Shooting them an email and asking them for info is often a good idea. There may be configuration options you are not aware of. I used to provide a one page 'Large Scale Deployment' guide in PDF format for my setups back in the day.
A particular road block is the fact that some MSI files are badly designed and don't work properly when run in silent mode (when the entire GUI is skipped - which is what SCCM does). Resolving these design errors in MSI files can be a huge headache. It is not impossible that this is the cause of the problems you are seeing. You can find some information on this issue here: Uninstall from Control Panel is different from Remove from .msi.
So in summary:
Verbose and a bit messy, but I hope this advice and Phil's advise will help you achieve what you want.
Msiexec Pass Parameters 2016halfer
15.3k77 gold badges6363 silver badges129129 bronze badges
Msiexec Property Command LineStein ÅsmulStein Åsmul
25.6k1515 gold badges6161 silver badges129129 bronze badges
You can set two general types of properties on an msiexec.exe command line:
In reality there aren't all that many that can be usefully set.
Msiexec Pass Parameters For Windows
18.2k11 gold badge1111 silver badges2222 bronze badges
Msiexec Command Line
Will be better if you used MST instead of parameters. But if you can't make this, then SCCM fully support for public property. Just put whole command inside 'Installation Program' You have already there part of msiexec command, be default SCCM will add '/q' for quite installation. Only be aware to focus of quotation marks if your property value has spaces.
Msiexec Pass Parameters Free
AdamAdam
Msiexec Pass ParametersNot the answer you're looking for? Browse other questions tagged windows-installermsiexecsccm or ask your own question.Comments are closed.
|