- 1 year ago
How to keep Chocolatey install params when doing an upgrade
Comment
1 / 1
To keep the installation parameters when upgrading a Chocolatey package, you can use the --params
option with the upgrade
command.
Here's an example of how to do this:
csharpchoco upgrade <package-name> --params="'/installLocation=C:\MyApp /silent'"
In this example, we're upgrading the <package-name>
package with the --params
option. The value of the --params
option is a string containing the installation parameters in the same format as you would use for a normal installation.
Note that the single quotes around the parameter string are necessary to ensure that any spaces or special characters in the parameters are interpreted correctly by the command-line shell.