How do I install Chocolatey in a different location than standard, say, even on a different partition?

I would like to install Chocolatey on a separate partition. Is this possible, or do I have to take the default C:\?
I currently have E:\ partition where I install all my software. I would like all my cinst packages to go there.
Is this just a function of changing the PATH variable, after installing Chocolatey, or do I have to do something more substantial?


You can install Chocolatey exactly where you would like, and to make that easier, there's even some information written up on the wiki for Chocolatey about that!

  1. Create a user environment variable named ChocolateyInstall and set it to the folder you want chocolatey to install to prior to installation.

  2. Create the folder manually.

  3. Install Chocolatey.

The simple and "automated" way

If you'd like to keep it simple, simply open upen an administrative session of PowerShell (if you need so), and run the following snippet. It'll do the steps above.

Set-Variable -Name "ChocolateyInstall" -Value (Read-Host -Prompt "Install location")
New-Item $ChocolateyInstall -Type Directory -Force
[Environment]::SetEnvironmentVariable("ChocolateyInstall", $ChocolateyInstall, "User")
iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))

Always be careful, and read snippets of code before executing it.