旧版本

https://chocolatey.org/install

To install chocolatey now, open an administrative command prompt and paste the text from the box below that applies to the name of your shell and press enter.

第一步,在cmd里面执行一下命令

@powershell -NoProfile -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"

第二步,在PowerShell中执行

iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))

第三步,要在3.0以上的PowerShell中执行以下命令

iwr https://chocolatey.org/install.ps1 -UseBasicParsing | iex

新版本

https://chocolatey.org/docs/installation

Install with PowerShell.exe  (powershell 6.0无法运行安装命令,所以可以用win10自带的powershell 5.0运行下面的安装命令)

With PowerShell, there is an additional step. You must ensure Get-ExecutionPolicy is not Restricted. We suggest using Bypass to bypass the policy to get things installed or AllSigned for quite a bit more security.

  • Run Get-ExecutionPolicy. If it returns Restricted, then run Set-ExecutionPolicy AllSigned or Set-ExecutionPolicy Bypass -Scope Process.
  • Now run the following command:  (copy command text)
Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))

Getting latest version of the Chocolatey package for download.
Getting Chocolatey from https://chocolatey.org/api/v2/package/chocolatey/0.10.13.
Extracting C:\Users\clu\AppData\Local\Temp\chocolatey\chocInstall\chocolatey.zip to C:\Users\clu\AppData\Local\Temp\chocolatey\chocInstall...
Installing chocolatey on this machine
Creating ChocolateyInstall as an environment variable (targeting 'Machine')
Setting ChocolateyInstall to 'C:\ProgramData\chocolatey'
WARNING: It's very likely you will need to close and reopen your shell
before you can use choco.
Restricting write permissions to Administrators
We are setting up the Chocolatey package repository.
The packages themselves go to 'C:\ProgramData\chocolatey\lib'
(i.e. C:\ProgramData\chocolatey\lib\yourPackageName).
A shim file for the command line goes to 'C:\ProgramData\chocolatey\bin'
and points to an executable in 'C:\ProgramData\chocolatey\lib\yourPackageName'.

Creating Chocolatey folders if they do not already exist.

WARNING: You can safely ignore errors related to missing log files when
upgrading from a version of Chocolatey less than 0.9.9.
'Batch file could not be found' is also safe to ignore.
'The system cannot find the file specified' - also safe.
WARNING: Not setting tab completion: Profile file does not exist at
'C:\Users\clu\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1'.
Chocolatey (choco.exe) is now ready.
You can call choco from anywhere, command line or powershell by typing choco.
Run choco /? for a list of functions.
You may need to shut down and restart powershell and/or consoles
first prior to using choco.
Ensuring chocolatey commands are on the path
Ensuring chocolatey.nupkg is in the lib folder

Installing Chocolatey的更多相关文章

  1. Install chocolatey

    Requirements Windows 7+ / Windows Server 2003+ PowerShell v2+ .NET Framework 4+ (the installation wi ...

  2. 大神的vim配置

    大神的vim配置,O(∩_∩)O spf13-vim : Steve Francia's Vim Distribution __ _ _____ _ ___ _ __ / _/ |___ / __ _ ...

  3. windows chocolatey 修改默认安装软件默认安装路径

    管网解释 https://chocolatey.org/docs/features-install-directory-override 1.--install-directory=value    ...

  4. Chocolatey - Windows Software Management Automation

    What is Chocolatey? Chocolatey is a software management solution unlike anything else you've ever ex ...

  5. installing mysql,this may take a few minutes,hold on plz wdcp卡住解决办法

    centos6安装wdcp时make in progress卡住的解决办法 今天在一台centos6的vps上安装wdcp出现的这个问题,到安装程序滚动至下面这里时出现"卡死". ...

  6. MSI Error 1603 installing AppFabric 1.1 / Win7 x64

    MSI Error 1603 installing AppFabric 1.1 / Win7 x64  Archived Forums A-B > AppFabric Caching   先说解 ...

  7. [转]Installing python 2.7 on centos 6.3. Follow this sequence exactly for centos machine only

    Okay for centos 6.4 also On apu.0xdata.loc, after this install was done $ which python /usr/local/bi ...

  8. [转]Installing SharePoint 2013 on Windows Server 2012 R2

    转自:http://www.avivroth.com/2013/07/09/installing-sharepoint-2013-on-windows-server-2012-r2-preview/ ...

  9. Chocolatey

    知乎上有人提到如何节省时间, 1.自动化 2.批量化 Chocolatey (https://chocolatey.org/)是一个自动化程序安装工具.今天试用了一下 ,想想每年因为安装软件而损失的时 ...

随机推荐

  1. Junit单步调试

    单步调试:主要查看变量内容的变化 1.设置断点位置,设置在可能出现问题的代码  2.点击项目右键以Debug as方式运行程序  3.F5 --> step into 进入方法内部进行调试    ...

  2. android 学习随笔十二(网络:使用异步HttpClient框架)

    使用异步HttpClient框架发送get.post请求 在https://github.com/ 搜索 asyn-http https://github.com/search?utf8=✓& ...

  3. python核心编程学习记录之基础知识

    虽然对python的基础知识有所了解,但是为了更深入的学习,要对python的各种经典书籍进行学习 第一章介绍python的优缺点,略过 第二章介绍python起步,第三章介绍python基础,仅记录 ...

  4. 161128、Redis 4.0发布及其新功能介绍

    Redis 4.0-rc1 发布了,这是 4.0 的首个 RC 版.Redis 是一个高性能的key-value数据库.Redis 的出现,很大程度补偿了memcached这类keyvalue存储的不 ...

  5. Java的多线程+Socket 后台

    打包好可执行的jar文件之后, 用ftp上传到服务器, 用nohup命令, 让这个服务器在后台运行, 并将输出重定向到log文件中, 命令是: #nohup java -jar MTSServer.j ...

  6. javaWeb 使用 jsp 和 javaBean 实现计算器功能

    <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"% ...

  7. Java中如何在另一个类里面使用运行类中的对象,举例说明了一下。

    package 计时器; import java.util.Timer; import java.util.TimerTask; /* * 主要是想在另一个类里面,使用该类的对象,如何使用呢?如何传递 ...

  8. C# 控制连接超时

    首先连接超时分为三种,TCP Connection to SQL Server -> SqlConnection.Open -> SqlCommand.Execute先说第二种超时,sql ...

  9. shell小细节

    1.使用变量的时候无需首先声明其类型 2 cut 剪切数据 3.sed 定址 4.read 读取文件(管道) 5 expr 整值计算 6 lp 打印

  10. php header()函数设置页面Cache缓存

    header()函数在php的使用很大,下面我来介绍利用它实现页面缓存的一些方法,但使用header前必须注意,在它之前不能任何输出,包括空格. 手册上,我们对于cache都是写着如何设置,以便让代码 ...