Now my team working in a project using Windows Application(C#). We use MSI Installer for creating installation.
I didn't know how to pass command line parameters from MSI file & Setup.exe file.
for example
setup.msi username=demo password=pass
setup.exe username=demo password=pass
Please suggest a good example/reference
Use the /v option to pass command-line options and values of public properties through to Msiexec.exe. Note: If you pass the /v parameter at the command prompt when launching Setup.exe, any parameters that are specified for the CmdLine keyname in Setup.
As a single use solution, you can run the . msi as an administrator from the Windows command prompt. Open elevated Command Prompt. To do so, type "CMD" in Start menu or Start screen search box, and then simultaneously press Ctrl+Shift+Enter keys.
Similar to Orca, to edit your MSI package, right-click it and select “Open with Advanced Installer”. Once the MSI database has loaded in Advanced Installer, you will notice a left menu pane where you will find all the options you need to directly edit your MSI.
This Code Project article has a pretty good example of doing this.
You've got the right idea, but for the parameters to be available during the execute sequence, you'll need to pass public properties rather than private ones. Names of public properties are all uppercase.
For example, this would work:
msiexec /i setup.msi USERNAME=yourUserName PASSWORD=yourPassword
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With