mu88
mu88

Reputation: 5404

Keep different install directory on choco upgrade

I've installed Firefox using Chocolatey to the different install directory C:\Software\Firefox with the following command: choco install firefox --params "/InstallDir:C:\Software\Firefox"

When upgrading Firefox via choco upgrade firefox, the Firefox installation gets moved from C:\Software\Firefox to the Firefox default C:\Program Files\Mozilla Firefox.

Can I somehow work around this behavior so that my custom install directory gets preserved even on choco upgrade?

Thanks!

Upvotes: 1

Views: 269

Answers (1)

mu88
mu88

Reputation: 5404

I had to enable the Chocolatey feature useRememberedArgumentsForUpgrades with the following command:

choco feature enable --name=useRememberedArgumentsForUpgrades

After this, the install directory was preserved even when calling choco upgrade.

Upvotes: 1

Related Questions