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

  • 4
    点赞
  • 13
    收藏
    觉得还不错? 一键收藏
  • 8
    评论
评论 8
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值