How to install the Chocolate tool in Win10
Table of contents
T1: Quick start
>>Open method
>>Installation instructions
Paste the following command in cmd, hit enter, and wait for the installation:
@"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"
Wait for the online download and installation, as shown in the figure below, the download is successful
>> verify installation
Enter the command choco, display the chocolatey version number, indicating that the installation is successful
T2: Advanced usage
- introduce
- Win10 package management tool
- Chocolate official website
-
Choco command
- search - search package choco search something
- list - list packages choco list -lo
- install - install choco install baretail
- pin - pin the version of the package to prevent the package from being upgraded choco pin windirstat
- upgrade - upgrade of the installation package choco upgrade baretail
- uninstall - Uninstall the installation package choco uninstall baretail
- Install Ruby Gem - choco install compass -source ruby
- Install Python Egg - choco install sphynx -source python
- Install IIS Server Features - choco install IIS -source windowsfeatures
- Install the Webpi feature - choco install IIS7.5Express -source webpi
-
Some commonly used commands
-
list locally installed packages
choco list –local-only
-
List installed software on Windows system
-
choco list -li
-
choco list -lai
-
-
Upgrade all installed packages
choco upgrade all -y
-
Change the package installation path
When Chocolatey installs the package, the default path is based on the default path of the system. If you want to modify the installation path, you can do this:
- Execute the "Start/Run" command (or WIN + R), enter "regedit" to open the registry.
- Expand the registry to the following branch [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion], find the string named "ProgramFilesDir" in the right window, double-click to change the value "C:\Program Files" to "D:\ ProgramFiles", after confirming to exit, you can change the installation path of commonly used software.
-
Chocolatey's own upgrade
choco upgrade chocolatey
-