Reputation: 155
I've installed Chocolatey in D:\Chocolatey
directory by following steps
https://github.com/chocolatey/choco/wiki/Installation#installing-to-a-different-location
It works, but i have to change environment variable ChocolateyInstall
and create the folder D:\Chocolatey
manually.
Is there any way do installed Chocolatey in a non-default directory just using cmd?
Upvotes: 8
Views: 9015
Reputation: 12561
setx ChocolateyInstall D:\Chocolatey /M
& setx.exe ChocolateyInstall D:\Chocolatey /M
setx ChocolateyInstall D:\Chocolatey /M && SET "ChocolateyInstall=D:\Chocolatey" && "%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"
You could simply try just SET "ChocolateyInstall=D:\Chocolatey"
and see if that works for the installation.
Upvotes: 3