用Choco安装和管理windows应用程序的八项高频操作
1.如何求助?起手式 , 核心的一点是寻求帮助 。 choco与正常的linux命令查询大相径庭 。
比如scoop的查询是这样的:
PS C:\Users\gaowei\Videos\BibleProject> scoop help updateUsage: scoop update[options]'scoop update' updates Scoop to the latest version.'scoop update ' installs a new version of that app, if there is one.You can use '*' in place ofto update all apps.Options:-f, --forceForce update even when there isn't a newer version-g, --globalUpdate a globally installed app-i, --independentDon't install dependencies automatically-k, --no-cacheDon't use the download cache-s, --skipSkip hash validation (use with caution!)-q, --quietHide extraneous messages
但是choco却将help放置在了后面 , 而且还是single-dash , 既然如此也便只能“客随主便”了 。
PS C:\Users\gaowei\Videos\BibleProject> choco list -helpChocolatey v0.10.15List/Search CommandChocolatey will perform a search for a package local or remote. Some may prefer to use `clist` as a shortcut for `choco list`.
2.安装软件安装案例如下:
choco install sysinternalschoco install notepadplusplus googlechrome atom 7zipchoco install notepadplusplus --force --force-dependencieschoco install notepadplusplus googlechrome atom 7zip -dvfychoco install git -y --params="'/GitAndUnixToolsOnPath /NoAutoCrlf'"choco install git -y --params="'/GitAndUnixToolsOnPath /NoAutoCrlf'" --install-arguments="'/DIR=C:\git'"# Params are package parameters, passed to the package# Install args are installer arguments, appended to the silentArgs#in the package for the installer itselfchoco install nodejs.install --version 0.10.35choco install git -s "'https://somewhere/out/there'"choco install git -s "'https://somewhere/protected'" -u user -p pass
3.查阅已安装的软件【用Choco安装和管理windows应用程序的八项高频操作】查阅已安装的软件 , 不能直接输入命令:
PS C:\Users\gaowei\Videos\BibleProject> choco listChocolatey v0.10.15
系统会始终处于pending的状态 。 解决方案必须加上options:
choco list --local-onlychoco list -lichoco list -laichoco list --page=0 --page-size=25choco search gitchoco search git --source="'https://somewhere/out/there'"choco search bob -s "'https://somewhere/protected'" -u user -p pass
4.列出所有过期的软件升级apps前 , 先检查是否已经过期 。
PS C:\Users\gaowei\scoop\apps\scoop\current> choco outdatedChocolatey v0.10.15Outdated Packages Output is package name | current version | available version | pinned?adobereader|2020.012.20043|2020.012.20048|falsecalibre|4.23.0|5.3.0|falsedotnetcore3-desktop-runtime|3.1.8|3.1.9|falseKB2533623|1.0.4|2.0.0|falsemicrosoft-edge|84.0.522.63|86.0.622.56|falsepowertoys|0.21.1|0.25.0|falsevcredist140|14.26.28720.3|14.27.29112|falsevisualstudio2017buildtools|15.9.26.0|15.9.28.0|false
5.升级软件升级全部的安装程序:
PS C:\Users\gaowei\Videos\BibleProject> sudo choco upgrade all -yChocolatey v0.10.15Upgrading the following packages:allBy upgrading you accept licenses for the packages.7zip v19.0 is the latest version available based on your source(s).7zip.install v19.0 is the latest version available based on your source(s).You have adobereader v2020.012.20043 installed. Version 2020.012.20048 is available based on your source(s).Progress: Downloading adobereader 2020.012.20048... 100%adobereader v2020.012.20048 [Approved]adobereader package files upgrade completed. Performing other installation steps.TrueTrueUsing system proxy server '127.0.0.1:57356'.Downloading adobereaderfrom ''Using system proxy server '127.0.0.1:57356'.Progress: 22% - Saving 59.37 MB of 261.05 MB
升级部分程序的方法:
choco upgrade chocolateychoco upgrade notepadplusplus googlechrome atom 7zipchoco upgrade notepadplusplus googlechrome atom 7zip -dvfychoco upgrade git -y --params="'/GitAndUnixToolsOnPath /NoAutoCrlf'"choco upgrade git -y --params="'/GitAndUnixToolsOnPath /NoAutoCrlf'" --install-args="'/DIR=C:\git'"# Params are package parameters, passed to the package# Install args are installer arguments, appended to the silentArgs#in the package for the installer itselfchoco upgrade nodejs.install --version 0.10.35choco upgrade git -s "'https://somewhere/out/there'"choco upgrade git -s "'https://somewhere/protected'" -u user -p passchoco upgrade allchoco upgrade all --except="'skype,conemu'"
6.卸载软件可以卸载软件的指定版本:
choco uninstall gitchoco uninstall notepadplusplus googlechrome atom 7zipchoco uninstall notepadplusplus googlechrome atom 7zip -dvchoco uninstall ruby --version 1.8.7.37402choco uninstall nodejs.install --all-versions
比如卸载adobe-reader:
PS C:\Users\gaowei\Videos\BibleProject> sudo choco uninstall adobereaderChocolatey v0.10.15Uninstalling the following packages:adobereaderadobereader v2020.012.20048The package adobereader wants to run 'chocolateyuninstall.ps1'.Note: If you don't run this script, the installation will fail.Note: To confirm automatically next time, use '-y' or consider:choco feature enable -n allowGlobalConfirmationDo you want to run the script?([Y]es/[A]ll - yes to all/[N]o/[P]rint): Y Running auto uninstaller... Auto uninstaller has successfully uninstalled adobereader or detected previous uninstall. adobereader has been successfully uninstalled.
- 看不上|为什么还有用户看不上华为Mate40系列来看看内行人怎么说
- 采用|消息称一加9系列将推出三款新机,新增一加9E
- 会员|美容院使用会员管理软件给顾客更好的消费体验!
- 行业|现在行业内客服托管费用是怎么算的
- 闲鱼|电诉宝:“闲鱼”网络欺诈成用户投诉热点 Q3获“不建议下单”评级
- 美国|英国媒体惊叹:165个国家采用北斗将GPS替代,连美国也不例外?
- 桌面|日常使用的软件及网站分享 篇一:几个动态壁纸软件和静态壁纸网站:助你美化你的桌面
- 同轴心配合|用SolidWorks画一个直角传动,画四个零件就行
- 先别|用了周冬雨的照片,我会成为下一个被告?自媒体创作者先别自乱阵脚
- 速度|华为P50Pro或采用很吓人的拍照技术:液体镜头让对焦速度更快