CHOCOLATEY : windows包管理软件改变软件的默认安装位置
再次更新,买了新电脑装新软件很麻烦,又用了这个。。。
具体方法是新增一个环境变量即可,老方法应该是不能再用吧,这么久了。。。。
ChocolateyInstall
文档里写的很清楚了:
The package is installed into $env:ChocolateyInstall\lib<pkgId>. The package install location is not configurable - the package must install here for tracking, upgrade, and uninstall purposes. The software that may be installed later during this process is configurable. See Terminology to understand the difference between “package” and “software” as the terms relate to Chocolatey.
https://docs.chocolatey.org/en-us/getting-started
============================
Chocolatey 是一款非常好用的windows包管理工具,但是默认安装在c盘(如下图)非常蛋疼,那么怎么安装到E盘呢?
先在E盘新建一个文件夹,比如我新建了一个E:\Chocolatey 这个文件夹,然后
1.打开powershell(最好是管理员打开)然后输入
& setx.exe ChocolateyInstall E:\Chocolatey /M
显示: 成功: 指定的值已得到保存。
2. 然后更新环境变量
refreshenv
显示 :Refreshing environment variables from registry for cmd.exe. Please wait…Finished…
这样子 之后再安装了新的软件就可以到这里了(如下图)哦!
原来的软件可以考虑删掉了(应该吧)…
参考自:https://stackoverflow.com/questions/44754755/how-to-change-default-chocolatey-install-directory-using-cmd-only
更多推荐
所有评论(0)