Reputation: 173
I want to know about how can we get to know what parameters we can pass during a package installation using chocolatey like can we pass username,password and port during postgres installation from chocolatey repository.
Upvotes: 3
Views: 751
Reputation: 12571
So when you create a package for something like postgresql, you can use both install arguments[1] and package parameters[2]. Note that the package parameters has you add those params to the description[3].
If you are talking about existing packages from the community package repository, then you can pass install arguments directly to the installer if it is an installer package. You need to know what native switches the underlying installer supports. Those are transparent to packaging as long as they are calling choco functions. If the package has package parameters, you will find those listed in the description on the package page[3].
The nature of software installers in the Windows ecosystem is such that each piece of software is a special snowflake. Installer packages (packages that manage to the native software installers and Programs and Features), you can only go so much further than the limitations of whatever installer was used.
If an existing package you find could support some certain package params, reach out to the maintainers and file a ticket on their package source code (likely on GitHub). If you have the ability, provide a pull request with the fixes as well. That will go quite far in getting to what you need. HTH
[1] https://chocolatey.org/docs/commands-reference, see install, upgrade, and uninstall.
[2] https://chocolatey.org/docs/how-to-parse-package-parameters-argument
Upvotes: 3
Reputation: 72171
Just open up chocolatey "repo" and find the package. It is usually describing how to install it properly.
Alternatively you can examine the powershell installer file that comes with the package. From the code you can derive what you can pass to the choco install
Upvotes: 0