Home > Back-end >  Keep different install directory on choco upgrade
Keep different install directory on choco upgrade

Time:03-03

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!

CodePudding user response:

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.

  • Related