1
votes

I am trying to install Neovim to the "C:/Program Files" directory via Chocolatey on Windows 7. I had previously installed Neovim via Chocolatey to a different directory ("C:/Tools"), but later uninstalled it.

cd C:/Program Files
choco install Neovim

When running these lines in Powershell (with Administrative privileges) Chocolatey successfully installs Neovim, but to the "C:/Tools" directory where it had previously been installed.

It seems Chocolatey is remembering where it had installed Neovim and ignoring the current directory. Is there a way to prevent this from occurring?

1
What did you run? Do you have remembered arguments turned on? What about the package itself? There are too many elements here to consider, so please add more context to your question. Thanks. - ferventcoder

1 Answers

2
votes

The package itself uses the ChocolateyToolsLocation environment variable to determine install location, but does not have a package parameter that lets you configure just for this package.

Look at the package files - https://chocolatey.org/packages/neovim#files. If you want a different directory, you will need to update the environment variable for ChocolateyToolsLocation to C:\Program Files, then run your installation. This will affect all package installs that use Get-ToolsLocation. HTH