Notices: This section not yet converted to new layout. Download stats are rolling back out.

This is a prerelease version of Chocolatey.

Chocolatey

0.10.8-beta-20170806

Package test results are passing.

This package was approved as a trusted package on 8/7/2017.

Chocolatey is a package manager for Windows (like apt-get but for Windows). It was designed to be a decentralized framework for quickly installing applications and tools that you need. It is built on the NuGet infrastructure currently using PowerShell as its focus for delivering packages from the distros to your door, err computer.

Chocolatey is brought to you by the work and inspiration of the community, the work and thankless nights of the Chocolatey Team, with Rob heading up the direction.

You can host your own sources and add them to Chocolatey, you can extend Chocolatey's capabilities, and folks, it's only going to get better.

Information

Commands

There are quite a few commands you can call - you should check out the command reference. Here are the most common:

  • Help - choco -? or choco command -?
  • Search - choco search something
  • List - choco list -lo
  • Config - choco config list
  • Install - choco install baretail
  • Pin - choco pin windirstat
  • Outdated - choco outdated
  • Upgrade - choco upgrade baretail
  • Uninstall - choco uninstall baretail

Alternative installation sources:

  • Install ruby gem - choco install compass -source ruby
  • Install python egg - choco install sphynx -source python
  • Install windows feature - choco install IIS -source windowsfeatures
  • Install webpi feature - choco install IIS7.5Express -source webpi

More

For more advanced commands and switches, use choco -? or choco command -h. You can also look at the command reference, including how you can force a package to install the x86 version of a package.

Create Packages?

We have some great guidance on how to do that. Where? I'll give you a hint, it rhymes with socks! Docs!

In that mess there is a link to the PowerShell Chocolatey module reference.

To install Chocolatey, run the following command from the command line or from PowerShell:

C:\> choco install chocolatey --pre

To upgrade Chocolatey, run the following command from the command line or from PowerShell:

C:\> choco upgrade chocolatey --pre

Files

Hide
  • tools\chocolateyInstall.ps1 Show
    $toolsPath = (Split-Path -parent $MyInvocation.MyCommand.Definition)
    
    # ensure module loading preference is on
    $PSModuleAutoLoadingPreference = "All";
    
    $modules = Get-ChildItem $toolsPath -Filter *.psm1
    $modules | ForEach-Object {
    														$psm1File = $_.FullName;
    														$moduleName = $([System.IO.Path]::GetFileNameWithoutExtension($psm1File))
    														if (Get-Module $moduleName) {
                                  remove-module $moduleName -ErrorAction SilentlyContinue;
                                }
    														import-module -name  $psm1File;
    													}
    
    Initialize-Chocolatey
    
    # SIG # Begin signature block
    # MIIcpwYJKoZIhvcNAQcCoIIcmDCCHJQCAQExDzANBglghkgBZQMEAgEFADB5Bgor
    # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
    # KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCDhOUYDxeEVBmkS
    # m7+WPs4idLgaLYHHJ+cHUBkgO7MTKaCCF7EwggUwMIIEGKADAgECAhAECRgbX9W7
    # ZnVTQ7VvlVAIMA0GCSqGSIb3DQEBCwUAMGUxCzAJBgNVBAYTAlVTMRUwEwYDVQQK
    # EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xJDAiBgNV
    # BAMTG0RpZ2lDZXJ0IEFzc3VyZWQgSUQgUm9vdCBDQTAeFw0xMzEwMjIxMjAwMDBa
    # Fw0yODEwMjIxMjAwMDBaMHIxCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2Vy
    # dCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xMTAvBgNVBAMTKERpZ2lD
    # ZXJ0IFNIQTIgQXNzdXJlZCBJRCBDb2RlIFNpZ25pbmcgQ0EwggEiMA0GCSqGSIb3
    # DQEBAQUAA4IBDwAwggEKAoIBAQD407Mcfw4Rr2d3B9MLMUkZz9D7RZmxOttE9X/l
    # qJ3bMtdx6nadBS63j/qSQ8Cl+YnUNxnXtqrwnIal2CWsDnkoOn7p0WfTxvspJ8fT
    # eyOU5JEjlpB3gvmhhCNmElQzUHSxKCa7JGnCwlLyFGeKiUXULaGj6YgsIJWuHEqH
    # CN8M9eJNYBi+qsSyrnAxZjNxPqxwoqvOf+l8y5Kh5TsxHM/q8grkV7tKtel05iv+
    # bMt+dDk2DZDv5LVOpKnqagqrhPOsZ061xPeM0SAlI+sIZD5SlsHyDxL0xY4PwaLo
    # LFH3c7y9hbFig3NBggfkOItqcyDQD2RzPJ6fpjOp/RnfJZPRAgMBAAGjggHNMIIB
    # yTASBgNVHRMBAf8ECDAGAQH/AgEAMA4GA1UdDwEB/wQEAwIBhjATBgNVHSUEDDAK
    # BggrBgEFBQcDAzB5BggrBgEFBQcBAQRtMGswJAYIKwYBBQUHMAGGGGh0dHA6Ly9v
    # Y3NwLmRpZ2ljZXJ0LmNvbTBDBggrBgEFBQcwAoY3aHR0cDovL2NhY2VydHMuZGln
    # aWNlcnQuY29tL0RpZ2lDZXJ0QXNzdXJlZElEUm9vdENBLmNydDCBgQYDVR0fBHow
    # eDA6oDigNoY0aHR0cDovL2NybDQuZGlnaWNlcnQuY29tL0RpZ2lDZXJ0QXNzdXJl
    # ZElEUm9vdENBLmNybDA6oDigNoY0aHR0cDovL2NybDMuZGlnaWNlcnQuY29tL0Rp
    # Z2lDZXJ0QXNzdXJlZElEUm9vdENBLmNybDBPBgNVHSAESDBGMDgGCmCGSAGG/WwA
    # AgQwKjAoBggrBgEFBQcCARYcaHR0cHM6Ly93d3cuZGlnaWNlcnQuY29tL0NQUzAK
    # BghghkgBhv1sAzAdBgNVHQ4EFgQUWsS5eyoKo6XqcQPAYPkt9mV1DlgwHwYDVR0j
    # BBgwFoAUReuir/SSy4IxLVGLp6chnfNtyA8wDQYJKoZIhvcNAQELBQADggEBAD7s
    # DVoks/Mi0RXILHwlKXaoHV0cLToaxO8wYdd+C2D9wz0PxK+L/e8q3yBVN7Dh9tGS
    # dQ9RtG6ljlriXiSBThCk7j9xjmMOE0ut119EefM2FAaK95xGTlz/kLEbBw6RFfu6
    # r7VRwo0kriTGxycqoSkoGjpxKAI8LpGjwCUR4pwUR6F6aGivm6dcIFzZcbEMj7uo
    # +MUSaJ/PQMtARKUT8OZkDCUIQjKyNookAv4vcn4c10lFluhZHen6dGRrsutmQ9qz
    # sIzV6Q3d9gEgzpkxYz0IGhizgZtPxpMQBvwHgfqL2vmCSfdibq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QBnAHIAZQBlAG0AZQBuAHQAIAB3AGgAaQBjAGgAIABsAGkAbQBpAHQAIABsAGkA
    # YQBiAGkAbABpAHQAeQAgAGEAbgBkACAAYQByAGUAIABpAG4AYwBvAHIAcABvAHIA
    # YQB0AGUAZAAgAGgAZQByAGUAaQBuACAAYgB5ACAAcgBlAGYAZQByAGUAbgBjAGUA
    # LjALBglghkgBhv1sAxUwHwYDVR0jBBgwFoAUFQASKxOYspkH7R7for5XDStnAs0w
    # HQYDVR0OBBYEFGFaTSS2STKdSip5GoNL9B6Jwcp9MH0GA1UdHwR2MHQwOKA2oDSG
    # Mmh0dHA6Ly9jcmwzLmRpZ2ljZXJ0LmNvbS9EaWdpQ2VydEFzc3VyZWRJRENBLTEu
    # Y3JsMDigNqA0hjJodHRwOi8vY3JsNC5kaWdpY2VydC5jb20vRGlnaUNlcnRBc3N1
    # cmVkSURDQS0xLmNybDB3BggrBgEFBQcBAQRrMGkwJAYIKwYBBQUHMAGGGGh0dHA6
    # Ly9vY3NwLmRpZ2ljZXJ0LmNvbTBBBggrBgEFBQcwAoY1aHR0cDovL2NhY2VydHMu
    # ZGlnaWNlcnQuY29tL0RpZ2lDZXJ0QXNzdXJlZElEQ0EtMS5jcnQwDQYJKoZIhvcN
    # AQEFBQADggEBAJ0lfhszTbImgVybhs4jIA+Ah+WI//+x1GosMe06FxlxF82pG7xa
    # FjkAneNshORaQPveBgGMN/qbsZ0kfv4gpFetW7easGAm6mlXIV00Lx9xsIOUGQVr
    # NZAQoHuXx/Y/5+IRQaa9YtnwJz04HShvOlIJ8OxwYtNiS7Dgc6aSwNOOMdgv420X
    # Ewbu5AO2FKvzj0OncZ0h3RTKFV2SQdr5D4HRmXQNJsQOfxu19aDxxncGKBXp2JPl
    # VRbwuwqrHNtcSCdmyKOLChzlldquxC5ZoGHd2vNtomHpigtt7BIYvfdVVEADkitr
    # wlHCCkivsNRu4PQUCjob4489yq9qjXvc2EQwggbNMIIFtaADAgECAhAG/fkDlgOt
    # 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HoIBUgBBAG4AeQAgAHUA
    # cwBlACAAbwBmACAAdABoAGkAcwAgAEMAZQByAHQAaQBmAGkAYwBhAHQAZQAgAGMA
    # bwBuAHMAdABpAHQAdQB0AGUAcwAgAGEAYwBjAGUAcAB0AGEAbgBjAGUAIABvAGYA
    # IAB0AGgAZQAgAEQAaQBnAGkAQwBlAHIAdAAgAEMAUAAvAEMAUABTACAAYQBuAGQA
    # IAB0AGgAZQAgAFIAZQBsAHkAaQBuAGcAIABQAGEAcgB0AHkAIABBAGcAcgBlAGUA
    # bQBlAG4AdAAgAHcAaABpAGMAaAAgAGwAaQBtAGkAdAAgAGwAaQBhAGIAaQBsAGkA
    # dAB5ACAAYQBuAGQAIABhAHIAZQAgAGkAbgBjAG8AcgBwAG8AcgBhAHQAZQBkACAA
    # aABlAHIAZQBpAG4AIABiAHkAIAByAGUAZgBlAHIAZQBuAGMAZQAuMAsGCWCGSAGG
    # /WwDFTASBgNVHRMBAf8ECDAGAQH/AgEAMHkGCCsGAQUFBwEBBG0wazAkBggrBgEF
    # BQcwAYYYaHR0cDovL29jc3AuZGlnaWNlcnQuY29tMEMGCCsGAQUFBzAChjdodHRw
    # Oi8vY2FjZXJ0cy5kaWdpY2VydC5jb20vRGlnaUNlcnRBc3N1cmVkSURSb290Q0Eu
    # Y3J0MIGBBgNVHR8EejB4MDqgOKA2hjRodHRwOi8vY3JsMy5kaWdpY2VydC5jb20v
    # RGlnaUNlcnRBc3N1cmVkSURSb290Q0EuY3JsMDqgOKA2hjRodHRwOi8vY3JsNC5k
    # aWdpY2VydC5jb20vRGlnaUNlcnRBc3N1cmVkSURSb290Q0EuY3JsMB0GA1UdDgQW
    # BBQVABIrE5iymQftHt+ivlcNK2cCzTAfBgNVHSMEGDAWgBRF66Kv9JLLgjEtUYun
    # pyGd823IDzANBgkqhkiG9w0BAQUFAAOCAQEARlA+ybcoJKc4HbZbKa9Sz1LpMUer
    # Vlx71Q0LQbPv7HUfdDjyslxhopyVw1Dkgrkj0bo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h3L71+Dm6c3H5/MW2//7BLGGbaGCAg8wggIL
    # BgkqhkiG9w0BCQYxggH8MIIB+AIBATB2MGIxCzAJBgNVBAYTAlVTMRUwEwYDVQQK
    # EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xITAfBgNV
    # BAMTGERpZ2lDZXJ0IEFzc3VyZWQgSUQgQ0EtMQIQAwGaAjr/WLFr1tXq5hfwZjAJ
    # BgUrDgMCGgUAoF0wGAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAcBgkqhkiG9w0B
    # CQUxDxcNMTcwODA3MDAwNDU5WjAjBgkqhkiG9w0BCQQxFgQUwii5uAXenc/zlj3d
    # sgnuiPud2xQwDQYJKoZIhvcNAQEBBQAEggEAmO3RWpKluMe7jzZGmAnGN4s1ZjWI
    # HLcVmw2P/Q5c9NnoZAF06OYFgi2ztLR1lhqqM4oMYQnGrqz+d4nPNR80oDqZRYOJ
    # wx5UzMYQmWiLtrnmxMha13V+dqCWZe6z8c9fFtZdfELFmwRxE/imD9ejIZvtiDud
    # bXxYG704ibh2p5ScqZqkeP2QyJHD5jIisCuauCV/krVurQOTMjLBv+33OD4heXii
    # iATSMHm2b/NS6pdIK4+PQIdURYlRLHHIVB9t56ZbFiTIuPrO1wthE66K57N4sk/M
    # BiKMMWxEE7kMrKpk0E3wJIv7jH9/ogj8ilnRn9G3c4ohmRHYkrFoEvMA0g==
    # SIG # End signature block
    
  • tools\chocolateyInstall\choco.exe Show
    md5: 2875BA2C748CCA9C8DD03F3816D0CF4A | sha1: F726DD80BF6EA261AD97FB39A3394079581A93C6 | sha256: 6C0C1E9D34AA04E5E05B54F42485BF4DCBA2B4CBA2A4BD3A97F0A008D8C95B45 | sha512: 1404757535F93D002D14C1CB16338841E9D3A6B1E168753A222D1B4D9F38B237182B98B34F03B44AC23FE8A94581A2BC337CDDEFFD701E22ACDE968CE8136A7F
  • tools\chocolateyInstall\choco.exe.ignore
  • tools\chocolateyInstall\choco.exe.manifest Show
    <?xml version="1.0" encoding="utf-8"?>
    <asmv1:assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1" xmlns:asmv1="urn:schemas-microsoft-com:asm.v1" xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <assemblyIdentity version="1.0.0.0" name="choco.app"/>
      <trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
        <security>
          <requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
            <!-- UAC Manifest Options
                Specifying requestedExecutionLevel node (below) will disable file and 
                 registry virtualization.
               
                Set level to "asInvoker" when you want choco to run under the context
                 of the user invoking. This is the same as Chocolatey behavior prior 
                 to 0.10.4 and after 0.10.7.
                 
                Set level to "requireAdministrator" to only allow administrators to 
                 run Chocolatey.
                
                Set level to "highestAvailable" to allow non-admins to run in 
                 non-administrative context, but require administrators to always run
                 with administrative privileges. This is the recommended and default
                 behavior of Chocolatey v0.10.4-0.10.6.1.
                
                NOTE: Currently you will need to make this change every time 
                 Chocolatey is re-installed or upgraded (every new version). At least
                 for now - https://github.com/chocolatey/choco/issues/1206
                
                The following is an unsupported use case: If you want to utilize File 
                 and Registry Virtualization for backward compatibility then delete 
                 the requestedExecutionLevel node.
            -->
            <requestedExecutionLevel level="asInvoker" uiAccess="false" />
          </requestedPrivileges>
        </security>
      </trustInfo>
      
      <compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
        <application>
          <!-- Windows 10 / Windows Server 2016 -->
          <supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}" />
          <!-- Windows 8.1 / Windows Server 2012 R2 -->
          <supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/>
          <!-- Windows 8 / Windows Server 2012 -->
          <supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/>
          <!-- Windows 7 / Windows Server 2008 R2 -->
          <supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>
          <!-- Windows Vista / Windows Server 2008 -->
          <supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/>
        </application>
      </compatibility>
    </asmv1:assembly>
    
  • tools\chocolateyInstall\choco.pdb
  • tools\chocolateyInstall\CREDITS.txt Show
    <!-- TOC -->
    
    - [Committers & Contributors](#committers--contributors)
      - [Committers](#committers)
      - [Chocolatey Community Team](#chocolatey-community-team)
      - [Contributors](#contributors)
      - [Other Contributors](#other-contributors)
    - [Third Party Licenses - Development](#third-party-licenses---development)
    - [Third Party Licenses - Runtime](#third-party-licenses---runtime)
      - [7-Zip](#7-zip)
      - [AlphaFS](#alphafs)
      - [Checksum](#checksum)
      - [log4net](#log4net)
      - [Microsoft.Web.Xdt](#microsoftwebxdt)
      - [NuGet.Core (modified)](#nugetcore-modified)
      - [Rhino.Licensing (modified)](#rhinolicensing-modified)
      - [Rx (Reactive Extensions)](#rx-reactive-extensions)
      - [Shim Generator (shimgen)](#shim-generator-shimgen)
      - [SimpleInjector](#simpleinjector)
    
    <!-- /TOC -->
    
    ## Committers & Contributors
    Chocolatey has been the the thoughts, ideas, and work of a large community. While [Rob](https://github.com/ferventcoder) heads up direction and plays a primary role in development, there are several people that have really been a part of making Chocolatey what it is today.
    
    
    ### Committers
    These are the committers to Chocolatey/Choco repositories:
    
     * [Core Development Team](https://github.com/orgs/chocolatey/teams/developers)
       * [Rob Reynolds](https://github.com/ferventcoder) - Creator of Chocolatey, committer, vision, direction, community feed moderator
       * [Gary Ewan Park](https://github.com/gep13) - Committer, Chocolatey GUI, community feed moderator
       * [Matt Wrock](https://github.com/mwrock) - Committer, Creator of BoxStarter, community feed moderator
       * [Rich Siegel](https://github.com/rismoney) - Committer, Creator of Puppet provider
       * [Richard Simpson](https://github.com/RichiCoder1) - created and maintains the new Chocolatey GUI
    
    ### Chocolatey Community Team
    The Chocolatey Community Team includes the committers and adds these fine folks:
    
    * [Community Package Repository Moderation Team](https://github.com/orgs/chocolatey/teams/community-moderators)
    * [Chocolatey Core Community Maintainers Team](https://github.com/orgs/chocolatey/teams/community-maintainers)
    
    ### Contributors
     * [choco.exe](https://github.com/chocolatey/choco/graphs/contributors)
     * [Original Chocolatey - POSH choco](https://github.com/chocolatey/chocolatey/graphs/contributors)
     * [Community Package Repository / Chocolatey.org](https://github.com/chocolatey/chocolatey.org/graphs/contributors)
    
    ### Other Contributors
    **NOTE: NEEDS UPDATED**
    
     * Nekresh (https://github.com/nekresh) - Contributing code and ideas on direction
     * Chris Ortman (https://github.com/chrisortman) - package contributions and thoughts on where to take it
     * Svein Arne Ackenhausen (https://github.com/acken) - suggestions and thoughts on features and packages
     * Marcel Hoyer - suggestions on making this stuff work without administrative access to a machine
     * Jason Jarrett (https://github.com/staxmanade) - contributing code and ideas
    
    ## Third Party Licenses - Development
    Choco is built, tested and analyzed with the following fantastic frameworks (in no particular order):
    
     * ILMerge
     * UppercuT (NAnt)
     * PublishedApplications
     * NuGet.exe
    
    Choco is tested and analyzed with the following rockstar frameworks (in no particular order):
    
     * bdddoc
     * NUnit
     * Moq
     * TinySpec
     * Should
     * OpenCover
     * ReportGenerator
    
    We would like to credit other super sweet tools/frameworks that aid in the development of choco:
    
     * ReSharper
     * NuGet Framework
    
    ## Third Party Licenses - Runtime
    Chocolatey open source uses a number of 3rd party components. Their details are below (order is alphabetical).
    
    <!-- TOC -->
    
    - [7-Zip](#7-zip)
    - [AlphaFS](#alphafs)
    - [Checksum](#checksum)
    - [log4net](#log4net)
    - [Microsoft.Web.Xdt](#microsoftwebxdt)
    - [NuGet.Core (modified)](#nugetcore-modified)
    - [Rhino.Licensing (modified)](#rhinolicensing-modified)
    - [Rx (Reactive Extensions)](#rx-reactive-extensions)
    - [Shim Generator (shimgen)](#shim-generator-shimgen)
    - [SimpleInjector](#simpleinjector)
    
    <!-- /TOC -->
    
    ### 7-Zip
    Chocolatey uses [7-Zip](http://www.7-zip.org/) for uncompressing archives. [License terms](http://www.7-zip.org/license.txt):
    
    ~~~
      7-Zip
    
      License for use and distribution
      --------------------------------
    
      7-Zip Copyright (C) 1999-2016 Igor Pavlov.
    
      Licenses for files are:
    
        1) 7z.dll: GNU LGPL + unRAR restriction
        2) All other files:  GNU LGPL
    
      The GNU LGPL + unRAR restriction means that you must follow both
      GNU LGPL rules and unRAR restriction rules.
    
    
      Note:
        You can use 7-Zip on any computer, including a computer in a commercial
        organization. You don't need to register or pay for 7-Zip.
    
    
      GNU LGPL information
      --------------------
    
        This library is free software; you can redistribute it and/or
        modify it under the terms of the GNU Lesser General Public
        License as published by the Free Software Foundation; either
        version 2.1 of the License, or (at your option) any later version.
    
        This library is distributed in the hope that it will be useful,
        but WITHOUT ANY WARRANTY; without even the implied warranty of
        MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
        Lesser General Public License for more details.
    
        You can receive a copy of the GNU Lesser General Public License from
        http://www.gnu.org/
    
    
      unRAR restriction
      -----------------
    
        The decompression engine for RAR archives was developed using source
        code of unRAR program.
        All copyrights to original unRAR code are owned by Alexander Roshal.
    
        The license for original unRAR code has the following restriction:
    
          The unRAR sources cannot be used to re-create the RAR compression algorithm,
          which is proprietary. Distribution of modified unRAR sources in separate form
          or as a part of other software is permitted, provided that it is clearly
          stated in the documentation and source comments that the code may
          not be used to develop a RAR (WinRAR) compatible archiver.
    
    
      --
      Igor Pavlov
    
    ~~~
    
    ### AlphaFS
    Chocolatey uses [AlphaFS](https://github.com/alphaleonis/AlphaFS) for long file paths. [License terms](https://github.com/alphaleonis/AlphaFS/blob/7e597b58a5109ee820766a176ffa489c1411b6aa/LICENSE.md):
    
    ~~~
      The MIT License (MIT)
      =====================
    
      Copyright (c) 2008-2016 Peter Palotas, Jeffrey Jangli, Alexandr Normuradov
    
      Permission is hereby granted, free of charge, to any person obtaining a copy of this
      software and associated documentation files (the "Software"), to deal in the Software
      without restriction, including without limitation the rights to use, copy, modify, merge,
      publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to
      whom the Software is furnished to do so, subject to the following conditions:
    
      The above copyright notice and this permission notice shall be included in all copies or
      substantial portions of the Software.
    
      THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
      BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
      NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
      DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
      OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
    ~~~
    
    ### Checksum
    Chocolatey uses [Checksum](https://github.com/ferventcoder/checksum) to determine checksums. [License terms](https://github.com/ferventcoder/checksum/blob/e6f5645610c7bc15084b48f69d4cdb056106f956/LICENSE):
    
    ~~~
                                     Apache License
                               Version 2.0, January 2004
                            http://www.apache.org/licenses/
    
       TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
    
       1. Definitions.
    
          "License" shall mean the terms and conditions for use, reproduction,
          and distribution as defined by Sections 1 through 9 of this document.
    
          "Licensor" shall mean the copyright owner or entity authorized by
          the copyright owner that is granting the License.
    
          "Legal Entity" shall mean the union of the acting entity and all
          other entities that control, are controlled by, or are under common
          control with that entity. For the purposes of this definition,
          "control" means (i) the power, direct or indirect, to cause the
          direction or management of such entity, whether by contract or
          otherwise, or (ii) ownership of fifty percent (50%) or more of the
          outstanding shares, or (iii) beneficial ownership of such entity.
    
          "You" (or "Your") shall mean an individual or Legal Entity
          exercising permissions granted by this License.
    
          "Source" form shall mean the preferred form for making modifications,
          including but not limited to software source code, documentation
          source, and configuration files.
    
          "Object" form shall mean any form resulting from mechanical
          transformation or translation of a Source form, including but
          not limited to compiled object code, generated documentation,
          and conversions to other media types.
    
          "Work" shall mean the work of authorship, whether in Source or
          Object form, made available under the License, as indicated by a
          copyright notice that is included in or attached to the work
          (an example is provided in the Appendix below).
    
          "Derivative Works" shall mean any work, whether in Source or Object
          form, that is based on (or derived from) the Work and for which the
          editorial revisions, annotations, elaborations, or other modifications
          represent, as a whole, an original work of authorship. For the purposes
          of this License, Derivative Works shall not include works that remain
          separable from, or merely link (or bind by name) to the interfaces of,
          the Work and Derivative Works thereof.
    
          "Contribution" shall mean any work of authorship, including
          the original version of the Work and any modifications or additions
          to that Work or Derivative Works thereof, that is intentionally
          submitted to Licensor for inclusion in the Work by the copyright owner
          or by an individual or Legal Entity authorized to submit on behalf of
          the copyright owner. For the purposes of this definition, "submitted"
          means any form of electronic, verbal, or written communication sent
          to the Licensor or its representatives, including but not limited to
          communication on electronic mailing lists, source code control systems,
          and issue tracking systems that are managed by, or on behalf of, the
          Licensor for the purpose of discussing and improving the Work, but
          excluding communication that is conspicuously marked or otherwise
          designated in writing by the copyright owner as "Not a Contribution."
    
          "Contributor" shall mean Licensor and any individual or Legal Entity
          on behalf of whom a Contribution has been received by Licensor and
          subsequently incorporated within the Work.
    
       2. Grant of Copyright License. Subject to the terms and conditions of
          this License, each Contributor hereby grants to You a perpetual,
          worldwide, non-exclusive, no-charge, royalty-free, irrevocable
          copyright license to reproduce, prepare Derivative Works of,
          publicly display, publicly perform, sublicense, and distribute the
          Work and such Derivative Works in Source or Object form.
    
       3. Grant of Patent License. Subject to the terms and conditions of
          this License, each Contributor hereby grants to You a perpetual,
          worldwide, non-exclusive, no-charge, royalty-free, irrevocable
          (except as stated in this section) patent license to make, have made,
          use, offer to sell, sell, import, and otherwise transfer the Work,
          where such license applies only to those patent claims licensable
          by such Contributor that are necessarily infringed by their
          Contribution(s) alone or by combination of their Contribution(s)
          with the Work to which such Contribution(s) was submitted. If You
          institute patent litigation against any entity (including a
          cross-claim or counterclaim in a lawsuit) alleging that the Work
          or a Contribution incorporated within the Work constitutes direct
          or contributory patent infringement, then any patent licenses
          granted to You under this License for that Work shall terminate
          as of the date such litigation is filed.
    
       4. Redistribution. You may reproduce and distribute copies of the
          Work or Derivative Works thereof in any medium, with or without
          modifications, and in Source or Object form, provided that You
          meet the following conditions:
    
          (a) You must give any other recipients of the Work or
              Derivative Works a copy of this License; and
    
          (b) You must cause any modified files to carry prominent notices
              stating that You changed the files; and
    
          (c) You must retain, in the Source form of any Derivative Works
              that You distribute, all copyright, patent, trademark, and
              attribution notices from the Source form of the Work,
              excluding those notices that do not pertain to any part of
              the Derivative Works; and
    
          (d) If the Work includes a "NOTICE" text file as part of its
              distribution, then any Derivative Works that You distribute must
              include a readable copy of the attribution notices contained
              within such NOTICE file, excluding those notices that do not
              pertain to any part of the Derivative Works, in at least one
              of the following places: within a NOTICE text file distributed
              as part of the Derivative Works; within the Source form or
              documentation, if provided along with the Derivative Works; or,
              within a display generated by the Derivative Works, if and
              wherever such third-party notices normally appear. The contents
              of the NOTICE file are for informational purposes only and
              do not modify the License. You may add Your own attribution
              notices within Derivative Works that You distribute, alongside
              or as an addendum to the NOTICE text from the Work, provided
              that such additional attribution notices cannot be construed
              as modifying the License.
    
          You may add Your own copyright statement to Your modifications and
          may provide additional or different license terms and conditions
          for use, reproduction, or distribution of Your modifications, or
          for any such Derivative Works as a whole, provided Your use,
          reproduction, and distribution of the Work otherwise complies with
          the conditions stated in this License.
    
       5. Submission of Contributions. Unless You explicitly state otherwise,
          any Contribution intentionally submitted for inclusion in the Work
          by You to the Licensor shall be under the terms and conditions of
          this License, without any additional terms or conditions.
          Notwithstanding the above, nothing herein shall supersede or modify
          the terms of any separate license agreement you may have executed
          with Licensor regarding such Contributions.
    
       6. Trademarks. This License does not grant permission to use the trade
          names, trademarks, service marks, or product names of the Licensor,
          except as required for reasonable and customary use in describing the
          origin of the Work and reproducing the content of the NOTICE file.
    
       7. Disclaimer of Warranty. Unless required by applicable law or
          agreed to in writing, Licensor provides the Work (and each
          Contributor provides its Contributions) on an "AS IS" BASIS,
          WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
          implied, including, without limitation, any warranties or conditions
          of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
          PARTICULAR PURPOSE. You are solely responsible for determining the
          appropriateness of using or redistributing the Work and assume any
          risks associated with Your exercise of permissions under this License.
    
       8. Limitation of Liability. In no event and under no legal theory,
          whether in tort (including negligence), contract, or otherwise,
          unless required by applicable law (such as deliberate and grossly
          negligent acts) or agreed to in writing, shall any Contributor be
          liable to You for damages, including any direct, indirect, special,
          incidental, or consequential damages of any character arising as a
          result of this License or out of the use or inability to use the
          Work (including but not limited to damages for loss of goodwill,
          work stoppage, computer failure or malfunction, or any and all
          other commercial damages or losses), even if such Contributor
          has been advised of the possibility of such damages.
    
       9. Accepting Warranty or Additional Liability. While redistributing
          the Work or Derivative Works thereof, You may choose to offer,
          and charge a fee for, acceptance of support, warranty, indemnity,
          or other liability obligations and/or rights consistent with this
          License. However, in accepting such obligations, You may act only
          on Your own behalf and on Your sole responsibility, not on behalf
          of any other Contributor, and only if You agree to indemnify,
          defend, and hold each Contributor harmless for any liability
          incurred by, or claims asserted against, such Contributor by reason
          of your accepting any such warranty or additional liability.
    
          END OF TERMS AND CONDITIONS
    
    ~~~
    
    ### log4net
    Chocolatey uses [log4net](http://logging.apache.org/log4net/) for logging. [License terms](http://logging.apache.org/log4net/license.html):
    
    ~~~
                                     Apache License
                               Version 2.0, January 2004
                            http://www.apache.org/licenses/
    
       TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
    
       1. Definitions.
    
          "License" shall mean the terms and conditions for use, reproduction,
          and distribution as defined by Sections 1 through 9 of this document.
    
          "Licensor" shall mean the copyright owner or entity authorized by
          the copyright owner that is granting the License.
    
          "Legal Entity" shall mean the union of the acting entity and all
          other entities that control, are controlled by, or are under common
          control with that entity. For the purposes of this definition,
          "control" means (i) the power, direct or indirect, to cause the
          direction or management of such entity, whether by contract or
          otherwise, or (ii) ownership of fifty percent (50%) or more of the
          outstanding shares, or (iii) beneficial ownership of such entity.
    
          "You" (or "Your") shall mean an individual or Legal Entity
          exercising permissions granted by this License.
    
          "Source" form shall mean the preferred form for making modifications,
          including but not limited to software source code, documentation
          source, and configuration files.
    
          "Object" form shall mean any form resulting from mechanical
          transformation or translation of a Source form, including but
          not limited to compiled object code, generated documentation,
          and conversions to other media types.
    
          "Work" shall mean the work of authorship, whether in Source or
          Object form, made available under the License, as indicated by a
          copyright notice that is included in or attached to the work
          (an example is provided in the Appendix below).
    
          "Derivative Works" shall mean any work, whether in Source or Object
          form, that is based on (or derived from) the Work and for which the
          editorial revisions, annotations, elaborations, or other modifications
          represent, as a whole, an original work of authorship. For the purposes
          of this License, Derivative Works shall not include works that remain
          separable from, or merely link (or bind by name) to the interfaces of,
          the Work and Derivative Works thereof.
    
          "Contribution" shall mean any work of authorship, including
          the original version of the Work and any modifications or additions
          to that Work or Derivative Works thereof, that is intentionally
          submitted to Licensor for inclusion in the Work by the copyright owner
          or by an individual or Legal Entity authorized to submit on behalf of
          the copyright owner. For the purposes of this definition, "submitted"
          means any form of electronic, verbal, or written communication sent
          to the Licensor or its representatives, including but not limited to
          communication on electronic mailing lists, source code control systems,
          and issue tracking systems that are managed by, or on behalf of, the
          Licensor for the purpose of discussing and improving the Work, but
          excluding communication that is conspicuously marked or otherwise
          designated in writing by the copyright owner as "Not a Contribution."
    
          "Contributor" shall mean Licensor and any individual or Legal Entity
          on behalf of whom a Contribution has been received by Licensor and
          subsequently incorporated within the Work.
    
       2. Grant of Copyright License. Subject to the terms and conditions of
          this License, each Contributor hereby grants to You a perpetual,
          worldwide, non-exclusive, no-charge, royalty-free, irrevocable
          copyright license to reproduce, prepare Derivative Works of,
          publicly display, publicly perform, sublicense, and distribute the
          Work and such Derivative Works in Source or Object form.
    
       3. Grant of Patent License. Subject to the terms and conditions of
          this License, each Contributor hereby grants to You a perpetual,
          worldwide, non-exclusive, no-charge, royalty-free, irrevocable
          (except as stated in this section) patent license to make, have made,
          use, offer to sell, sell, import, and otherwise transfer the Work,
          where such license applies only to those patent claims licensable
          by such Contributor that are necessarily infringed by their
          Contribution(s) alone or by combination of their Contribution(s)
          with the Work to which such Contribution(s) was submitted. If You
          institute patent litigation against any entity (including a
          cross-claim or counterclaim in a lawsuit) alleging that the Work
          or a Contribution incorporated within the Work constitutes direct
          or contributory patent infringement, then any patent licenses
          granted to You under this License for that Work shall terminate
          as of the date such litigation is filed.
    
       4. Redistribution. You may reproduce and distribute copies of the
          Work or Derivative Works thereof in any medium, with or without
          modifications, and in Source or Object form, provided that You
          meet the following conditions:
    
          (a) You must give any other recipients of the Work or
              Derivative Works a copy of this License; and
    
          (b) You must cause any modified files to carry prominent notices
              stating that You changed the files; and
    
          (c) You must retain, in the Source form of any Derivative Works
              that You distribute, all copyright, patent, trademark, and
              attribution notices from the Source form of the Work,
              excluding those notices that do not pertain to any part of
              the Derivative Works; and
    
          (d) If the Work includes a "NOTICE" text file as part of its
              distribution, then any Derivative Works that You distribute must
              include a readable copy of the attribution notices contained
              within such NOTICE file, excluding those notices that do not
              pertain to any part of the Derivative Works, in at least one
              of the following places: within a NOTICE text file distributed
              as part of the Derivative Works; within the Source form or
              documentation, if provided along with the Derivative Works; or,
              within a display generated by the Derivative Works, if and
              wherever such third-party notices normally appear. The contents
              of the NOTICE file are for informational purposes only and
              do not modify the License. You may add Your own attribution
              notices within Derivative Works that You distribute, alongside
              or as an addendum to the NOTICE text from the Work, provided
              that such additional attribution notices cannot be construed
              as modifying the License.
    
          You may add Your own copyright statement to Your modifications and
          may provide additional or different license terms and conditions
          for use, reproduction, or distribution of Your modifications, or
          for any such Derivative Works as a whole, provided Your use,
          reproduction, and distribution of the Work otherwise complies with
          the conditions stated in this License.
    
       5. Submission of Contributions. Unless You explicitly state otherwise,
          any Contribution intentionally submitted for inclusion in the Work
          by You to the Licensor shall be under the terms and conditions of
          this License, without any additional terms or conditions.
          Notwithstanding the above, nothing herein shall supersede or modify
          the terms of any separate license agreement you may have executed
          with Licensor regarding such Contributions.
    
       6. Trademarks. This License does not grant permission to use the trade
          names, trademarks, service marks, or product names of the Licensor,
          except as required for reasonable and customary use in describing the
          origin of the Work and reproducing the content of the NOTICE file.
    
       7. Disclaimer of Warranty. Unless required by applicable law or
          agreed to in writing, Licensor provides the Work (and each
          Contributor provides its Contributions) on an "AS IS" BASIS,
          WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
          implied, including, without limitation, any warranties or conditions
          of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
          PARTICULAR PURPOSE. You are solely responsible for determining the
          appropriateness of using or redistributing the Work and assume any
          risks associated with Your exercise of permissions under this License.
    
       8. Limitation of Liability. In no event and under no legal theory,
          whether in tort (including negligence), contract, or otherwise,
          unless required by applicable law (such as deliberate and grossly
          negligent acts) or agreed to in writing, shall any Contributor be
          liable to You for damages, including any direct, indirect, special,
          incidental, or consequential damages of any character arising as a
          result of this License or out of the use or inability to use the
          Work (including but not limited to damages for loss of goodwill,
          work stoppage, computer failure or malfunction, or any and all
          other commercial damages or losses), even if such Contributor
          has been advised of the possibility of such damages.
    
       9. Accepting Warranty or Additional Liability. While redistributing
          the Work or Derivative Works thereof, You may choose to offer,
          and charge a fee for, acceptance of support, warranty, indemnity,
          or other liability obligations and/or rights consistent with this
          License. However, in accepting such obligations, You may act only
          on Your own behalf and on Your sole responsibility, not on behalf
          of any other Contributor, and only if You agree to indemnify,
          defend, and hold each Contributor harmless for any liability
          incurred by, or claims asserted against, such Contributor by reason
          of your accepting any such warranty or additional liability.
    
          END OF TERMS AND CONDITIONS
    ~~~
    
    ### Microsoft.Web.Xdt
    Chocolatey uses [Microsoft.Web.Xdt](https://www.nuget.org/packages/Microsoft.Web.xdt) to perform Xml Document Transformation. It is also a requirement of NuGet.Core. [License terms](https://www.microsoft.com/web/webpi/eula/microsoft_web_xmltransform.htm):
    
    ~~~
      MICROSOFT SOFTWARE LICENSE TERMS
    
      MICROSOFT.WEB.XDT
    
      These license terms are an agreement between Microsoft Corporation (or based on where you live, one of its affiliates) and you. Please read them. They apply to the software named above, which includes the media on which you received it, if any. The terms also apply to any Microsoft
    
      ·         updates,
    
      ·         supplements,
    
      ·         Internet-based services, and
    
      ·         support services
    
      for this software, unless other terms accompany those items. If so, those terms apply.
    
      By using the software, you accept these terms. If you do not accept them, do not use the software.
    
      If you comply with these license terms, you have the perpetual rights below.
    
      1.    INSTALLATION AND USE RIGHTS. You may install and use any number of copies of the software on your devices.
    
      2.    ADDITIONAL LICENSING REQUIREMENTS AND/OR USE RIGHTS.
    
      a.    Distributable Code. The software contains code that you are permitted to distribute in programs you develop if you comply with the terms below.
    
      i.  Right to Use and Distribute.  You may copy and distribute the object code form of Microsoft.Web.XmlTransform.dll file.
    
      ·         Third Party Distribution. You may permit distributors of your programs to copy and distribute the Distributable Code as part of those programs.
    
      ii.Distribution Requirements. For any Distributable Code you distribute, you must
    
      ·         add significant primary functionality to it in your programs;
    
      ·         require distributors and external end users to agree to terms that protect it at least as much as this agreement;
    
      ·         display your valid copyright notice on your programs; and
    
      ·         indemnify, defend, and hold harmless Microsoft from any claims, including attorneys’ fees, related to the distribution or use of your programs.
    
      iii.   Distribution Restrictions. You may not
    
      ·         alter any copyright, trademark or patent notice in the Distributable Code;
    
      ·         use Microsoft’s trademarks in your programs’ names or in a way that suggests your programs come from or are endorsed by Microsoft;
    
      ·         distribute Distributable Code to run on a platform other than the Windows platform;
    
      ·         include Distributable Code in malicious, deceptive or unlawful programs; or
    
      ·         modify or distribute the source code of any Distributable Code so that any part of it becomes subject to an Excluded License. An Excluded License is one that requires, as a condition of use, modification or distribution, that
    
      ·         the code be disclosed or distributed in source code form; or
    
      ·         others have the right to modify it.
    
      3.    SCOPE OF LICENSE. The software is licensed, not sold. This agreement only gives you some rights to use the software. Microsoft reserves all other rights. Unless applicable law gives you more rights despite this limitation, you may use the software only as expressly permitted in this agreement. In doing so, you must comply with any technical limitations in the software that only allow you to use it in certain ways. You may not
    
      ·         work around any technical limitations in the software;
    
      ·         reverse engineer, decompile or disassemble the software, except and only to the extent that applicable law expressly permits, despite this limitation;
    
      ·         make more copies of the software than specified in this agreement or allowed by applicable law, despite this limitation;
    
      ·         publish the software for others to copy;
    
      ·         rent, lease or lend the software; or
    
      ·         transfer the software or this agreement to any third party.
    
      4.    BACKUP COPY. You may make one backup copy of the software. You may use it only to reinstall the software.
    
      5.    DOCUMENTATION. Any person that has valid access to your computer or internal network may copy and use the documentation for your internal, reference purposes.
    
      6.    EXPORT RESTRICTIONS. The software is subject to United States export laws and regulations. You must comply with all domestic and international export laws and regulations that apply to the software. These laws include restrictions on destinations, end users and end use. For additional information, see www.microsoft.com/exporting.
    
      7.    SUPPORT SERVICES. Because this software is “as is,” we may not provide support services for it.
    
      8.    ENTIRE AGREEMENT. This agreement, and the terms for supplements, updates, Internet-based services and support services that you use, are the entire agreement for the software and support services.
    
      9.    APPLICABLE LAW.
    
      a.    United States. If you acquired the software in the United States, Washington state law governs the interpretation of this agreement and applies to claims for breach of it, regardless of conflict of laws principles. The laws of the state where you live govern all other claims, including claims under state consumer protection laws, unfair competition laws, and in tort.
    
      b.    Outside the United States. If you acquired the software in any other country, the laws of that country apply.
    
      10.  LEGAL EFFECT. This agreement describes certain legal rights. You may have other rights under the laws of your country. You may also have rights with respect to the party from whom you acquired the software. This agreement does not change your rights under the laws of your country if the laws of your country do not permit it to do so.
    
      11.  DISCLAIMER OF WARRANTY. The software is licensed “as-is.” You bear the risk of using it. Microsoft gives no express warranties, guarantees or conditions. You may have additional consumer rights or statutory guarantees under your local laws which this agreement cannot change. To the extent permitted under your local laws, Microsoft excludes the implied warranties of merchantability, fitness for a particular purpose and non-infringement.
    
      FOR AUSTRALIA – You have statutory guarantees under the Australian Consumer Law and nothing in these terms is intended to affect those rights.
    
      12.  LIMITATION ON AND EXCLUSION OF REMEDIES AND DAMAGES. You can recover from Microsoft and its suppliers only direct damages up to U.S. $5.00. You cannot recover any other damages, including consequential, lost profits, special, indirect or incidental damages.
    
      This limitation applies to
    
      ·         anything related to the software, services, content (including code) on third party Internet sites, or third party programs; and
    
      ·         claims for breach of contract, breach of warranty, guarantee or condition, strict liability, negligence, or other tort to the extent permitted by applicable law.
    
      It also applies even if Microsoft knew or should have known about the possibility of the damages. The above limitation or exclusion may not apply to you because your country may not allow the exclusion or limitation of incidental, consequential or other damages.
    ~~~
    
    ### NuGet.Core (modified)
    Chocolatey uses [NuGet.Core](https://github.com/NuGet/NuGet2) [(modified)](https://github.com/chocolatey/nuget-chocolatey) to work with packaging. [License terms](https://github.com/NuGet/NuGet2/blob/c3d1027a51b31fd0c41e9abbe90810cf1c924c9f/COPYRIGHT.txt):
    
    ~~~
      Copyright 2010-2014 Outercurve Foundation
    
      Licensed under the Apache License, Version 2.0 (the "License");
      you may not use this file except in compliance with the License.
      You may obtain a copy of the License at
    
         http://www.apache.org/licenses/LICENSE-2.0
    
      Unless required by applicable law or agreed to in writing, software
      distributed under the License is distributed on an "AS IS" BASIS,
      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      See the License for the specific language governing permissions and
      limitations under the License.
    ~~~
    
    ### Rhino.Licensing (modified)
    Chocolatey uses [Rhino.Licensing](https://github.com/ayende/rhino-licensing) [(modified)](https://github.com/ferventcoder/rhino-licensing) to work with licensing. [License terms](https://github.com/ayende/rhino-licensing/blob/1fc90c984b0c3012465a73afae0a53492c969eb5/license.txt):
    
    ~~~
      Copyright (c) 2005 - 2009 Ayende Rahien ([email protected])
      All rights reserved.
    
      Redistribution and use in source and binary forms, with or without modification,
      are permitted provided that the following conditions are met:
    
          * Redistributions of source code must retain the above copyright notice,
          this list of conditions and the following disclaimer.
          * Redistributions in binary form must reproduce the above copyright notice,
          this list of conditions and the following disclaimer in the documentation
          and/or other materials provided with the distribution.
          * Neither the name of Ayende Rahien nor the names of its
          contributors may be used to endorse or promote products derived from this
          software without specific prior written permission.
    
      THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
      ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
      WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
      DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
      FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
      DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
      SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
      CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
      OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
      THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    ~~~
    
    ### Rx (Reactive Extensions)
    Chocolatey uses [Rx](http://reactivex.io/) for schedules and internal messaging. [License terms](https://github.com/Reactive-Extensions/Rx.NET/blob/5003248b99f8bf4afc2d4f7570b5789cedda9155/LICENSE):
    
    ~~~
      Copyright (c) .NET Foundation and Contributors
      All Rights Reserved
    
      Licensed under the Apache License, Version 2.0 (the "License"); you
      may not use this file except in compliance with the License. You may
      obtain a copy of the License at
    
      http://www.apache.org/licenses/LICENSE-2.0
    
      Unless required by applicable law or agreed to in writing, software
      distributed under the License is distributed on an "AS IS" BASIS,
      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
      implied. See the License for the specific language governing permissions
      and limitations under the License.
    ~~~
    
    ### Shim Generator (shimgen)
    Chocolatey uses [shimgen](https://github.com/chocolatey/shimgen) to generate shim executables that call the original binaries. [License terms](https://github.com/chocolatey/choco/blob/782a1cd228df548661e6c4eb5bb49b347025f85a/src/chocolatey.resources/tools/shimgen.license.txt):
    
    ~~~
      Shim Generator - shimgen.exe
      Copyright (C) 2013 - 2017 RealDimensions Software, LLC ("RDS")
      ===================================================================
      Grant of License
      ===================================================================
      You may use Shim Generator ("shimgen.exe") only with the official Chocolatey
      client. The use of shimgen.exe for any other reason is strictly prohibited.
    
      If you would like to use this software for any other reason, you must obtain a
      personal or commercial license to do so. To do that you must contact RDS at
      ferventcoder.com.
    
      This software is not free to distribute apart from the Chocolatey client. If you
      would like to distribute this software outside of use through Chocolatey, you
      must receive written permission from the software owner.
    
      ===================================================================
      End-User License Agreement
      ===================================================================
      EULA - Shim Generator
    
      IMPORTANT- READ CAREFULLY: This RealDimensions Software ("RDS") End-User License
      Agreement ("EULA") is a legal agreement between you ("END USER") and RDS for all
      RDS products, controls, source code, demos, intermediate files, media, printed
      materials, and "online" or electronic documentation ("SOFTWARE PRODUCT(S)")
      contained with this distribution.
    
      RDS grants to END USER as an individual, a personal, nonexclusive license to
      install and use the SOFTWARE PRODUCT(S) for the sole purpose of use with the
      official Chocolatey client. By installing, copying, or otherwise using the
      SOFTWARE PRODUCT(S), END USER agrees to be bound by the terms of this EULA. If
      END USER does not agree to any part of the terms of this EULA, DO NOT INSTALL,
      USE, OR EVALUATE, ANY PART, FILE OR PORTION OF THE SOFTWARE PRODUCT(S).
    
      ALL SOFTWARE PRODUCT(S) are licensed not sold. If END USER is an individual,
      END USER must acquire an individual license for the SOFTWARE PRODUCT(S) from RDS
      or its authorized resellers. If END USER is an entity, END USER must acquire an
      individual license for each machine running the SOFTWARE PRODUCT(S) within your
      organization from RDS or its authorized resellers. Both Virtual and Physical
      Machines running the SOFTWARE PRODUCT(S) must be counted in the SOFTWARE
      PRODUCT(S) licenses quantity of the organization.
    
      ===================================================================
      Commercial / Personal Licensing
      ===================================================================
      Shim Generator (shimgen.exe) is also offered under personal and commercial
      licenses. You can learn more about this option by contacting RDS at
      http://ferventcoder.com
    ~~~
    
    ### SimpleInjector
    Chocolatey uses [SimpleInjector](https://simpleinjector.org/) for IoC containers. [License Terms](https://github.com/simpleinjector/SimpleInjector/blob/0687195a7691363d4b4918e36b5e4d708e88253c/licence.txt):
    
    ~~~
      Copyright (c) 2013 - 2017 Simple Injector Contributors
    
      Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
      documentation files (the "Software"), to deal in the Software without restriction, including without
      limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the
      Software, and to permit persons to whom the Software is furnished to do so, subject to the following
      conditions:
    
      The above copyright notice and this permission notice shall be included in all copies or substantial portions
      of the Software.
    
      THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
      TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
      THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
      CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
      DEALINGS IN THE SOFTWARE.
    ~~~
    
  • tools\chocolateyInstall\helpers\chocolateyInstaller.psm1 Show
    # Copyright © 2017 Chocolatey Software, Inc.
    # Copyright © 2015 - 2017 RealDimensions Software, LLC
    # Copyright © 2011 - 2015 RealDimensions Software, LLC & original authors/contributors from https://github.com/chocolatey/chocolatey
    #
    # Licensed under the Apache License, Version 2.0 (the "License");
    # you may not use this file except in compliance with the License.
    # You may obtain a copy of the License at
    #
    #     http://www.apache.org/licenses/LICENSE-2.0
    #
    # Unless required by applicable law or agreed to in writing, software
    # distributed under the License is distributed on an "AS IS" BASIS,
    # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    # See the License for the specific language governing permissions and
    # limitations under the License.
    
    $helpersPath = (Split-Path -parent $MyInvocation.MyCommand.Definition);
    
    $global:DebugPreference = "SilentlyContinue"
    if ($env:ChocolateyEnvironmentDebug -eq 'true') { $global:DebugPreference = "Continue"; }
    $global:VerbosePreference = "SilentlyContinue"
    if ($env:ChocolateyEnvironmentVerbose -eq 'true') { $global:VerbosePreference = "Continue"; $verbosity = $true }
    
    $installArguments = $env:chocolateyInstallArguments
    
    $overrideArgs = $false
    if ($env:chocolateyInstallOverride -eq 'true') { $overrideArgs = $true }
    
    $forceX86 = $false
    if ($env:chocolateyForceX86 -eq 'true') { $forceX86 = $true }
    
    $packageParameters = $env:chocolateyPackageParameters
    
    # ensure module loading preference is on
    $PSModuleAutoLoadingPreference = "All";
    
    Write-Debug "Host version is $($host.Version), PowerShell Version is '$($PSVersionTable.PSVersion)' and CLR Version is '$($PSVersionTable.CLRVersion)'."
    
    # grab functions from files
    Get-Item $helpersPath\functions\*.ps1 |
      ? { -not ($_.Name.Contains(".Tests.")) } |
        % {
    	  . $_.FullName;
    	  #Export-ModuleMember -Function $_.BaseName
        }
    
    # Export built-in functions prior to loading extensions so that 
    # extension-specific loading behavior can be used based on built-in
    # functions. This allows those overrides to be much more deterministic
    # This behavior was broken from v0.9.9.5 - v0.10.3.
    Export-ModuleMember -Function * -Alias * -Cmdlet *
    
    # load extensions if they exist
    $extensionsPath = Join-Path "$helpersPath" '..\extensions'
    if (Test-Path($extensionsPath)) {
      Write-Debug 'Loading community extensions'
      #Resolve-Path $extensionsPath\**\*\*.psm1 | % { Write-Debug "Importing `'$_`'"; Import-Module $_.ProviderPath }
      Get-ChildItem $extensionsPath -recurse -filter "*.psm1" | Select -ExpandProperty FullName | % { Write-Debug "Importing `'$_`'"; Import-Module $_; }
      Get-ChildItem $extensionsPath -recurse -filter "*.dll" | Select -ExpandProperty FullName | % {
        $path = $_;
        if ($path.Contains("extensions\chocolatey\lib-synced")) { continue }
    
        try {
          Write-Debug "Importing '$path'";
          Write-Debug "Loading '$([System.IO.Path]::GetFileNameWithoutExtension($path))' extension.";
          Import-Module $path;
        } catch {
          if ($env:ChocolateyPowerShellHost -eq 'true') {
            Write-Warning "Import failed for '$path'.  Error: '$_'"
          } else {
            Write-Warning "Import failed for '$path'. If it depends on a newer version of the .NET framework, please make sure you are using the built-in PowerShell Host. Error: '$_'"
          }
        }
      }
    }
    
    # todo: explore removing this for a future version
    Export-ModuleMember -Function * -Alias * -Cmdlet *
    
    # SIG # Begin signature block
    # MIIcpwYJKoZIhvcNAQcCoIIcmDCCHJQCAQExDzANBglghkgBZQMEAgEFADB5Bgor
    # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
    # KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCBcWsJWwbDRkGil
    # gcGP1j5LcVq+8JVwstQgw+f6M+OlaaCCF7EwggUwMIIEGKADAgECAhAECRgbX9W7
    # ZnVTQ7VvlVAIMA0GCSqGSIb3DQEBCwUAMGUxCzAJBgNVBAYTAlVTMRUwEwYDVQQK
    # EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xJDAiBgNV
    # BAMTG0RpZ2lDZXJ0IEFzc3VyZWQgSUQgUm9vdCBDQTAeFw0xMzEwMjIxMjAwMDBa
    # Fw0yODEwMjIxMjAwMDBaMHIxCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2Vy
    # dCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xMTAvBgNVBAMTKERpZ2lD
    # ZXJ0IFNIQTIgQXNzdXJlZCBJRCBDb2RlIFNpZ25pbmcgQ0EwggEiMA0GCSqGSIb3
    # DQEBAQUAA4IBDwAwggEKAoIBAQD407Mcfw4Rr2d3B9MLMUkZz9D7RZmxOttE9X/l
    # qJ3bMtdx6nadBS63j/qSQ8Cl+YnUNxnXtqrwnIal2CWsDnkoOn7p0WfTxvspJ8fT
    # eyOU5JEjlpB3gvmhhCNmElQzUHSxKCa7JGnCwlLyFGeKiUXULaGj6YgsIJWuHEqH
    # CN8M9eJNYBi+qsSyrnAxZjNxPqxwoqvOf+l8y5Kh5TsxHM/q8grkV7tKtel05iv+
    # bMt+dDk2DZDv5LVOpKnqagqrhPOsZ061xPeM0SAlI+sIZD5SlsHyDxL0xY4PwaLo
    # LFH3c7y9hbFig3NBggfkOItqcyDQD2RzPJ6fpjOp/RnfJZPRAgMBAAGjggHNMIIB
    # yTASBgNVHRMBAf8ECDAGAQH/AgEAMA4GA1UdDwEB/wQEAwIBhjATBgNVHSUEDDAK
    # BggrBgEFBQcDAzB5BggrBgEFBQcBAQRtMGswJAYIKwYBBQUHMAGGGGh0dHA6Ly9v
    # Y3NwLmRpZ2ljZXJ0LmNvbTBDBggrBgEFBQcwAoY3aHR0cDovL2NhY2VydHMuZGln
    # aWNlcnQuY29tL0RpZ2lDZXJ0QXNzdXJlZElEUm9vdENBLmNydDCBgQYDVR0fBHow
    # eDA6oDigNoY0aHR0cDovL2NybDQuZGlnaWNlcnQuY29tL0RpZ2lDZXJ0QXNzdXJl
    # ZElEUm9vdENBLmNybDA6oDigNoY0aHR0cDovL2NybDMuZGlnaWNlcnQuY29tL0Rp
    # Z2lDZXJ0QXNzdXJlZElEUm9vdENBLmNybDBPBgNVHSAESDBGMDgGCmCGSAGG/WwA
    # AgQwKjAoBggrBgEFBQcCARYcaHR0cHM6Ly93d3cuZGlnaWNlcnQuY29tL0NQUzAK
    # BghghkgBhv1sAzAdBgNVHQ4EFgQUWsS5eyoKo6XqcQPAYPkt9mV1DlgwHwYDVR0j
    # BBgwFoAUReuir/SSy4IxLVGLp6chnfNtyA8wDQYJKoZIhvcNAQELBQADggEBAD7s
    # DVoks/Mi0RXILHwlKXaoHV0cLToaxO8wYdd+C2D9wz0PxK+L/e8q3yBVN7Dh9tGS
    # dQ9RtG6ljlriXiSBThCk7j9xjmMOE0ut119EefM2FAaK95xGTlz/kLEbBw6RFfu6
    # r7VRwo0kriTGxycqoSkoGjpxKAI8LpGjwCUR4pwUR6F6aGivm6dcIFzZcbEMj7uo
    # +MUSaJ/PQMtARKUT8OZkDCUIQjKyNookAv4vcn4c10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BDAFAA
    # UwAgAGEAbgBkACAAdABoAGUAIABSAGUAbAB5AGkAbgBnACAAUABhAHIAdAB5ACAA
    # QQBnAHIAZQBlAG0AZQBuAHQAIAB3AGgAaQBjAGgAIABsAGkAbQBpAHQAIABsAGkA
    # YQBiAGkAbABpAHQAeQAgAGEAbgBkACAAYQByAGUAIABpAG4AYwBvAHIAcABvAHIA
    # YQB0AGUAZAAgAGgAZQByAGUAaQBuACAAYgB5ACAAcgBlAGYAZQByAGUAbgBjAGUA
    # LjALBglghkgBhv1sAxUwHwYDVR0jBBgwFoAUFQASKxOYspkH7R7for5XDStnAs0w
    # HQYDVR0OBBYEFGFaTSS2STKdSip5GoNL9B6Jwcp9MH0GA1UdHwR2MHQwOKA2oDSG
    # Mmh0dHA6Ly9jcmwzLmRpZ2ljZXJ0LmNvbS9EaWdpQ2VydEFzc3VyZWRJRENBLTEu
    # Y3JsMDigNqA0hjJodHRwOi8vY3JsNC5kaWdpY2VydC5jb20vRGlnaUNlcnRBc3N1
    # cmVkSURDQS0xLmNybDB3BggrBgEFBQcBAQRrMGkwJAYIKwYBBQUHMAGGGGh0dHA6
    # Ly9vY3NwLmRpZ2ljZXJ0LmNvbTBBBggrBgEFBQcwAoY1aHR0cDovL2NhY2VydHMu
    # ZGlnaWNlcnQuY29tL0RpZ2lDZXJ0QXNzdXJlZElEQ0EtMS5jcnQwDQYJKoZIhvcN
    # AQEFBQADggEBAJ0lfhszTbImgVybhs4jIA+Ah+WI//+x1GosMe06FxlxF82pG7xa
    # FjkAneNshORaQPveBgGMN/qbsZ0kfv4gpFetW7easGAm6mlXIV00Lx9xsIOUGQVr
    # NZAQoHuXx/Y/5+IRQaa9YtnwJz04HShvOlIJ8OxwYtNiS7Dgc6aSwNOOMdgv420X
    # Ewbu5AO2FKvzj0OncZ0h3RTKFV2SQdr5D4HRmXQNJsQOfxu19aDxxncGKBXp2JPl
    # VRbwuwqrHNtcSCdmyKOLChzlldquxC5ZoGHd2vNtomHpigtt7BIYvf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2ljZXJ0LmNvbS9zc2wtY3Bz
    # LXJlcG9zaXRvcnkuaHRtMIIBZAYIKwYBBQUHAgIwggFWHoIBUgBBAG4AeQAgAHUA
    # cwBlACAAbwBmACAAdABoAGkAcwAgAEMAZQByAHQAaQBmAGkAYwBhAHQAZQAgAGMA
    # bwBuAHMAdABpAHQAdQB0AGUAcwAgAGEAYwBjAGUAcAB0AGEAbgBjAGUAIABvAGYA
    # IAB0AGgAZQAgAEQAaQBnAGkAQwBlAHIAdAAgAEMAUAAvAEMAUABTACAAYQBuAGQA
    # IAB0AGgAZQAgAFIAZQBsAHkAaQBuAGcAIABQAGEAcgB0AHkAIABBAGcAcgBlAGUA
    # bQBlAG4AdAAgAHcAaABpAGMAaAAgAGwAaQBtAGkAdAAgAGwAaQBhAGIAaQBsAGkA
    # dAB5ACAAYQBuAGQAIABhAHIAZQAgAGkAbgBjAG8AcgBwAG8AcgBhAHQAZQBkACAA
    # aABlAHIAZQBpAG4AIABiAHkAIAByAGUAZgBlAHIAZQBuAGMAZQAuMAsGCWCGSAGG
    # /WwDFTASBgNVHRMBAf8ECDAGAQH/AgEAMHkGCCsGAQUFBwEBBG0wazAkBggrBgEF
    # BQcwAYYYaHR0cDovL29jc3AuZGlnaWNlcnQuY29tMEMGCCsGAQUFBzAChjdodHRw
    # Oi8vY2FjZXJ0cy5kaWdpY2VydC5jb20vRGlnaUNlcnRBc3N1cmVkSURSb290Q0Eu
    # Y3J0MIGBBgNVHR8EejB4MDqgOKA2hjRodHRwOi8vY3JsMy5kaWdpY2VydC5jb20v
    # RGlnaUNlcnRBc3N1cmVkSURSb290Q0EuY3JsMDqgOKA2hjRodHRwOi8vY3JsNC5k
    # aWdpY2VydC5jb20vRGlnaUNlcnRBc3N1cmVkSURSb290Q0EuY3JsMB0GA1UdDgQW
    # BBQVABIrE5iymQftHt+ivlcNK2cCzTAfBgNVHSMEGDAWgBRF66Kv9JLLgjEtUYun
    # pyGd823IDzANBgkqhkiG9w0BAQUFAAOCA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NZvjxkOHVMXf6a6Vvcper7pyeUwMXrEQY241dFoTyoQH8p1kQNU+Yn
    # QkzmbZp/2ko1o3tZxR4lKpdR8Vk5rTtit+8KLGsQfuwLGuCGcyEE76GCAg8wggIL
    # BgkqhkiG9w0BCQYxggH8MIIB+AIBATB2MGIxCzAJBgNVBAYTAlVTMRUwEwYDVQQK
    # EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xITAfBgNV
    # BAMTGERpZ2lDZXJ0IEFzc3VyZWQgSUQgQ0EtMQIQAwGaAjr/WLFr1tXq5hfwZjAJ
    # BgUrDgMCGgUAoF0wGAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAcBgkqhkiG9w0B
    # CQUxDxcNMTcwODA3MDAwNDU4WjAjBgkqhkiG9w0BCQQxFgQUBeszObvMbFEnHJ+X
    # 8ImcbEx50v8wDQYJKoZIhvcNAQEBBQAEggEAgiyI7QVONTWzZltg657shVknXo5S
    # 9IdD97R/XgRFBe6L8DoRZmR/+DJH6xKOyy/UpOUypM4D5U26GF8ei9SMRSUCHQHJ
    # vJvysUI8Q09l0ewa4qFgroUkM/JIEQNMbvlu5LIFzyVeT4vvcNNmasR+0EedNb+G
    # OQyAfCGx4UhnViyYC6WGfsOpz9XdxWoHkQy1KURtF4C5ARJ/c1FngXOEQxDXfevI
    # O1qk+M4fNJ+5mloWS0nqzdoBUc/NbkELtQS9LvtJWdH3ytHDxbAntPvgdru7ZDuO
    # CgHIc09M5HjzeMvHiG+MajGNYgoaD/GLKMMHZn7ofV6qCFZns6RcqQFFsg==
    # SIG # End signature block
    
  • tools\chocolateyInstall\helpers\chocolateyProfile.psm1 Show
    # Copyright © 2017 Chocolatey Software, Inc.
    # Copyright © 2011 - 2017 RealDimensions Software, LLC
    #
    # Licensed under the Apache License, Version 2.0 (the "License");
    # you may not use this file except in compliance with the License.
    # 
    # You may obtain a copy of the License at
    # 
    #   http://www.apache.org/licenses/LICENSE-2.0
    # 
    # Unless required by applicable law or agreed to in writing, software
    # distributed under the License is distributed on an "AS IS" BASIS,
    # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    # See the License for the specific language governing permissions and
    # limitations under the License.
    
    if (Get-Module chocolateyProfile) { return }
    
    $thisDirectory = (Split-Path -parent $MyInvocation.MyCommand.Definition)
    
    . $thisDirectory\functions\Write-FunctionCallLogMessage.ps1
    . $thisDirectory\functions\Get-EnvironmentVariable.ps1
    . $thisDirectory\functions\Get-EnvironmentVariableNames.ps1
    . $thisDirectory\functions\Update-SessionEnvironment.ps1
    . $thisDirectory\ChocolateyTabExpansion.ps1
    
    Export-ModuleMember -Alias refreshenv -Function 'Update-SessionEnvironment', 'TabExpansion'
    
    # SIG # Begin signature block
    # MIIcpwYJKoZIhvcNAQcCoIIcmDCCHJQCAQExDzANBglghkgBZQMEAgEFADB5Bgor
    # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
    # KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCC1tF/9TLC2W6vn
    # Dr1z1KgttvltqVjbR0K5IMLo2fawG6CCF7EwggUwMIIEGKADAgECAhAECRgbX9W7
    # ZnVTQ7VvlVAIMA0GCSqGSIb3DQEBCwUAMGUxCzAJBgNVBAYTAlVTMRUwEwYDVQQK
    # EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xJDAiBgNV
    # BAMTG0RpZ2lDZXJ0IEFzc3VyZWQgSUQgUm9vdCBDQTAeFw0xMzEwMjIxMjAwMDBa
    # Fw0yODEwMjIxMjAwMDBaMHIxCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2Vy
    # dCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xMTAvBgNVBAMTKERpZ2lD
    # ZXJ0IFNIQTIgQXNzdXJlZCBJRCBDb2RlIFNpZ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IBkjAoBggrBgEFBQcCARYcaHR0
    # cHM6Ly93d3cuZGlnaWNlcnQuY29tL0NQUzCCAWQGCCsGAQUFBwICMIIBVh6CAVIA
    # QQBuAHkAIAB1AHMAZQAgAG8AZgAgAHQAaABpAHMAIABDAGUAcgB0AGkAZgBpAGMA
    # YQB0AGUAIABjAG8AbgBzAHQAaQB0AHUAdABlAHMAIABhAGMAYwBlAHAAdABhAG4A
    # YwBlACAAbwBmACAAdABoAGUAIABEAGkAZwBpAEMAZQByAHQAIABDAFAALwBDAFAA
    # UwAgAGEAbgBkACAAdABoAGUAIABSAGUAbAB5AGkAbgBnACAAUABhAHIAdAB5ACAA
    # QQBnAHIAZQBlAG0AZQBuAHQAIAB3AGgAaQBjAGgAIABsAGkAbQBpAHQAIABsAGkA
    # YQBiAGkAbABpAHQAeQAgAGEAbgBkACAAYQByAGUAIABpAG4AYwBvAHIAcABvAHIA
    # YQB0AGUAZAAgAGgAZQByAGUAaQBuACAAYgB5ACAAcgBlAGYAZQByAGUAbgBjAGUA
    # LjALBglghkgBhv1sAxUwHwYDVR0jBBgwFoAUFQASKxOYspkH7R7for5XDStnAs0w
    # HQYDVR0OBBYEFGFaTSS2STKdSip5GoNL9B6Jwcp9MH0GA1UdHwR2MHQwOKA2oDSG
    # Mmh0dHA6Ly9jcmwzLmRpZ2ljZXJ0LmNvbS9EaWdpQ2VydEFzc3VyZWRJRENBLTEu
    # Y3JsMDigNqA0hjJodHRwOi8vY3JsNC5kaWdpY2VydC5jb20vRGlnaUNlcnRBc3N1
    # cmVkSURDQS0xLmNybDB3BggrBgEFBQcBAQRrMGkwJAYIKwYBBQUHMAGGGGh0dHA6
    # Ly9vY3NwLmRpZ2ljZXJ0LmNvbTBBBggrBgEFBQcwAoY1aHR0cDovL2NhY2VydHMu
    # ZGlnaWNlcnQuY29tL0RpZ2lDZXJ0QXNzdXJlZElEQ0EtMS5jcnQwDQYJKoZIhvcN
    # AQEFBQADggEBAJ0lfhszTbImgVybhs4jIA+Ah+WI//+x1GosMe06FxlxF82pG7xa
    # FjkAneNshORaQPveBgGMN/qbsZ0kfv4gpFetW7easGAm6mlXIV00Lx9xsIOUGQVr
    # NZAQoHuXx/Y/5+IRQaa9YtnwJz04HShvOlIJ8OxwYtNiS7Dgc6aSwNOOMdgv420X
    # Ewbu5AO2FKvzj0OncZ0h3RTKFV2SQdr5D4HRmXQNJsQOfxu19aDxxncGKBXp2JPl
    # VRbwuwqrHNtcSCdmyKOLChzlldquxC5ZoGHd2vNtomHpigtt7BIYvfdVVEADkitr
    # wlHCCkivsNRu4PQUCjob4489yq9qjXvc2EQwggbNMIIFtaADAgECAhAG/fkDlgOt
    # 6gAK6z8nu7obMA0GCSqGSIb3DQEBBQUAMGUxCzAJBgNVBAYTAlVTMRUwEwYDVQQK
    # EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xJDAiBgNV
    # BAMTG0RpZ2lDZXJ0IEFzc3VyZWQgSUQgUm9vdCBDQTAeFw0wNjExMTAwMDAwMDBa
    # Fw0yMTExMTAwMDAwMDBaMGIxCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2Vy
    # dCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xITAfBgNVBAMTGERpZ2lD
    # ZXJ0IEFzc3VyZWQgSUQgQ0EtMTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC
    # ggEBAOiCLZn5ysJClaWAc0Bw0p5WVFypxNJBBo/JM/xNRZFcgZ/tLJz4FlnfnrUk
    # FcKYubR3SdyJxArar8tea+2tsHEx6886QAxGTZPsi3o2CAOrDDT+GEmC/sfHMUiA
    # fB6iD5IOUMnGh+s2P9gww/+m9/uizW9zI/6sVgWQ8DIhFonGcIj5BZd9o8dD3QLo
    # Oz3tsUGj7T++25VIxO4es/K8DCuZ0MZdEkKB4YNugnM/JksUkK5ZZgrEjb7Szgau
    # rYRvSISbT0C58Uzyr5j79s5AXVz2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EqhGQFbVF34Y3SWXUyZyj
    # myYr6yv11plos8S0jxoIC2zwp9MQt94Zssd/wZYBGFJdRYnfTYrmp14qKw==
    # SIG # End signature block
    
  • tools\chocolateyInstall\helpers\chocolateyScriptRunner.ps1 Show
    param(
      [alias("ia","installArgs")][string] $installArguments = '',
      [alias("o","override","overrideArguments","notSilent")]
      [switch] $overrideArgs = $false,
      [alias("x86")][switch] $forceX86 = $false,
      [alias("params","parameters","pkgParams")][string]$packageParameters = '',
      [string]$packageScript
    )
    
    $global:DebugPreference = "SilentlyContinue"
    if ($env:ChocolateyEnvironmentDebug -eq 'true') { $global:DebugPreference = "Continue"; }
    $global:VerbosePreference = "SilentlyContinue"
    if ($env:ChocolateyEnvironmentVerbose -eq 'true') { $global:VerbosePreference = "Continue"; $verbosity = $true }
    
    Write-Debug "Running 'ChocolateyScriptRunner' for $($env:packageName) v$($env:packageVersion) with packageScript `'$packageScript`', packageFolder:`'$($env:packageFolder)`', installArguments: `'$installArguments`', packageParameters: `'$packageParameters`',"
    
    ## Set the culture to invariant
    $currentThread = [System.Threading.Thread]::CurrentThread;
    $culture = [System.Globalization.CultureInfo]::InvariantCulture;
    $currentThread.CurrentCulture = $culture;
    $currentThread.CurrentUICulture = $culture;
    
    $RunNote = "DarkCyan"
    $Warning = "Magenta"
    $ErrorColor = "Red"
    $Note = "Green"
    
    $version = $env:packageVersion
    $packageName = $env:packageName
    $packageVersion = $env:packageVersion
    $packageFolder = $env:packageFolder
    
    $helpersPath = (Split-Path -parent $MyInvocation.MyCommand.Definition);
    $nugetChocolateyPath = (Split-Path -parent $helpersPath)
    $nugetPath = $nugetChocolateyPath
    $nugetExePath = Join-Path $nuGetPath 'bin'
    $nugetLibPath = Join-Path $nuGetPath 'lib'
    $badLibPath = Join-Path $nuGetPath 'lib-bad'
    $extensionsPath = Join-Path $nugetPath 'extensions'
    $chocInstallVariableName = "ChocolateyInstall"
    $chocoTools = Join-Path $nuGetPath 'tools'
    $nugetExe = Join-Path $chocoTools 'nuget.exe'
    $7zip = Join-Path $chocoTools '7z.exe'
    $ShimGen = Join-Path $chocoTools 'shimgen.exe'
    $checksumExe = Join-Path $chocoTools 'checksum.exe'
    
    Write-Debug "Running `'$packageScript`'";
    & "$packageScript"
    $scriptSuccess = $?
    $lastExecutableExitCode = $LASTEXITCODE
    
    if ($lastExecutableExitCode -ne $null -and $lastExecutableExitCode -ne '') {
      Write-Debug "The last executable that ran had an exit code of '$lastExecutableExitCode'."
    } 
    
    if (-not $scriptSuccess) {
     Write-Debug "The script exited with a failure."
    } 
    
    $exitCode = 0
    if ($env:ChocolateyCheckLastExitCode -ne $null -and $env:ChocolateyCheckLastExitCode -eq 'true' -and $lastExecutableExitCode -ne $null -and $lastExecutableExitCode -ne '') {
      $exitCode = $lastExecutableExitCode
    }
    
    if ($exitCode -eq 0 -and -not $scriptSuccess) {
      $exitCode = 1
    }
    
    if ($env:ChocolateyExitCode -ne $null -and $env:ChocolateyExitCode -ne '') {
     $exitCode = $env:ChocolateyExitCode
    }
    
    if ($exitCode -ne $null -and $exitCode -ne '' -and $exitCode -ne 0) {
      Set-PowerShellExitCode $exitCode
    }
    
    Exit $exitCode
    # SIG # Begin signature block
    # MIIcpwYJKoZIhvcNAQcCoIIcmDCCHJQCAQExDzANBglghkgBZQMEAgEFADB5Bgor
    # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
    # KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCC+uNyvgolr1zei
    # qx54RnFTt69daTtz/JmYcOihcVI1zaCCF7EwggUwMIIEGKADAgECAhAECRgbX9W7
    # ZnVTQ7VvlVAIMA0GCSqGSIb3DQEBCwUAMGUxCzAJBgNVBAYTAlVTMRUwEwYDVQQK
    # EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xJDAiBgNV
    # BAMTG0RpZ2lDZXJ0IEFzc3VyZ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8EAjAAMA0GCSqGSIb3DQEBCwUAA4IBAQCLBAE/
    # 2x4amEecDEoy9g+WmWMROiB4GnkPqj+IbiwftmwC5/7yL3/592HOFMJr0qOgUt51
    # moE8SuuLuOGw63c5+/48LJS4jP2XzbVNByRPIxPWorm4t/OzTJNziTowHQ+wLwwI
    # 8U97+8DaHCNL7iLZNEiqbVlpF3j7SMWGgf2BVYADJyxluNzf0ZUO+lXN4gOkM8tl
    # VDc7SjZEKvu6ckAaxXf7NPbCXVL/3+LvdmoLbT3vJlfzeXqduO3oieB10ic3ug5T
    # XtoYmyEk/P3yR3x/TqUlg1x/xaolBxy5TyMeSLcBlYn42fnQL154bvMGwFiCsHWQ
    # wY09I0xpEysOMiy8MIIGajCCBVKgAwIBAgIQAwGaAjr/WLFr1tXq5hfwZjANBgkq
    # hkiG9w0BAQUFADBiMQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5j
    # MRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSEwHwYDVQQDExhEaWdpQ2VydCBB
    # c3N1cmVkIElEIENBLTEwHhcNMTQxMDIyMDAwMDAwWhcNMjQxMDIyMDAwMDAwWjBH
    # MQswCQYDVQQGEwJVUzERMA8GA1UEChMIRGlnaUNlcnQxJTAjBgNVBAMTHERpZ2lD
    # ZXJ0IFRpbWVzdGFtcCBSZXNwb25kZXIwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAw
    # ggEKAoIBAQCjZF38fLPggjXg4PbGKuZJdTvMbuBTqZ8fZFnmfGt/a4ydVfiS457V
    # WmNbAklQ2YPOb2bu3cuF6V+l+dSHdIhEOxnJ5fWRn8YUOawk6qhLLJGJzF4o9GS2
    # ULf1ErNzlgpno75hn67z/RJ4dQ6mWxT9RSOOhkRVfRiGBYxVh3lIRvfKDo2n3k5f
    # 4qi2LVkCYYhhchhoubh87ubnNC8xd4EwH7s2AY3vJ+P3mvBMMWSN4+v6GYeofs/s
    # jAw2W3rBerh4x8kGLkYQyI3oBGDbvHN0+k7Y/qpA8bLOcEaD6dpAoVk62RUJV5lW
    # MJPzyWHM0AjMa+xiQpGsAsDvpPCJEY93AgMBAAGjggM1MIIDMTAOBgNVHQ8BAf8E
    # BAMCB4AwDAYDVR0TAQH/BAIwADAWBgNVHSUBAf8EDDAKBggrBgEFBQcDCDCCAb8G
    # A1UdIASCAbYwggGyMIIBoQYJYIZIAYb9bAcBMIIBkjAoBggrBgEFBQcCARYcaHR0
    # cHM6Ly93d3cuZGlnaWNlcnQuY29tL0NQUzCCAWQGCCsGAQUFBwICMIIBVh6CAVIA
    # QQBuAHkAIAB1AHMAZQAgAG8AZgAgAHQAaABpAHMAIABDAGUAcgB0AGkAZgBpAGMA
    # YQB0AGUAIABjAG8AbgBzAHQAaQB0AHUAdABlAHMAIABhAGMAYwBlAHAAdABhAG4A
    # YwBlACAAbwBmACAAdABoAGUAIABEAGkAZwBpAEMAZQByAHQAIABDAFAALwBDAFAA
    # UwAgAGEAbgBkACAAdABoAGUAIABSAGUAbAB5AGkAbgBnACAAUABhAHIAdAB5ACAA
    # QQBnAHIAZQBlAG0AZQBuAHQAIAB3AGgAaQBjAGgAIABsAGkAbQBpAHQAIABsAGkA
    # YQBiAGkAbABpAHQAeQAgAGEAbgBkACAAYQByAGUAIABpAG4AYwBvAHIAcABvAHIA
    # YQB0AGUAZAAgAGgAZQByAGUAaQBuACAAYgB5ACAAcgBlAGYAZQByAGUAbgBjAGUA
    # LjALBglghkgBhv1sAxUwHwYDVR0jBBgwFoAUFQASKxOYspkH7R7for5XDStnAs0w
    # HQYDVR0OBBYEFGFaTSS2STKdSip5GoNL9B6Jwcp9MH0GA1UdHwR2MHQwOKA2oDSG
    # Mmh0dHA6Ly9jcmwzLmRpZ2ljZXJ0LmNvbS9EaWdpQ2VydEFzc3VyZWRJRENBLTEu
    # Y3JsMDigNqA0hjJodHRwOi8vY3JsNC5kaWdpY2VydC5jb20vRGlnaUNlcnRBc3N1
    # cmVkSURDQS0xLmNybDB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bLLG1l1Xj0ycAwImRINNYL7W0Jw/dA+QGI9spnz
    # n4k/vou9+lWL2MfWXetJAZYYkQdAtf+SFIY5LFv6NxE6LdQ+NNKn0VXgf6NQEJcD
    # Bar3hbn56TzAIsrbndRBV1JymAhJUSk62BPQ4HLpxsJmZ2AnVtARu2q7DexGRmgT
    # O/lpHogo6qZh9pfvD7B3rPyofVy78GBm8lMQ2VLS09bIVfOBULyJkJ5W9qJ2+irv
    # z0hxPSapEtthtjdnVN0F/j56olNZ3+YRLC2UQ7lrQ2jt4Po5gRfjXwbJBg==
    # SIG # End signature block
    
  • tools\chocolateyInstall\helpers\ChocolateyTabExpansion.ps1 Show
    # Copyright © 2017 Chocolatey Software, Inc.
    # Copyright © 2011 - 2017 RealDimensions Software, LLC
    #
    # Licensed under the Apache License, Version 2.0 (the "License");
    # you may not use this file except in compliance with the License.
    #
    # You may obtain a copy of the License at
    #
    #   http://www.apache.org/licenses/LICENSE-2.0
    #
    # Unless required by applicable law or agreed to in writing, software
    # distributed under the License is distributed on an "AS IS" BASIS,
    # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    # See the License for the specific language governing permissions and
    # limitations under the License.
    
    # Ideas from the Awesome Posh-Git - https://github.com/dahlbyk/posh-git
    # Posh-Git License - https://github.com/dahlbyk/posh-git/blob/1941da2472eb668cde2d6a5fc921d5043a024386/LICENSE.txt
    # http://www.jeremyskinner.co.uk/2010/03/07/using-git-with-windows-powershell/
    
    $Global:ChocolateyTabSettings = New-Object PSObject -Property @{
        AllCommands = $false
    }
    
    $script:choco = "$env:ChocolateyInstall\choco.exe"
    
    function script:chocoCmdOperations($commands, $command, $filter, $currentArguments) {
        $currentOptions = @('zzzz')
        if ($currentArguments -ne $null -and $currentArguments.Trim() -ne '') { $currentOptions = $currentArguments.Trim() -split ' ' }
    
        $commands.$command.Replace("  "," ") -split ' ' |
          where { $_ -notmatch "^(?:$($currentOptions -join '|' -replace "=", "\="))(?:\S*)\s?$" } |
          where { $_ -like "$filter*" }
    }
    
    $script:someCommands = @('-?','search','list','info','install','outdated','upgrade','uninstall','new','download','pack','push','sync','-h','--help','pin','source','config','feature','apikey')
    
    $allcommands = " --debug --verbose --force --noop --help --accept-license --confirm --limit-output --no-progress --execution-timeout= --cache-location='' --proxy='' --proxy-user= --proxy-password= --proxy-bypass-list='' --proxy-bypass-on-local --fail-on-error-output --use-system-powershell"
    $proInstallUpgradeOptions = " --install-directory='' --max-download-rate= --install-arguments-sensitive= --package-parameters-sensitive= --skip-download-cache --use-download-cache --skip-virus-check --virus-check --virus-positives-minimum="
    $proNewOptions = " --file='' --build-package --file64='' --from-programs-and-features --use-original-location --keep-remote --url='' --url64='' --checksum= --checksum64= --checksumtype= --pause-on-error"
    $proUninstallOptions = " --from-programs-and-features"
    
    $commandOptions = @{
      list = "--lo --id-only --pre --exact --by-id-only --id-starts-with --detailed --approved-only --not-broken --source='' --user= --password= --local-only --prerelease --include-programs --page= --page-size= --order-by-popularity --download-cache-only" + $allcommands
      search = "--pre --exact --by-id-only --id-starts-with --detailed --approved-only --not-broken --source='' --user= --password= --local-only --prerelease --include-programs --page= --page-size= --order-by-popularity --download-cache-only" + $allcommands
      info = "--pre --lo --source='' --user= --password= --local-only --prerelease" + $allcommands
      install = "-y -whatif -? --pre --version= --params='' --install-arguments='' --override-arguments --ignore-dependencies --source='' --source='windowsfeatures' --source='webpi' --user= --password= --prerelease --forcex86 --not-silent --package-parameters='' --allow-downgrade --force-dependencies --require-checksums --use-package-exit-codes --ignore-package-exit-codes --skip-automation-scripts --allow-multiple-versions --ignore-checksums --allow-empty-checksums --allow-empty-checksums-secure --download-checksum='' --download-checksum-type='' --download-checksum-x64='' --download-checksum-type-x64='' --stop-on-first-package-failure" + $proInstallUpgradeOptions + $allcommands
      pin = "--name= --version= -?" + $allcommands
      outdated = "-? --source='' --user= --password= --ignore-pinned" + $allcommands
      upgrade = "-y -whatif -? --pre --version= --except='' --params='' --install-arguments='' --override-arguments --ignore-dependencies --source='' --source='windowsfeatures' --source='webpi' --user= --password= --prerelease --forcex86 --not-silent --package-parameters='' --allow-downgrade --allow-multiple-versions --require-checksums --use-package-exit-codes --ignore-package-exit-codes --skip-automation-scripts --fail-on-unfound --fail-on-not-installed --ignore-checksums --allow-empty-checksums --allow-empty-checksums-secure --download-checksum='' --download-checksum-type='' --download-checksum-x64='' --download-checksum-type-x64='' --exclude-prerelease --stop-on-first-package-failure --use-remembered-options --ignore-remembered-options" + $proInstallUpgradeOptions + $allcommands
      uninstall = "-y -whatif -? --force-dependencies --remove-dependencies --all-versions --source='windowsfeatures' --source='webpi' --version= --uninstall-arguments='' --override-arguments --not-silent --params='' --package-parameters='' --use-package-exit-codes --ignore-package-exit-codes --skip-automation-scripts --use-autouninstaller --skip-autouninstaller --fail-on-autouninstaller --ignore-autouninstaller-failure --stop-on-first-package-failure" + $proUninstallOptions + $allcommands
      new = "--template-name= --output-directory='' --automaticpackage --version= --maintainer='' packageversion= maintainername='' maintainerrepo='' installertype= url='' url64='' silentargs='' --use-built-in-template -?" + $proNewOptions + $allcommands
      pack = "--version= -?" + $allcommands
      push = "--source='' --api-key= --timeout= -?" + $allcommands
      source = "--name= --source='' --user= --password= --priority= --bypass-proxy --allow-self-service -?" + $allcommands
      config = "--name= --value= -?" + $allcommands
      feature = "--name= -?" + $allcommands
      apikey = "--source='' --api-key= -?" + $allcommands
      download = "--internalize --ignore-dependencies --resources-location= --download-location= --outputdirectory= --source='' --version='' --prerelease --user= --password= --cert='' --certpassword= --append-use-original-location --recompile -?" + $allcommands
      sync = "--output-directory= --id= -?" + $allcommands
    }
    
    try {
      # if license exists
      # add in pro/biz switches
    }
    catch {
    }
    
    function script:chocoCommands($filter) {
        $cmdList = @()
        if (-not $global:ChocolateyTabSettings.AllCommands) {
            $cmdList += $someCommands -like "$filter*"
        } else {
            $cmdList += (& $script:choco -h) |
                where { $_ -match '^  \S.*' } |
                foreach { $_.Split(' ', [StringSplitOptions]::RemoveEmptyEntries) } |
                where { $_ -like "$filter*" }
        }
    
        $cmdList #| sort
    }
    
    function script:chocoLocalPackages($filter) {
        if ($filter -ne $null -and $filter.StartsWith(".")) { return; } #file search
        @(& $script:choco list $filter -lo -r --id-starts-with) | %{ $_.Split('|')[0] }
    }
    
    function script:chocoLocalPackagesUpgrade($filter) {
        if ($filter -ne $null -and $filter.StartsWith(".")) { return; } #file search
        @('all|') + @(& $script:choco list $filter -lo -r --id-starts-with) | where { $_ -like "$filter*" } | %{ $_.Split('|')[0] }
    }
    
    function script:chocoRemotePackages($filter) {
        if ($filter -ne $null -and $filter.StartsWith(".")) { return; } #file search
        @('packages.config|') + @(& $script:choco search $filter --page=0 --page-size=30 -r --id-starts-with --order-by-popularity) | where { $_ -like "$filter*" } | %{ $_.Split('|')[0] }
    }
    
    function Get-AliasPattern($exe) {
      $aliases = @($exe) + @(Get-Alias | where { $_.Definition -eq $exe } | select -Exp Name)
    
      "($($aliases -join '|'))"
    }
    
    function ChocolateyTabExpansion($lastBlock) {
      switch -regex ($lastBlock -replace "^$(Get-AliasPattern choco) ","") {
    
        # Handles uninstall package names
        "^uninstall\s+(?<package>[^\.][^-\s]*)$" {
          chocoLocalPackages $matches['package']
        }
    
        # Handles install package names
        "^(install)\s+(?<package>[^\.][^-\s]+)$" {
          chocoRemotePackages $matches['package']
        }
    
        # Handles upgrade / uninstall package names
        "^upgrade\s+(?<package>[^\.][^-\s]*)$" {
          chocoLocalPackagesUpgrade $matches['package']
        }
    
        # Handles list/search first tab
        "^(list|search)\s+(?<subcommand>[^-\s]*)$" {
          @('<filter>','-?') | where { $_ -like "$($matches['subcommand'])*" }
        }
    
        # Handles new first tab
        "^(new)\s+(?<subcommand>[^-\s]*)$" {
          @('<name>','-?') | where { $_ -like "$($matches['subcommand'])*" }
        }
    
        # Handles pack first tab
        "^(pack)\s+(?<subcommand>[^-\s]*)$" {
          @('<PathtoNuspec>','-?') | where { $_ -like "$($matches['subcommand'])*" }
        }
    
        # Handles push first tab
        "^(push)\s+(?<subcommand>[^-\s]*)$" {
          @('<PathtoNupkg>','-?') | where { $_ -like "$($matches['subcommand'])*" }
        }
    
        # Handles source first tab
        "^(source)\s+(?<subcommand>[^-\s]*)$" {
          @('list','add','remove','disable','enable','-?') | where { $_ -like "$($matches['subcommand'])*" }
        }
    
        # Handles pin first tab
        "^(pin)\s+(?<subcommand>[^-\s]*)$" {
          @('list','add','remove','-?') | where { $_ -like "$($matches['subcommand'])*" }
        }
    
        # Handles feature first tab
        "^(feature)\s+(?<subcommand>[^-\s]*)$" {
          @('list','disable','enable','-?') | where { $_ -like "$($matches['subcommand'])*" }
        }
        # Handles config first tab
        "^(config)\s+(?<subcommand>[^-\s]*)$" {
          @('list','get','set','unset','-?') | where { $_ -like "$($matches['subcommand'])*" }
        }
    
        # Handles more options after others
        "^(?<cmd>$($commandOptions.Keys -join '|'))(?<currentArguments>.*)\s+(?<op>\S*)$" {
          chocoCmdOperations $commandOptions $matches['cmd'] $matches['op'] $matches['currentArguments']
        }
    
        # Handles choco <cmd> <op>
        "^(?<cmd>$($commandOptions.Keys -join '|'))\s+(?<op>\S*)$" {
          chocoCmdOperations $commandOptions $matches['cmd'] $matches['op']
        }
    
        # Handles choco <cmd>
        "^(?<cmd>\S*)$" {
          chocoCommands $matches['cmd']
        }
      }
    }
    
    $PowerTab_RegisterTabExpansion = if (Get-Module -Name powertab) { Get-Command Register-TabExpansion -Module powertab -ErrorAction SilentlyContinue }
    if ($PowerTab_RegisterTabExpansion)
    {
      & $PowerTab_RegisterTabExpansion "choco" -Type Command {
        param($Context, [ref]$TabExpansionHasOutput, [ref]$QuoteSpaces)  # 1:
    
        $line = $Context.Line
        $lastBlock = [regex]::Split($line, '[|;]')[-1].TrimStart()
        $TabExpansionHasOutput.Value = $true
        ChocolateyTabExpansion $lastBlock
      }
    
      return
    }
    
    if (Test-Path Function:\TabExpansion) {
        Rename-Item Function:\TabExpansion TabExpansionBackup
    }
    
    function TabExpansion($line, $lastWord) {
        $lastBlock = [regex]::Split($line, '[|;]')[-1].TrimStart()
    
        switch -regex ($lastBlock) {
            # Execute Chocolatey tab completion for all choco-related commands
            "^$(Get-AliasPattern choco) (.*)" { ChocolateyTabExpansion $lastBlock }
    
            # Fall back on existing tab expansion
            default { if (Test-Path Function:\TabExpansionBackup) { TabExpansionBackup $line $lastWord } }
        }
    }
    
    # SIG # Begin signature block
    # MIIcpwYJKoZIhvcNAQcCoIIcmDCCHJQCAQExDzANBglghkgBZQMEAgEFADB5Bgor
    # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
    # KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCD4Xhx4j7me2D6e
    # R9ZO+BjvzG8KrbbY/qEaHQVF6y3mWKCCF7EwggUwMIIEGKADAgECAhAECRgbX9W7
    # ZnVTQ7VvlVAIMA0GCSqGSIb3DQEBCwUAMGUxCzAJBgNVBAYTAlVTMRUwEwYDVQQK
    # EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xJDAiBgNV
    # BAMTG0RpZ2lDZXJ0IEFzc3VyZWQgSUQgUm9vdCBDQTAeFw0xMzEwMjIxMjAwMDBa
    # Fw0yODEwMjIxMjAwMDBaMHIxCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2Vy
    # dCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xMTAvBgNVBAMTKERpZ2lD
    # ZXJ0IFNIQTIgQXNzdXJlZCBJRCBDb2RlIFNpZ25pbmcgQ0EwggEiMA0GCSqGSIb3
    # DQEBAQUAA4IBDwAwggEKAoIBAQD407Mcfw4Rr2d3B9MLMUkZz9D7RZmxOttE9X/l
    # qJ3bMtdx6nadBS63j/qSQ8Cl+YnUNxnXtqrwnIal2CWsDnkoOn7p0WfTxvspJ8fT
    # eyOU5JEjlpB3gvmhhCNmElQzUHSxKCa7JGnCwlLyFGeKiUXULaGj6YgsIJWuHEqH
    # CN8M9eJNYBi+qsSyrnAxZjNxPqxwoqvOf+l8y5Kh5TsxHM/q8grkV7tKtel05iv+
    # bMt+dDk2DZDv5LVOpKnqagqrhPOsZ061xPeM0SAlI+sIZD5SlsHyDxL0xY4PwaLo
    # LFH3c7y9hbFig3NBggfkOItqcyDQD2RzPJ6fpjOp/RnfJZPRAgMBAAGjggHNMIIB
    # yTASBgNVHRMBAf8ECDAGAQH/AgEAMA4GA1UdDwEB/wQEAwIBhjATBgNVHSUEDDAK
    # BggrBgEFBQcDAzB5BggrBgEFBQcBAQRtMGswJAYIKwYBBQUHMAGGGGh0dHA6Ly9v
    # Y3NwLmRpZ2ljZXJ0LmNvbTBDBggrBgEFBQcwAoY3aHR0cDovL2NhY2VydHMuZGln
    # aWNlcnQuY29tL0RpZ2lDZXJ0QXNzdXJlZElEUm9vdENBLmNydDCBgQYDVR0fBHow
    # eDA6oDigNoY0aHR0cDovL2NybDQuZGlnaWNlcnQuY29tL0RpZ2lDZXJ0QXNzdXJl
    # ZElEUm9vdENBLmNybDA6oDigNoY0aHR0cDovL2NybDMuZGlnaWNlcnQuY29tL0Rp
    # Z2lDZXJ0QXNzdXJlZElEUm9vdENBLmNybDBPBgNVHSAESDBGMDgGCmCGSAGG/WwA
    # AgQwKjAoBggrBgEFBQcCARYcaHR0cHM6Ly93d3cuZGlnaWNlcnQuY29tL0NQUzAK
    # BghghkgBhv1sAzAdBgNVHQ4EFgQUWsS5eyoKo6XqcQPAYPkt9mV1DlgwHwYDVR0j
    # BBgwFoAUReuir/SSy4IxLVGLp6chnfNtyA8wDQYJKoZIhvcNAQELBQADggEBAD7s
    # DVoks/Mi0RXILHwlKXaoHV0cLToaxO8wYdd+C2D9wz0PxK+L/e8q3yBVN7Dh9tGS
    # dQ9RtG6ljlriXiSBThCk7j9xjmMOE0ut119EefM2FAaK95xGTlz/kLEbBw6RFfu6
    # r7VRwo0kriTGxycqoSkoGjpxKAI8LpGjwCUR4pwUR6F6a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ABhAG4A
    # YwBlACAAbwBmACAAdABoAGUAIABEAGkAZwBpAEMAZQByAHQAIABDAFAALwBDAFAA
    # UwAgAGEAbgBkACAAdABoAGUAIABSAGUAbAB5AGkAbgBnACAAUABhAHIAdAB5ACAA
    # QQBnAHIAZQBlAG0AZQBuAHQAIAB3AGgAaQBjAGgAIABsAGkAbQBpAHQAIABsAGkA
    # YQBiAGkAbABpAHQAeQAgAGEAbgBkACAAYQByAGUAIABpAG4AYwBvAHIAcABvAHIA
    # YQB0AGUAZAAgAGgAZQByAGUAaQBuACAAYgB5ACAAcgBlAGYAZQByAGUAbgBjAGUA
    # LjALBglghkgBhv1sAxUwHwYDVR0jBBgwFoAUFQASKxOYspkH7R7for5XDStnAs0w
    # HQYDVR0OBBYEFGFaTSS2STKdSip5GoNL9B6Jwcp9MH0GA1UdHwR2MHQwOKA2oDSG
    # Mmh0dHA6Ly9jcmwzLmRpZ2ljZXJ0LmNvbS9EaWdpQ2VydEFzc3VyZWRJRENBLTEu
    # Y3JsMDigNqA0hjJodHRwOi8vY3JsNC5kaWdpY2VydC5jb20vRGlnaUNlcnRBc3N1
    # cmVkSURDQS0xLmNybDB3BggrBgEFBQcBAQRrMGkwJAYIKwYBBQUHMAGGGGh0dHA6
    # Ly9vY3NwLmRpZ2ljZXJ0LmNvbTBBBggrBgEFBQcwAoY1aHR0cDovL2NhY2VydHMu
    # ZGlnaWNlcnQuY29tL0RpZ2lDZXJ0QXNzdXJlZElEQ0EtMS5jcnQwDQYJKoZIhvcN
    # AQEFBQADggEBAJ0lfhszTbImgVybhs4jIA+Ah+WI//+x1GosMe06FxlxF82pG7xa
    # FjkAneNshORaQPveBgGMN/qbsZ0kfv4gpFetW7easGAm6mlXIV00Lx9xsIOUGQVr
    # NZAQoHuXx/Y/5+IRQaa9YtnwJz04HShvOlIJ8OxwYtNiS7Dgc6aSwNOOMdgv420X
    # Ewbu5AO2FKvzj0OncZ0h3RTKFV2SQdr5D4HRmXQNJsQOfxu19aDxxncGK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/FQpqBLfRdfxEHwKlSrg9HNX6hbxU+yAbh1Lt91nc1IntTxcg1
    # oP2GrEqEXfm1bAFYxW09MT6wI8JsxJe5uMwuRPBaMu7UDbgo/NT9gix9EsvqbcVm
    # QrdOcNRR1N6WXu6rODO+LPrkOBUk/88LdEAmejNl1m59m5lwmqFuoaGCAg8wggIL
    # BgkqhkiG9w0BCQYxggH8MIIB+AIBATB2MGIxCzAJBgNVBAYTAlVTMRUwEwYDVQQK
    # EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xITAfBgNV
    # BAMTGERpZ2lDZXJ0IEFzc3VyZWQgSUQgQ0EtMQIQAwGaAjr/WLFr1tXq5hfwZjAJ
    # BgUrDgMCGgUAoF0wGAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAcBgkqhkiG9w0B
    # CQUxDxcNMTcwODA3MDAwNDU4WjAjBgkqhkiG9w0BCQQxFgQUZyrnKUB2yYqU2C0n
    # jq4f8Vn6jFUwDQYJKoZIhvcNAQEBBQAEggEAiViTM7hKSpU0pVQsNybfqLIb0/1W
    # pKFK6YGIRRaYeKzo+jT5akLWjHkM1GldOsZ06LzcInbSzXM92iMto7WqZs2mp6x9
    # Lm7mqiIWYnbccUDckToG/0+he/d2mbVOuD0fhLCo52Hic2axPT+QBlKc82tgCuvy
    # 95e1lqhIoxDuN8Zx1T7rFSHJULsPxC6VZGH5eNafHs459Xpa/119VEWULJp9xGFC
    # 85EyhqeuTvJ04eoJVHHJFWwrQ3Fv5xKZlDefNrq6ZiTZNNlWAT23XR+fUiCknueV
    # tficcyY+ZyuyNqK7Z+t388kzl3f9miwhfCb5B0A1ZA6tsaKKITubnWF5YQ==
    # SIG # End signature block
    
  • tools\chocolateyInstall\helpers\functions\Format-FileSize.ps1 Show
    # Copyright © 2017 Chocolatey Software, Inc.
    # Copyright © 2011 - 2017 RealDimensions Software, LLC
    #
    # Licensed under the Apache License, Version 2.0 (the "License");
    # you may not use this file except in compliance with the License.
    #
    # You may obtain a copy of the License at
    #
    #   http://www.apache.org/licenses/LICENSE-2.0
    #
    # Unless required by applicable law or agreed to in writing, software
    # distributed under the License is distributed on an "AS IS" BASIS,
    # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    # See the License for the specific language governing permissions and
    # limitations under the License.
    
    Function Format-FileSize {
    <#
    .SYNOPSIS
    DO NOT USE. Not part of the public API.
    
    .DESCRIPTION
    Formats file size into a human readable format.
    
    .NOTES
    Available in 0.9.10+.
    
    This function is not part of the API.
    
    .INPUTS
    None
    
    .OUTPUTS
    Returns a string representation of the file size in a more friendly
    format based on the passed in bytes.
    
    .PARAMETER Size
    The size of a file in bytes.
    
    .PARAMETER IgnoredArguments
    Allows splatting with arguments that do not apply. Do not use directly.
    
    .EXAMPLE
    Format-FileSize -Size $fileSizeBytes
    
    .LINK
    Get-WebFile
    #>
    param (
      [Parameter(Mandatory=$true, Position=0)][double] $size,
      [parameter(ValueFromRemainingArguments = $true)][Object[]] $ignoredArguments
    )
    
      # Do not log function call, it interrupts the single line download progress output.
    
      Foreach ($unit in @('B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB')) {
        If ($size -lt 1024) {
          return [string]::Format("{0:0.##} {1}", $size, $unit)
        }
        $size /= 1024
      }
    
      return [string]::Format("{0:0.##} YB", $size)
    }
    
    # SIG # Begin signature block
    # MIIcpwYJKoZIhvcNAQcCoIIcmDCCHJQCAQExDzANBglghkgBZQMEAgEFADB5Bgor
    # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
    # KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCA01JC3YBeVVSFg
    # kazl1tZuFooX8d0fWHIDrjDMhcXHJ6CCF7EwggUwMIIEGKADAgECAhAECRgbX9W7
    # ZnVTQ7VvlVAIMA0GCSqGSIb3DQEBCwUAMGUxCzAJBgNVBAYTAlVTM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BYxVh3lIRvfKDo2n3k5f
    # 4qi2LVkCYYhhchhoubh87ubnNC8xd4EwH7s2AY3vJ+P3mvBMMWSN4+v6GYeofs/s
    # jAw2W3rBerh4x8kGLkYQyI3oBGDbvHN0+k7Y/qpA8bLOcEaD6dpAoVk62RUJV5lW
    # MJPzyWHM0AjMa+xiQpGsAsDvpPCJEY93AgMBAAGjggM1MIIDMTAOBgNVHQ8BAf8E
    # BAMCB4AwDAYDVR0TAQH/BAIwADAWBgNVHSUBAf8EDDAKBggrBgEFBQcDCDCCAb8G
    # A1UdIASCAbYwggGyMIIBoQYJYIZIAYb9bAcBMIIBkjAoBggrBgEFBQcCARYcaHR0
    # cHM6Ly93d3cuZGlnaWNlcnQuY29tL0NQUzCCAWQGCCsGAQUFBwICMIIBVh6CAVIA
    # QQBuAHkAIAB1AHMAZQAgAG8AZgAgAHQAaABpAHMAIABDAGUAcgB0AGkAZgBpAGMA
    # YQB0AGUAIABjAG8AbgBzAHQAaQB0AHUAdABlAHMAIABhAGMAYwBlAHAAdABhAG4A
    # YwBlACAAbwBmACAAdABoAGUAIABEAGkAZwBpAEMAZQByAHQAIABDAFAALwBDAFAA
    # UwAgAGEAbgBkACAAdABoAGUAIABSAGUAbAB5AGkAbgBnACAAUABhAHIAdAB5ACAA
    # QQBnAHIAZQBlAG0AZQBuAHQAIAB3AGgAaQBjAGgAIABsAGkAbQBpAHQAIABsAGkA
    # YQBiAGkAbABpAHQAeQAgAGEAbgBkACAAYQByAGUAIABpAG4AYwBvAHIAcABvAHIA
    # YQB0AGUAZAAgAGgAZQByAGUAaQBuACAAYgB5ACAAcgBlAGYAZQByAGUAbgBjAGUA
    # LjALBglghkgBhv1sAxUwHwYDVR0jBBgwFoAUFQASKxOYspkH7R7for5XDStnAs0w
    # HQYDVR0OBBYEFGFaTSS2STKdSip5GoNL9B6Jwcp9MH0GA1UdHwR2MHQwOKA2oDSG
    # Mmh0dHA6Ly9jcmwzLmRpZ2ljZXJ0LmNvbS9EaWdpQ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D/8bvIXRUdp
    # fI6lapBiW2MwDQYJKoZIhvcNAQEBBQAEggEAZlftGdbHcL1JNoD6SbsCfdxr6AYq
    # pz/ShZR9jqJW9DbWZbx9GfdP0sDNMQYfshDR9kejvp6aJAqtC80pqrbaniSbaA3a
    # Oh0a2Q3I+Yx44CcjCqHSgqAl/eE51mQKWgxDVLMxuLiOan+cCk2mNxGjYQ7XKSSw
    # Xu9jHPWWt/DIJztLepinNchIh7ExiiespBE461jv6MjlyIIipwk4KEiKgoaNiNsl
    # k2ihI/jbEGPpd/ggl4sJf6ZiFSDrTZUkhRgx+wvM4NM1qpQTisGX+1jpERgn1S+g
    # 6AQb6NzlUPfJ0M+PJbSkuWB5bLpxxZj9kA8wM6pT7fnRXCVU537YhyFMig==
    # SIG # End signature block
    
  • tools\chocolateyInstall\helpers\functions\Get-CheckSumValid.ps1 Show
    # Copyright © 2017 Chocolatey Software, Inc.
    # Copyright © 2015 - 2017 RealDimensions Software, LLC
    # Copyright © 2011 - 2015 RealDimensions Software, LLC & original authors/contributors from https://github.com/chocolatey/chocolatey
    #
    # Licensed under the Apache License, Version 2.0 (the "License");
    # you may not use this file except in compliance with the License.
    # You may obtain a copy of the License at
    #
    #     http://www.apache.org/licenses/LICENSE-2.0
    #
    # Unless required by applicable law or agreed to in writing, software
    # distributed under the License is distributed on an "AS IS" BASIS,
    # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    # See the License for the specific language governing permissions and
    # limitations under the License.
    
    function Get-ChecksumValid {
    <#
    .SYNOPSIS
    Checks a file's checksum versus a passed checksum and checksum type.
    
    .DESCRIPTION
    Makes a determination if a file meets an expected checksum signature.
    This function is usually used when comparing a file that is downloaded
    from an official distribution point. If the checksum fails to match the
    expected output, this function throws an error.
    
    Checksums have been used for years as a means of verification. A
    checksum hash is a unique value or signature that corresponds to the
    contents of a file. File names and extensions can be altered without
    changing the checksum signature. However if you changed the contents of
    the file, even one character, the checksum will be different.
    
    Checksums are used to provide as a means of cryptographically ensuring
    the contents of a file have not been changed. While some cryptographic
    algorithms, including MD5 and SHA1, are no longer considered secure
    against attack, the goal of a checksum algorithm is to make it
    extremely difficult (near impossible with better algorithms) to alter
    the contents of a file (whether by accident or for malicious reasons)
    and still result in the same checksum signature.
    
    When verifying a checksum using a secure algorithm, if the checksum
    matches the expected signature, the contents of the file are identical
    to what is expected.
    
    .NOTES
    This uses the checksum.exe tool available separately at
    https://chocolatey.org/packages/checksum.
    
    Options that affect checksum verification:
    
    * `--ignore-checksums` - skips checksumming
    * `--allow-empty-checksums` - skips checksumming when the package is missing a checksum
    * `--allow-empty-checksums-secure` - skips checksumming when the package is missing a checksum for secure (HTTPS) locations
    * `--require-checksums` - requires checksums for both non-secure and secure locations
    * `--download-checksum`, `--download-checksum-type` - allows user to pass their own checksums
    * `--download-checksum-x64`, `--download-checksum-type-x64` - allows user to pass their own checksums
    
    Features that affect checksum verification:
    
    * `checksumFiles` - when turned off, skips checksumming
    * `allowEmptyChecksums` - when turned on, skips checksumming when the package is missing a checksum
    * `allowEmptyChecksumsSecure` - when turned on, skips checksumming when the package is missing a checksum for secure (HTTPS) locations
    
    .INPUTS
    None
    
    .OUTPUTS
    None
    
    .PARAMETER File
    The full path to a binary file that is checksummed and compared to the
    passed Checksum parameter value.
    
    .PARAMETER Checksum
    The expected checksum hash value of the File resource. The checksum
    type is covered by ChecksumType.
    
    **NOTE:** Checksums in packages are meant as a measure to validate the
    originally intended file that was used in the creation of a package is
    the same file that is received at a future date. Since this is used for
    other steps in the process related to the community repository, it
    ensures that the file a user receives is the same file a maintainer
    and a moderator (if applicable), plus any moderation review has
    intended for you to receive with this package. If you are looking at a
    remote source that uses the same url for updates, you will need to
    ensure the package also stays updated in line with those remote
    resource updates. You should look into [automatic packaging](https://chocolatey.org/docs/automatic-packages)
    to help provide that functionality.
    
    **NOTE:** To determine checksums, you can get that from the original
    site if provided. You can also use the [checksum tool available on
    the community feed](https://chocolatey.org/packages/checksum) (`choco install checksum`)
    and use it e.g. `checksum -t sha256 -f path\to\file`. Ensure you
    provide checksums for all remote resources used.
    
    .PARAMETER ChecksumType
    The type of checkum that the file is validated with - 'md5', 'sha1',
    'sha256' or 'sha512' - defaults to 'md5'.
    
    MD5 is not recommended as certain organizations need to use FIPS
    compliant algorithms for hashing - see
    https://support.microsoft.com/en-us/kb/811833 for more details.
    
    The recommendation is to use at least SHA256.
    
    .PARAMETER IgnoredArguments
    Allows splatting with arguments that do not apply. Do not use directly.
    
    .EXAMPLE
    Get-ChecksumValid -File $fileFullPath -CheckSum $checksum -ChecksumType $checksumType
    
    .LINK
    Get-ChocolateyWebFile
    
    .LINK
    Install-ChocolateyPackage
    #>
    param(
      [parameter(Mandatory=$true, Position=0)][string] $file,
      [parameter(Mandatory=$false, Position=1)][string] $checksum = '',
      [parameter(Mandatory=$false, Position=2)][string] $checksumType = 'md5',
      [parameter(Mandatory=$false, Position=3)][string] $originalUrl = '',
      [parameter(ValueFromRemainingArguments = $true)][Object[]] $ignoredArguments
    )
    
      Write-FunctionCallLogMessage -Invocation $MyInvocation -Parameters $PSBoundParameters
    
      if ($env:ChocolateyIgnoreChecksums -eq 'true') {
        Write-Warning "Ignoring checksums due to feature checksumFiles turned off or option --ignore-checksums set."
        return
      }
    
      if ($checksum -eq '' -or $checksum -eq $null) {
        $allowEmptyChecksums = $env:ChocolateyAllowEmptyChecksums
        $allowEmptyChecksumsSecure = $env:ChocolateyAllowEmptyChecksumsSecure
        if ($allowEmptyChecksums -eq 'true') {
          Write-Debug "Empty checksums are allowed due to allowEmptyChecksums feature or option."
          return
        }
    
        if ($originalUrl -ne $null -and $originalUrl.ToLower().StartsWith("https") -and $allowEmptyChecksumsSecure -eq 'true') {
          Write-Debug "Download from HTTPS source with feature 'allowEmptyChecksumsSecure' enabled."
          return
        }
    
        Write-Warning "Missing package checksums are not allowed (by default for HTTP/FTP, `n HTTPS when feature 'allowEmptyChecksumsSecure' is disabled) for `n safety and security reasons. Although we strongly advise against it, `n if you need this functionality, please set the feature `n 'allowEmptyChecksums' ('choco feature enable -n `n allowEmptyChecksums') `n or pass in the option '--allow-empty-checksums'. You can also pass `n checksums at runtime (recommended). See `choco install -?` for details."
        Write-Debug "If you are a maintainer attempting to determine the checksum for packaging purposes, please run `n 'choco install checksum' and run 'checksum -t sha256 -f $file' `n Ensure you do this for all remote resources."
    
        if ($env:ChocolateyPowerShellHost -eq 'true') {
          $statement = "The integrity of the file '$([System.IO.Path]::GetFileName($file))'"
          if ($originalUrl -ne $null -and $originalUrl -ne '') {
            $statement += " from '$originalUrl'"
          }
          $statement += " has not been verified by a checksum in the package scripts."
          $question = 'Do you wish to allow the install to continue (not recommended)?'
          $choices = New-Object System.Collections.ObjectModel.Collection[System.Management.Automation.Host.ChoiceDescription]
          $choices.Add((New-Object System.Management.Automation.Host.ChoiceDescription -ArgumentList '&Yes'))
          $choices.Add((New-Object System.Management.Automation.Host.ChoiceDescription -ArgumentList '&No'))
    
          $selection = $Host.UI.PromptForChoice($statement, $question, $choices, 1)
    
          if ($selection -eq 0) { return }
        }
    
        if ($originalUrl -ne $null -and $originalUrl.ToLower().StartsWith("https")) {
          throw "This package downloads over HTTPS but does not yet have package checksums to verify the package. We recommend asking the maintainer to add checksums to this package. In the meantime if you need this package to work correctly, please enable the feature allowEmptyChecksumsSecure, provide the runtime switch '--allow-empty-checksums-secure', or pass in checksums at runtime (recommended - see 'choco install -?' / 'choco upgrade -?' for details)."
        } else {
          throw "Empty checksums are no longer allowed by default for non-secure sources. Please ask the maintainer to add checksums to this package. In the meantime if you need this package to work correctly, please enable the feature allowEmptyChecksums, provide the runtime switch '--allow-empty-checksums', or pass in checksums at runtime (recommended - see 'choco install -?' / 'choco upgrade -?' for details). It is strongly advised against allowing empty checksums for non-internal HTTP/FTP sources."
        }
      }
    
      if (!([System.IO.File]::Exists($file))) { throw "Unable to checksum a file that doesn't exist - Could not find file `'$file`'" }
    
      if ($checksumType -eq $null -or $checksumType -eq ''){
        $checksumType = 'md5'
      }
    
      if ($checksumType -ne 'sha1' -and $checksumType -ne 'sha256' -and $checksumType -ne 'sha512' -and $checksumType -ne 'md5') {
        Write-Debug 'Setting checksumType to md5 due to non-set value or type is not specified correctly.'
        throw "Checksum type '$checksumType' is unsupported. This type may be supported in a newer version of Chocolatey."
      }
    
      $checksumExe = Join-Path "$helpersPath" '..\tools\checksum.exe'
      if (!([System.IO.File]::Exists($checksumExe))) {
        Update-SessionEnvironment
        $checksumExe = Join-Path "$env:ChocolateyInstall" 'tools\checksum.exe'
      }
      Write-Debug "checksum.exe found at `'$checksumExe`'"
    
      $params = "-c=`"$checksum`" -t=`"$checksumType`" -f=`"$file`""
    
      Write-Debug "Executing command ['$checksumExe' $params]"
      $process = New-Object System.Diagnostics.Process
      $process.StartInfo = New-Object System.Diagnostics.ProcessStartInfo($checksumExe, $params)
      $process.StartInfo.UseShellExecute = $false
      $process.StartInfo.WindowStyle = [System.Diagnostics.ProcessWindowStyle]::Hidden
    
      $process.Start() | Out-Null
      $process.WaitForExit()
      $exitCode = $process.ExitCode
      $process.Dispose()
    
      Write-Debug "Command [`'$checksumExe`' $params] exited with `'$exitCode`'."
    
      if ($exitCode -ne 0) {
        throw "Checksum for '$file' did not meet '$checksum' for checksum type '$checksumType'. Consider passing the actual checksums through with `--checksum --checksum64` once you validate the checksums are appropriate. A less secure option is to pass `--ignore-checksums` if necessary."
      }
    
      #$fileCheckSumActual = $md5Output.Split(' ')[0]
      # if ($fileCheckSumActual -ne $checkSum) {
      #   throw "CheckSum for `'$file'` did not meet `'$checkSum`'."
      # }
    }
    
    # SIG # Begin signature block
    # MIIcpwYJKoZIhvcNAQcCoIIcmDCCHJQCAQExDzANBglghkgBZQMEAgEFADB5Bgor
    # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
    # KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCBcgEvbvCorUrbk
    # /GIxVrHeyknomFWwB38/s0dW0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uZGln
    # aWNlcnQuY29tL0RpZ2lDZXJ0QXNzdXJlZElEUm9vdENBLmNydDCBgQYDVR0fBHow
    # eDA6oDigNoY0aHR0cDovL2NybDQuZGlnaWNlcnQuY29tL0RpZ2lDZXJ0QXNzdXJl
    # ZElEUm9vdENBLmNybDA6oDigNoY0aHR0cDovL2NybDMuZGlnaWNlcnQuY29tL0Rp
    # Z2lDZXJ0QXNzdXJlZElEUm9vdENBLmNybDBPBgNVHSAESDBGMDgGCmCGSAGG/WwA
    # AgQwKjAoBggrBgEFBQcCARYcaHR0cHM6Ly93d3cuZGlnaWNlcnQuY29tL0NQUzAK
    # BghghkgBhv1sAzAdBgNVHQ4EFgQUWsS5eyoKo6XqcQPAYPkt9mV1DlgwHwYDVR0j
    # BBgwFoAUReuir/SSy4IxLVGLp6chnfNtyA8wDQYJKoZIhvcNAQELBQADggEBAD7s
    # DVoks/Mi0RXILHwlKXaoHV0cLToaxO8wYdd+C2D9wz0PxK+L/e8q3yBVN7Dh9tGS
    # dQ9RtG6ljlriXiSBThCk7j9xjmMOE0ut119EefM2FAaK95xGTlz/kLEbBw6RFfu6
    # r7VRwo0kriTGxycqoSkoGjpxKAI8LpGjwCUR4pwUR6F6aGivm6dcIFzZcbEMj7uo
    # +MUSaJ/PQMtARKUT8OZkDCUIQjKyNookAv4vcn4c10lFluhZHen6dGRrsutmQ9qz
    # sIzV6Q3d9gEgzpkxYz0IGhizgZtPxpMQBvwHgfqL2vmCSfdibqFT+hKUGIUukpHq
    # aGxEMrJmoecYpJpkUe8wggU6MIIEIqADAgECAhAGsBFbtfCQ0/DaDmIsYn1YMA0G
    # CSqGSIb3DQEBCwUAMHIxCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2VydCBJ
    # bmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xMTAvBgNVBAMTKERpZ2lDZXJ0
    # IFNIQTIgQXNzdXJlZCBJRCBDb2RlIFNpZ25pbmcgQ0EwHhcNMTcw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CBhAYIKwYBBQUHAQEEeDB2MCQGCCsGAQUFBzAB
    # hhhodHRwOi8vb2NzcC5kaWdpY2VydC5jb20wTgYIKwYBBQUHMAKGQmh0dHA6Ly9j
    # YWNlcnRzLmRpZ2ljZXJ0LmNvbS9EaWdpQ2VydFNIQTJBc3N1cmVkSURDb2RlU2ln
    # bmluZ0NBLmNydDAMBgNVHRMBAf8EAjAAMA0GCSqGSIb3DQEBCwUAA4IBAQCLBAE/
    # 2x4amEecDEoy9g+WmWMROiB4GnkPqj+IbiwftmwC5/7yL3/592HOFMJr0qOgUt51
    # moE8SuuLuOGw63c5+/48LJS4jP2XzbVNByRPIxPWorm4t/OzTJNziTowHQ+wLwwI
    # 8U97+8DaHCNL7iLZNEiqbVlpF3j7SMWGgf2BVYADJyxluNzf0ZUO+lXN4gOkM8tl
    # VDc7SjZEKvu6ckAaxXf7NPbCXVL/3+LvdmoLbT3vJlfzeXqduO3oieB10ic3ug5T
    # XtoYmyEk/P3yR3x/TqUlg1x/xaolBxy5TyMeSLcBlYn42fnQL154bvMGwFiCsHWQ
    # wY09I0xpEysOMiy8MIIGajCCBVKgAwIBAgIQAwGaAjr/WLFr1tXq5hfwZjANBgkq
    # hkiG9w0BAQUFADBiMQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5j
    # MRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSEwHwYDVQQDExhEaWdpQ2VydCBB
    # c3N1cmVkIElEIENBLTEwHhcNMTQxMDIyMDAwMDAwWhcNMjQxMDIyMDAwMDAwWjBH
    # MQswCQYDVQQGEwJVUzERMA8GA1UEChMIRGlnaUNlcnQxJTAjBgNVBAMTHERpZ2lD
    # ZXJ0IFRpbWVzdGFtcCBSZXNwb25kZXIwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAw
    # ggEKAoIBAQCjZF38fLPggjXg4PbGKuZJdTvMbuBTqZ8fZFnmfGt/a4ydVfiS457V
    # WmNbAklQ2YPOb2bu3cuF6V+l+dSHdIhEOxnJ5fWRn8YUOawk6qhLLJGJzF4o9GS2
    # ULf1ErNzlgpno75hn67z/RJ4dQ6mWxT9RSOOhkRVfRiGBYxVh3lIRvfKDo2n3k5f
    # 4qi2LVkCYYhhchhoubh87ubnNC8xd4EwH7s2AY3vJ+P3mvBMMWSN4+v6GYeofs/s
    # jAw2W3rBerh4x8kGLkYQyI3oBGDbvHN0+k7Y/qpA8bLOcEaD6dpAoVk62RUJV5lW
    # MJPzyWHM0AjMa+xiQpGsAsDvpPCJEY93AgMBAAGjggM1MIIDMTAOBgNVHQ8BAf8E
    # BAMCB4AwDAYDVR0TAQH/BAIwADAWBgNVHSUBAf8EDDAKBggrBgEFBQcDCDCCAb8G
    # A1UdIASCAbYwggGyMIIBoQYJYIZIAYb9bAcBMIIBkjAoBggrBgEFBQcCARYcaHR0
    # cHM6Ly93d3cuZGlnaWNlcnQuY29tL0NQUzCCAWQGCCsGAQUFBwICMIIBVh6CAVIA
    # QQBuAHkAIAB1AHMAZQAgAG8AZgAgAHQAaABpAHMAIABDAGUAcgB0AGkAZgBpAGMA
    # YQB0AGUAIABjAG8AbgBzAHQAaQB0AHUAdABlAHMAIABhAGMAYwBlAHAAdABhAG4A
    # YwBlACAAbwBmACAAdABoAGUAIABEAGkAZwBpAEMAZQByAHQAIABDAFAALwBDAFAA
    # UwAgAGEAbgBkACAAdABoAGUAIABSAGUAbAB5AGkAbgBnACAAUABhAHIAdAB5ACAA
    # QQBnAHIAZQBlAG0AZQBuAHQAIAB3AGgAaQBjAGgAIABsAGkAbQBpAHQAIABsAGkA
    # YQBiAGkAbABpAHQAeQAgAGEAbgBkACAAYQByAGUAIABpAG4AYwBvAHIAcABvAHIA
    # YQB0AGUAZAAgAGgAZQByAGUAaQBuACAAYgB5ACAAcgBlAGYAZQByAGUAbgBjAGUA
    # LjALBglghkgBhv1sAxUwHwYDVR0jBBgwFoAUFQASKxOYspkH7R7for5XDStnAs0w
    # HQYDVR0OBBYEFGFaTS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ZIhvcNAQkDMQsGCSqGSIb3DQEHATAcBgkqhkiG9w0B
    # CQUxDxcNMTcwODA3MDAwNDQ4WjAjBgkqhkiG9w0BCQQxFgQUzroxmjMzyDySdFO6
    # 0hKcgmPk6ucwDQYJKoZIhvcNAQEBBQAEggEAZeoeE5mVPSInYwgxsxqxygIbqxZ0
    # Y7C1Pu3oUSjaQ5HvKooKqYs3SrgePstABzQvSEoyxiF3cVJFaKQ9ZPohVguSny0h
    # CBOmgFTBrcsRMLHyL7MTJ5br3sfeCaLcw8kKrXbu0jkCY0XW4gN5fTjFEGO/FdnP
    # TQm/q/w6yGp2AGhoZZDxR+ygiog1DQpLAyGViHG2o6Indeoze6lQ4X98sB92bjBV
    # jpn/cJoO152dr+pGPo2CNLZKVxlwhXAjbmafRxJYDj7ZCohD9nN+ffJ7vqyogRJY
    # EYJX2F3d5aSY9z748KBlDGTXvZUlRX3UcGsdwOjYW6nrfXUUnJZK+K9FRw==
    # SIG # End signature block
    
  • tools\chocolateyInstall\helpers\functions\Get-ChocolateyUnzip.ps1 Show
    # Copyright © 2017 Chocolatey Software, Inc.
    # Copyright © 2015 - 2017 RealDimensions Software, LLC
    # Copyright © 2011 - 2015 RealDimensions Software, LLC & original authors/contributors from https://github.com/chocolatey/chocolatey
    #
    # Licensed under the Apache License, Version 2.0 (the "License");
    # you may not use this file except in compliance with the License.
    # You may obtain a copy of the License at
    #
    #     http://www.apache.org/licenses/LICENSE-2.0
    #
    # Unless required by applicable law or agreed to in writing, software
    # distributed under the License is distributed on an "AS IS" BASIS,
    # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    # See the License for the specific language governing permissions and
    # limitations under the License.
    
    function Get-ChocolateyUnzip {
    <#
    .SYNOPSIS
    Unzips an archive file and returns the location for further processing.
    
    .DESCRIPTION
    This unzips files using the 7-zip command line tool 7z.exe.
    Supported archive formats are listed at:
    https://sevenzip.osdn.jp/chm/general/formats.htm
    Prior to 0.9.10.1, 7za.exe was used. Supported archive formats for
    7za.exe are: 7z, lzma, cab, zip, gzip, bzip2, and tar.
    
    .INPUTS
    None
    
    .OUTPUTS
    Returns the passed in $destination.
    
    .NOTES
    If extraction fails, an exception is thrown.
    
    If you are embedding files into a package, ensure that you have the
    rights to redistribute those files if you are sharing this package
    publicly (like on the community feed). Otherwise, please use
    Install-ChocolateyZipPackage to download those resources from their
    official distribution points.
    
    Starting in 0.9.10, will automatically call Set-PowerShellExitCode to
    set the package exit code based on 7-zip's exit code.
    
    .PARAMETER FileFullPath
    This is the full path to the zip file. If embedding it in the package
    next to the install script, the path will be like
    `"$(Split-Path -Parent $MyInvocation.MyCommand.Definition)\\file.zip"`
    
    In 0.10.1+, `File` is an alias for FileFullPath.
    
    This can be a 32-bit or 64-bit file. This is mandatory in earlier versions
    of Chocolatey, but optional if FileFullPath64 has been provided.
    
    .PARAMETER FileFullPath64
    Full file path to a 64-bit native installer to run. Available in 0.10.4+.
    If embedding in the package, you can get it to the path with
    `"$(Split-Path -parent $MyInvocation.MyCommand.Definition)\\INSTALLER_FILE"`
    
    Provide this when you want to provide both 32-bit and 64-bit
    installers or explicitly only a 64-bit installer (which will cause a package 
    install failure on 32-bit systems).
    
    .PARAMETER Destination
    This is a directory where you would like the unzipped files to end up.
    If it does not exist, it will be created.
    
    .PARAMETER SpecificFolder
    OPTIONAL - This is a specific directory within zip file to extract.
    
    .PARAMETER PackageName
    OPTIONAL - This will faciliate logging unzip activity for subsequent
    uninstalls
    
    .PARAMETER IgnoredArguments
    Allows splatting with arguments that do not apply. Do not use directly.
    
    .EXAMPLE
    >
    # Path to the folder where the script is executing
    $toolsDir = (Split-Path -parent $MyInvocation.MyCommand.Definition)
    Get-ChocolateyUnzip -FileFullPath "c:\someFile.zip" -Destination $toolsDir
    
    .LINK
    Install-ChocolateyZipPackage
    #>
    param(
      [alias("file")][parameter(Mandatory=$false, Position=0)][string] $fileFullPath,
      [parameter(Mandatory=$true, Position=1)][string] $destination,
      [parameter(Mandatory=$false, Position=2)][string] $specificFolder,
      [parameter(Mandatory=$false, Position=3)][string] $packageName,
      [alias("file64")][parameter(Mandatory=$false)][string] $fileFullPath64,
      [parameter(ValueFromRemainingArguments = $true)][Object[]] $ignoredArguments
    )
    
      Write-FunctionCallLogMessage -Invocation $MyInvocation -Parameters $PSBoundParameters
    
       $bitnessMessage = ''
        $zipfileFullPath=$fileFullPath
      if ((Get-ProcessorBits 32) -or $env:ChocolateyForceX86 -eq 'true') {
        if (!$fileFullPath) { throw "32-bit archive is not supported for $packageName"; }
        if ($fileFullPath64) { $bitnessMessage = '32-bit '; }
      } elseif ($fileFullPath64) {
        $zipfileFullPath = $fileFullPath64
        $bitnessMessage = '64-bit '
      }
      
      if ($zipfileFullPath -eq '' -or $zipfileFullPath -eq $null) {
        throw 'Package parameters incorrect, either FileFullPath or FileFullPath64 must be specified.'
      }
      
      if ($packageName) {
        $packagelibPath = $env:ChocolateyPackageFolder
        if (!(Test-Path -path $packagelibPath)) {
          New-Item $packagelibPath -type directory
        }
    
        $zipFilename=split-path $zipfileFullPath -Leaf
        $zipExtractLogFullPath= Join-Path $packagelibPath $zipFilename`.txt
      }
    
      if ($env:chocolateyPackageName -ne $null -and $env:chocolateyPackageName -eq $env:ChocolateyInstallDirectoryPackage) {
        Write-Warning "Install Directory override not available for zip packages at this time.`n If this package also runs a native installer using Chocolatey`n functions, the directory will be honored."
      }
    
      Write-Host "Extracting $bitnessMessage$zipfileFullPath to $destination..."
      if (![System.IO.Directory]::Exists($destination)) { [System.IO.Directory]::CreateDirectory($destination) | Out-Null }
    
      $7zip = Join-Path "$helpersPath" '..\tools\7z.exe'
      if (!([System.IO.File]::Exists($7zip))) {
        Update-SessionEnvironment
        $7zip = Join-Path "$env:ChocolateyInstall" 'tools\7z.exe'
      }
      $7zip = [System.IO.Path]::GetFullPath($7zip)
      Write-Debug "7zip found at `'$7zip`'"
    
      # 32-bit 7z would not find C:\Windows\System32\config\systemprofile\AppData\Local\Temp,
      # because it gets translated to C:\Windows\SysWOW64\... by the WOW redirection layer.
      # Replace System32 with sysnative, which does not get redirected.
      # 32-bit 7z is required so it can see both architectures
      if ([IntPtr]::Size -ne 4) {
        $fileFullPathNoRedirection = $zipfileFullPath -ireplace ([regex]::Escape([Environment]::GetFolderPath('System'))),(Join-Path $Env:SystemRoot 'SysNative')
        $destinationNoRedirection = $destination -ireplace ([regex]::Escape([Environment]::GetFolderPath('System'))),(Join-Path $Env:SystemRoot 'SysNative')
      } else {
        $fileFullPathNoRedirection = $zipfileFullPath
        $destinationNoRedirection = $destination
      }
    
      $params = "x -aoa -bd -bb1 -o`"$destinationNoRedirection`" -y `"$fileFullPathNoRedirection`""
      if ($specificfolder) {
        $params += " `"$specificfolder`""
      }
      Write-Debug "Executing command ['$7zip' $params]"
    
      # Capture 7z's output into a StringBuilder and write it out in blocks, to improve I/O performance.
      $global:zipFileList = New-Object System.Text.StringBuilder
      $global:zipDestinationFolder = $destination
    
      # Redirecting output slows things down a bit.
      $writeOutput = {
        if ($EventArgs.Data -ne $null) {
          $line = $EventArgs.Data
          Write-Verbose "$line"
          if ($line.StartsWith("- ")) {
            $global:zipFileList.AppendLine($global:zipDestinationFolder + "\" + $line.Substring(2))
          }
        }
      }
    
      $writeError = {
        if ($EventArgs.Data -ne $null) {
          Write-Error "$($EventArgs.Data)"
        }
      }
    
      $process = New-Object System.Diagnostics.Process
      $process.EnableRaisingEvents = $true
      Register-ObjectEvent -InputObject $process -SourceIdentifier "LogOutput_ChocolateyZipProc" -EventName OutputDataReceived -Action $writeOutput | Out-Null
      Register-ObjectEvent -InputObject $process -SourceIdentifier "LogErrors_ChocolateyZipProc" -EventName ErrorDataReceived -Action  $writeError | Out-Null
    
      $process.StartInfo = new-object System.Diagnostics.ProcessStartInfo($7zip, $params)
      $process.StartInfo.RedirectStandardOutput = $true
      $process.StartInfo.RedirectStandardError = $true
      $process.StartInfo.UseShellExecute = $false
      $process.StartInfo.WorkingDirectory = Get-Location
      $process.StartInfo.WindowStyle = [System.Diagnostics.ProcessWindowStyle]::Hidden
    
      $process.Start() | Out-Null
      if ($process.StartInfo.RedirectStandardOutput) { $process.BeginOutputReadLine() }
      if ($process.StartInfo.RedirectStandardError) { $process.BeginErrorReadLine() }
      $process.WaitForExit()
    
      # For some reason this forces the jobs to finish and waits for
      # them to do so. Without this it never finishes.
      Unregister-Event -SourceIdentifier "LogOutput_ChocolateyZipProc"
      Unregister-Event -SourceIdentifier "LogErrors_ChocolateyZipProc"
    
      # sometimes the process hasn't fully exited yet.
      for ($loopCount=1; $loopCount -le 15; $loopCount++) {
        if ($process.HasExited) { break; }
        Write-Debug "Waiting for 7z.exe process to exit - $loopCount/15 seconds";
        Start-Sleep 1;
      }
    
      $exitCode = $process.ExitCode
      $process.Dispose()
    
      Set-PowerShellExitCode $exitCode
      Write-Debug "Command ['$7zip' $params] exited with `'$exitCode`'."
    
      if ($zipExtractLogFullPath) {
        Set-Content $zipExtractLogFullPath $global:zipFileList.ToString() -Encoding UTF8 -Force
      }
    
      Write-Debug "7z exit code: $exitCode"
      switch ($exitCode) {
        0 { break }
        1 { throw 'Some files could not be extracted' } # this one is returned e.g. for access denied errors
        2 { throw '7-Zip encountered a fatal error while extracting the files' }
        7 { throw '7-Zip command line error' }
        8 { throw '7-Zip out of memory' }
        255 { throw 'Extraction cancelled by the user' }
        default { throw "7-Zip signalled an unknown error (code $exitCode)" }
      }
    
      $env:ChocolateyPackageInstallLocation = $destination
      return $destination
    }
    
    # SIG # Begin signature block
    # MIIcpwYJKoZIhvcNAQcCoIIcmDCCHJQCAQExDzANBglghkgBZQMEAgEFADB5Bgor
    # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
    # KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCB2FWwtuQQfjYzA
    # 4bYkIxeQ0BxUQ9k5F6dneeJk/X3xCqCCF7EwggUwMIIEGKADAgECAhAECRgbX9W7
    # ZnVTQ7VvlVA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mNydDCBgQYDVR0fBHow
    # eDA6oDigNoY0aHR0cDovL2NybDQuZGlnaWNlcnQuY29tL0RpZ2lDZXJ0QXNzdXJl
    # ZElEUm9vdENBLmNybDA6oDigNoY0aHR0cDovL2NybDMuZGlnaWNlcnQuY29tL0Rp
    # Z2lDZXJ0QXNzdXJlZElEUm9vdENBLmNybDBPBgNVHSAESDBGMDgGCmCGSAGG/WwA
    # AgQwKjAoBggrBgEFBQcCARYcaHR0cHM6Ly93d3cuZGlnaWNlcnQuY29tL0NQUzAK
    # BghghkgBhv1sAzAdBgNVHQ4EFgQUWsS5eyoKo6XqcQPAYPkt9mV1DlgwHwYDVR0j
    # BBgwFoAUReuir/SSy4IxLVGLp6chnfNtyA8wDQYJKoZIhvcNAQELBQADggEBAD7s
    # DVoks/Mi0RXILHwlKXaoHV0cLToaxO8wYdd+C2D9wz0PxK+L/e8q3yBVN7Dh9tGS
    # dQ9RtG6ljlriXiSBThCk7j9xjmMOE0ut119EefM2FAaK95xGTlz/kLEbBw6RFfu6
    # r7VRwo0kriTGxycqoSkoGjpxKAI8LpGjwCUR4pwUR6F6aGivm6dcIFzZcbEMj7uo
    # +MUSaJ/PQMtARKUT8OZkDCUIQjKyNookAv4vcn4c10lFluhZHen6dGRrsutmQ9qz
    # sIzV6Q3d9gEgzpkxYz0IGhizgZtPxpMQBvwHgfqL2vmCSfdibqFT+hKUGIUukpHq
    # aGxEMrJmoecYpJpkUe8wggU6MIIEIqADAgECAhAGsBFbtfCQ0/DaDmIsYn1YMA0G
    # CSqGSIb3DQEBCwUAMHIxCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2VydCBJ
    # bmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xMTAvBgNVBAMTKERpZ2lDZXJ0
    # IFNIQTIgQXNzdXJlZCBJRCBDb2RlIFNpZ25pbmcgQ0EwHhcNMTcwMzI4MDAwMDAw
    # WhcNMTgwNDAzMTIwMDAwWjB3MQswCQYDVQQGE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ULf1ErNzlgpno75hn67z/RJ4dQ6mWxT9RSOOhkRVfRiGBYxVh3lIRvfKDo2n3k5f
    # 4qi2LVkCYYhhchhoubh87ubnNC8xd4EwH7s2AY3vJ+P3mvBMMWSN4+v6GYeofs/s
    # jAw2W3rBerh4x8kGLkYQyI3oBGDbvHN0+k7Y/qpA8bLOcEaD6dpAoVk62RUJV5lW
    # MJPzyWHM0AjMa+xiQpGsAsDvpPCJEY93AgMBAAGjggM1MIIDMTAOBgNVHQ8BAf8E
    # BAMCB4AwDAYDVR0TAQH/BAIwADAWBgNVHSUBAf8EDDAKBggrBgEFBQcDCDCCAb8G
    # A1UdIASCAbYwggGyMIIBoQYJYIZIAYb9bAcBMIIBkjAoBggrBgEFBQcCARYcaHR0
    # cHM6Ly93d3cuZGlnaWNlcnQuY29tL0NQUzCCAWQGCCsGAQUFBwICMIIBVh6CAVIA
    # QQBuAHkAIAB1AHMAZQAgAG8AZgAgAHQAaABpAHMAIABDAGUAcgB0AGkAZgBpAGMA
    # YQB0AGUAIABjAG8AbgBzAHQAaQB0AHUAdABlAHMAIABhAGMAYwBlAHAAdABhAG4A
    # YwBlACAAbwBmACAAdABoAGUAIABEAGkAZwBpAEMAZQByAHQAIABDAFAALwBDAFAA
    # UwAgAGEAbgBkACAAdABoAGUAIABSAGUAbAB5AGkAbgBnACAAUABhAHIAdAB5ACAA
    # QQBnAHIAZQBlAG0AZQBuAHQAIAB3AGgAaQBjAGgAIABsAGkAbQBpAHQAIABsAGkA
    # YQBiAGkAbABpAHQAeQAgAGEAbgBkACAAYQByAGUAIABpAG4AYwBvAHIAcABvAHIA
    # YQB0AGUAZAAgAGgAZQByAGUAaQBuACAAYgB5ACAAcgBlAGYAZQByAGUAbgBjAGUA
    # LjALBglghkgBhv1sAxUwHwYDVR0jBBgwFoAUFQASKxOYspkH7R7for5XDStnAs0w
    # HQYDVR0OBBYEFGFaTSS2STKdSip5GoNL9B6Jwcp9MH0GA1UdHwR2MHQwOKA2oDSG
    # Mm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B
    # CQUxDxcNMTcwODA3MDAwNDQ4WjAjBgkqhkiG9w0BCQQxFgQU2hbH88bpMnTYt+0/
    # 3yE/WlghIhEwDQYJKoZIhvcNAQEBBQAEggEAbyJc5cHPjEPa4FGoC89eHqbpmt3T
    # qtHPnzvf2Y/t9L1eSc/v0SaCNvy2pF+90AamrWNlpIsZtxCQul8J10K5Ys605t7I
    # l+KzLoloLCr+KN729bckw2i/vAsx3+rSToIENMIuaxYvNxKKl1AZPinW9l6afi4P
    # 70DI+Awigfp1PnhqWj8o6tRCagUuKIqknigYErqFBp6/5HK3/Oan4RGPQ1VgG90N
    # 9+kUfR/8iQV6CV3ln/zoRJ59SSdu8wz2XvCNbcZKGs+w+VMXNwaaREcUcC9yajT3
    # ZLCNAuyXX0y9EywvLfngCRkvDWcHHvG8TgIdgkOzFxUZ2NH9m+H5RYcPvQ==
    # SIG # End signature block
    
  • tools\chocolateyInstall\helpers\functions\Get-ChocolateyWebFile.ps1 Show
    # Copyright © 2017 Chocolatey Software, Inc.
    # Copyright © 2015 - 2017 RealDimensions Software, LLC
    # Copyright © 2011 - 2015 RealDimensions Software, LLC & original authors/contributors from https://github.com/chocolatey/chocolatey
    #
    # Licensed under the Apache License, Version 2.0 (the "License");
    # you may not use this file except in compliance with the License.
    # You may obtain a copy of the License at
    #
    #     http://www.apache.org/licenses/LICENSE-2.0
    #
    # Unless required by applicable law or agreed to in writing, software
    # distributed under the License is distributed on an "AS IS" BASIS,
    # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    # See the License for the specific language governing permissions and
    # limitations under the License.
    
    function Get-ChocolateyWebFile {
    <#
    .SYNOPSIS
    Downloads a file from the internets.
    
    .DESCRIPTION
    This will download a file from a url, tracking with a progress bar.
    It returns the filepath to the downloaded file when it is complete.
    
    .NOTES
    Chocolatey works best when the packages contain the software it is
    managing and doesn't require downloads. However most software in the
    Windows world requires redistribution rights and when sharing packages
    publicly (like on the community feed), maintainers may not have those
    aforementioned rights. Chocolatey understands how to work with that,
    hence this function. You are not subject to this limitation with
    internal packages.
    
    .PARAMETER PackageName
    The name of the package - while this is an arbitrary value, it's
    recommended that it matches the package id.
    
    .PARAMETER FileFullPath
    This is the full path of the resulting file name.
    
    .PARAMETER Url
    This is the 32 bit url to download the resource from. This resource can
    be used on 64 bit systems when a package has both a Url and Url64bit
    specified if a user passes `--forceX86`. If there is only a 64 bit url
    available, please remove do not use the paramter (only use Url64bit).
    Will fail on 32bit systems if missing or if a user attempts to force
    a 32 bit installation on a 64 bit system.
    
    Prefer HTTPS when available. Can be HTTP, FTP, or File URIs.
    
    .PARAMETER Url64bit
    OPTIONAL - If there is a 64 bit resource available, use this
    parameter. Chocolatey will automatically determine if the user is
    running a 64 bit OS or not and adjust accordingly. Please note that
    the 32 bit url will be used in the absence of this. This parameter
    should only be used for 64 bit native software. If the original Url
    contains both (which is quite rare), set this to '$url' Otherwise
    remove this parameter.
    
    Prefer HTTPS when available. Can be HTTP, FTP, or File URIs.
    
    In 0.10.1+, `Url64` is an alias for Url64bit.
    
    .PARAMETER Checksum
    The checksum hash value of the Url resource. This allows a checksum to
    be validated for files that are not local. The checksum type is covered
    by ChecksumType.
    
    **NOTE:** Checksums in packages are meant as a measure to validate the
    originally intended file that was used in the creation of a package is
    the same file that is received at a future date. Since this is used for
    other steps in the process related to the community repository, it
    ensures that the file a user receives is the same file a maintainer
    and a moderator (if applicable), plus any moderation review has
    intended for you to receive with this package. If you are looking at a
    remote source that uses the same url for updates, you will need to
    ensure the package also stays updated in line with those remote
    resource updates. You should look into [automatic packaging](https://chocolatey.org/docs/automatic-packages)
    to help provide that functionality.
    
    .PARAMETER ChecksumType
    The type of checkum that the file is validated with - valid
    values are 'md5', 'sha1', 'sha256' or 'sha512' - defaults to 'md5'.
    
    MD5 is not recommended as certain organizations need to use FIPS
    compliant algorithms for hashing - see
    https://support.microsoft.com/en-us/kb/811833 for more details.
    
    The recommendation is to use at least SHA256.
    
    .PARAMETER Checksum64
    OPTIONAL if no Url64bit - The checksum hash value of the Url64bit
    resource. This allows a checksum to be validated for files that are not
    local. The checksum type is covered by ChecksumType64.
    
    **NOTE:** Checksums in packages are meant as a measure to validate the
    originally intended file that was used in the creation of a package is
    the same file that is received at a future date. Since this is used for
    other steps in the process related to the community repository, it
    ensures that the file a user receives is the same file a maintainer
    and a moderator (if applicable), plus any moderation review has
    intended for you to receive with this package. If you are looking at a
    remote source that uses the same url for updates, you will need to
    ensure the package also stays updated in line with those remote
    resource updates. You should look into [automatic packaging](https://chocolatey.org/docs/automatic-packages)
    to help provide that functionality.
    
    **NOTE:** To determine checksums, you can get that from the original
    site if provided. You can also use the [checksum tool available on
    the community feed](https://chocolatey.org/packages/checksum) (`choco install checksum`)
    and use it e.g. `checksum -t sha256 -f path\to\file`. Ensure you
    provide checksums for all remote resources used.
    
    .PARAMETER ChecksumType64
    OPTIONAL - The type of checkum that the file is validated with - valid
    values are 'md5', 'sha1', 'sha256' or 'sha512' - defaults to
    ChecksumType parameter value.
    
    MD5 is not recommended as certain organizations need to use FIPS
    compliant algorithms for hashing - see
    https://support.microsoft.com/en-us/kb/811833 for more details.
    
    The recommendation is to use at least SHA256.
    
    .PARAMETER Options
    OPTIONAL - Specify custom headers. Available in 0.9.10+.
    
    .PARAMETER GetOriginalFileName
    OPTIONAL switch to allow Chocolatey to determine the original file name
    from the url resource. Available in 0.9.10+.
    
    .PARAMETER ForceDownload
    OPTIONAL switch to force download of file every time, even if the file
    already exists.
    
    Available in 0.10.1+.
    
    .PARAMETER IgnoredArguments
    Allows splatting with arguments that do not apply. Do not use directly.
    
    .EXAMPLE
    Get-ChocolateyWebFile '__NAME__' 'C:\somepath\somename.exe' 'URL' '64BIT_URL_DELETE_IF_NO_64BIT'
    
    .EXAMPLE
    >
    # Download from an HTTPS location
    $toolsDir = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)"
    Get-ChocolateyWebFile -PackageName 'bob' -FileFullPath "$toolsDir\bob.exe" -Url 'https://somewhere/bob.exe'
    
    .EXAMPLE
    >
    # Download from FTP
    $toolsDir = "$(Split-Path -Parent $MyInvocation.MyCommand.Definition)"
    Get-ChocolateyWebFile -PackageName 'bob' -FileFullPath "$toolsDir\bob.exe" -Url 'ftp://somewhere/bob.exe'
    
    .EXAMPLE
    >
    # Download from a file share
    $toolsDir = "$(Split-Path -Parent $MyInvocation.MyCommand.Definition)"
    Get-ChocolateyWebFile -PackageName 'bob' -FileFullPath "$toolsDir\bob.exe" -Url 'file:///\\fileshare\location\bob.exe'
    
    .EXAMPLE
    >
    $options =
    @{
      Headers = @{
        Accept = 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8';
        'Accept-Charset' = 'ISO-8859-1,utf-8;q=0.7,*;q=0.3';
        'Accept-Language' = 'en-GB,en-US;q=0.8,en;q=0.6';
        Cookie = 'requiredinfo=info';
        Referer = 'https://somelocation.com/';
      }
    }
    
    Get-ChocolateyWebFile -PackageName 'package' -FileFullPath "$(Split-Path -Parent $MyInvocation.MyCommand.Definition)\thefile.exe" -Url 'https://somelocation.com/thefile.exe' -Options $options
    
    .LINK
    Install-ChocolateyPackage
    
    .LINK
    Get-WebFile
    
    .LINK
    Get-WebFileName
    
    .LINK
    Get-FtpFile
    #>
    param(
      [parameter(Mandatory=$true, Position=0)][string] $packageName,
      [parameter(Mandatory=$true, Position=1)][string] $fileFullPath,
      [parameter(Mandatory=$false, Position=2)][string] $url = '',
      [parameter(Mandatory=$false, Position=3)]
      [alias("url64")][string] $url64bit = '',
      [parameter(Mandatory=$false)][string] $checksum = '',
      [parameter(Mandatory=$false)][string] $checksumType = '',
      [parameter(Mandatory=$false)][string] $checksum64 = '',
      [parameter(Mandatory=$false)][string] $checksumType64 = $checksumType,
      [parameter(Mandatory=$false)][hashtable] $options = @{Headers=@{}},
      [parameter(Mandatory=$false)][switch] $getOriginalFileName,
      [parameter(Mandatory=$false)][switch] $forceDownload,
      [parameter(ValueFromRemainingArguments = $true)][Object[]] $ignoredArguments
    )
    
      Write-FunctionCallLogMessage -Invocation $MyInvocation -Parameters $PSBoundParameters
    
      # url overrides
      $urlOverride = $env:ChocolateyUrlOverride
      $url64bitOverride = $env:ChocolateyUrl64bitOverride
      if ($urlOverride -ne $null -and $urlOverride -ne '') { $url = $urlOverride }
      if ($url64bitOverride -ne $null -and $url64bitOverride -ne '') { $url64bit = $url64bitOverride }
    
      if ($url -ne $null) { $url = $url.Replace("//","/").Replace(":/","://") }
      if ($url64bit -ne $null) { $url64bit = $url64bit.Replace("//","/").Replace(":/","://") }
    
      $url32bit = $url
    
      # allow user provided values for checksumming
      $checksum32Override = $env:chocolateyChecksum32
      $checksumType32Override = $env:chocolateyChecksumType32
      $checksum64Override = $env:chocolateyChecksum64
      $checksumType64Override = $env:chocolateyChecksumType64
      if ($checksum32Override -ne $null -and $checksum32Override -ne '') { $checksum = $checksum32Override }
      if ($checksumType32Override -ne $null -and $checksumType32Override -ne '') { $checksumType = $checksumType32Override }
      if ($checksum64Override -ne $null -and $checksum64Override -ne '') { $checksum64 = $checksum64Override }
      if ($checksumType64Override -ne $null -and $checksumType64Override -ne '') { $checksumType64 = $checksumType64Override }
    
      $checksum32 = $checksum
      $checksumType32 = $checksumType
      $bitWidth = 32
      if (Get-ProcessorBits 64) {
        $bitWidth = 64
      }
      Write-Debug "CPU is $bitWidth bit"
    
      $bitPackage = ''
      if ($url32bit -ne $url64bit -and $url64bit -ne $null -and $url64bit -ne '') { $bitPackage = '32 bit' }
    
      if ($bitWidth -eq 64 -and $url64bit -ne $null -and $url64bit -ne '') {
        Write-Debug "Setting url to '$url64bit' and bitPackage to $bitWidth"
        $bitPackage = '64 bit'
        $url = $url64bit
        # only set if urls are different
        if ($url32bit -ne $url64bit) {
          $checksum = $checksum64
          if ($checkSumType64 -ne '') {
            $checksumType = $checksumType64
          }
        }
      }
    
      $forceX86 = $env:chocolateyForceX86;
      if ($forceX86) {
        Write-Debug "User specified -x86 so forcing 32 bit"
        if ($url32bit -ne $url64bit) { $bitPackage = '32 bit' }
        $url = $url32bit
        $checksum =  $checksum32
        $checksumType = $checksumType32
      }
    
      # If we're on 32 bit or attempting to force 32 bit and there is no
      # 32 bit url, we need to throw an error.
      if ($url -eq $null -or $url -eq '') {
        throw "This package does not support $bitWidth bit architecture."
      }
    
      # determine if the url can be SSL/TLS
      if ($url.StartsWith('http:')) {
        try {
          $httpsUrl = $url.Replace("http://", "https://")
          Get-WebHeaders -Url $httpsUrl -ErrorAction "Stop" | Out-Null
          $url = $httpsUrl
          Write-Warning "Url has SSL/TLS available, switching to HTTPS for download"
        } catch {
          Write-Debug "Url does not have HTTPS available"
        }
      }
    
      if ($getOriginalFileName) {
        try {
          $fileFullPath = $fileFullPath -replace '\\chocolatey\\chocolatey\\', '\chocolatey\'
          $fileDirectory = [System.IO.Path]::GetDirectoryName($fileFullPath)
          $originalFileName = [System.IO.Path]::GetFileName($fileFullPath)
          $fileFullPath = Get-WebFileName -Url $url -DefaultName $originalFileName
          $fileFullPath = Join-Path $fileDirectory $fileFullPath
          $fileFullPath = [System.IO.Path]::GetFullPath($fileFullPath)
        } catch {
          Write-Host "Attempt to use original download file name failed for '$url'."
        }
      }
    
      try {
        $fileDirectory = $([System.IO.Path]::GetDirectoryName($fileFullPath))
        if (!(Test-Path($fileDirectory))) {
          [System.IO.Directory]::CreateDirectory($fileDirectory) | Out-Null
        }
      } catch {
        Write-Host "Attempt to create directory failed for '$fileFullPath'."
      }
    
      $urlIsRemote = $true
      $headers = @{}
      if ($url.StartsWith('http')) {
        try {
          $headers = Get-WebHeaders -Url $url -ErrorAction "Stop"
        } catch {
          if ($host.Version -lt (New-Object 'Version' 3,0)) {
            Write-Debug "Converting Security Protocol to SSL3 only for Powershell v2"
            # this should last for the entire duration
            $originalProtocol = [System.Net.ServicePointManager]::SecurityProtocol
            [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]::Ssl3
            try {
              $headers = Get-WebHeaders -Url $url -ErrorAction "Stop"
            } catch {
              Write-Host "Attempt to get headers for $url failed.`n  $($_.Exception.Message)"
              [System.Net.ServicePointManager]::SecurityProtocol = $originalProtocol
            }
          } else {
            Write-Host "Attempt to get headers for $url failed.`n  $($_.Exception.Message)"
          }
        }
    
        $needsDownload = $true
        $fiCached = New-Object System.IO.FileInfo($fileFullPath)
        if ($fiCached.Exists -and -not ($forceDownload)) {
          if ($checksum -ne $null -and $checksum -ne '') {
              try {
                Write-Host "File appears to be downloaded already. Verifying with package checksum to determine if it needs to be redownloaded."
                Get-ChecksumValid -file $fileFullPath -checkSum $checksum -checksumType $checksumType -originalUrl $url -ErrorAction "Stop"
                $needsDownload = $false
              } catch {
                Write-Debug "Existing file failed checksum. Will be redownloaded from url."
              }
          }
          elseif ($headers.Count -ne 0 -and $headers.ContainsKey("Content-Length")) {
            # if the file already exists there is no reason to download it again.
            if ($fiCached.Length -eq $headers["Content-Length"]) { $needsDownload = $false }
          }
        }
    
        if ($needsDownload) {
          Write-Host "Downloading $packageName $bitPackage
      from `'$url`'"
          Get-WebFile -Url $url -FileName $fileFullPath -Options $options
        } else {
          Write-Debug "$($packageName)'s requested file has already been downloaded. Using cached copy at
     '$fileFullPath'."
        }
      } elseif ($url.StartsWith('ftp')) {
        Write-Host "Ftp-ing $packageName
      from '$url'"
        Get-FtpFile -Url $url -FileName $fileFullPath
      } else {
        if ($url.StartsWith('file:')) { $url = ([uri] $url).LocalPath }
        Write-Host "Copying $packageName
      from `'$url`'"
        Copy-Item $url -Destination $fileFullPath -Force
        $urlIsRemote = $false
      }
    
      Start-Sleep 2 #give it a sec or two to finish up copying
    
      $fi = New-Object System.IO.FileInfo($fileFullPath)
      # validate file exists
      if (!($fi.Exists)) { throw "Chocolatey expected a file to be downloaded to `'$fileFullPath`' but nothing exists at that location." }
    
      Get-VirusCheckValid -Location $url -File $fileFullPath
    
      if ($headers.Count -ne 0 -and ($checksum -eq $null -or $checksum -eq '')) {
        # validate length is what we expected
        Write-Debug "Checking that '$fileFullPath' is the size we expect it to be."
        if ($headers.ContainsKey("Content-Length") -and ($fi.Length -ne $headers["Content-Length"]))  { throw "Chocolatey expected a file at '$fileFullPath' to be of length '$($headers["Content-Length"])' but the length was '$($fi.Length)'." }
    
        if ($headers.ContainsKey("X-Checksum-Sha1")) {
          $remoteChecksum = $headers["X-Checksum-Sha1"]
          Write-Debug "Verifying remote checksum of '$remoteChecksum' for '$fileFullPath'."
          Get-ChecksumValid -File $fileFullPath -Checksum $remoteChecksum -ChecksumType 'sha1' -OriginalUrl $url
        }
      }
    
      #skip requirement for embedded files if checksum is not provided
      if ($urlIsRemote -or ($checksum -ne $null -and $checksum -ne '')) {
        Write-Debug "Verifying package provided checksum of '$checksum' for '$fileFullPath'."
        Get-ChecksumValid -File $fileFullPath -Checksum $checksum -ChecksumType $checksumType -OriginalUrl $url
      }
    
      return $fileFullPath
    }
    
    # SIG # Begin signature block
    # MIIcpwYJKoZIhvcNAQcCoIIcmDCCHJQCAQExDzANBglghkgBZQMEAgEFADB5Bgor
    # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
    # KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCApjH4V1hECJn6U
    # VMD8P8h4XqdYQFZtbh5A6CNjfTiU16CCF7EwggUwMIIEGKADAgECAhAECRgbX9W7
    # ZnVTQ7VvlVAIMA0GCSqGSIb3DQEBCwUAMGUxCzAJBgNVBAYTAlVTMRUwEwYDVQQK
    # EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xJDAiBgNV
    # BAMTG0RpZ2lDZXJ0IEFzc3VyZWQgSUQgUm9vdCBDQTAeFw0xMzEwMjIxMjAwMDBa
    # Fw0yODEwMjIxMjAwMDBaMHIxCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2Vy
    # dCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xMTAvBgNVBAMTKERpZ2lD
    # ZXJ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1UdIASCAbYwggGyMIIBoQYJYIZIAYb9bAcBMIIBkjAoBggrBgEFBQcCARYcaHR0
    # cHM6Ly93d3cuZGlnaWNlcnQuY29tL0NQUzCCAWQGCCsGAQUFBwICMIIBVh6CAVIA
    # QQBuAHkAIAB1AHMAZQAgAG8AZgAgAHQAaABpAHMAIABDAGUAcgB0AGkAZgBpAGMA
    # YQB0AGUAIABjAG8AbgBzAHQAaQB0AHUAdABlAHMAIABhAGMAYwBlAHAAdABhAG4A
    # YwBlACAAbwBmACAAdABoAGUAIABEAGkAZwBpAEMAZQByAHQAIABDAFAALwBDAFAA
    # UwAgAGEAbgBkACAAdABoAGUAIABSAGUAbAB5AGkAbgBnACAAUABhAHIAdAB5ACAA
    # QQBnAHIAZQBlAG0AZQBuAHQAIAB3AGgAaQBjAGgAIABsAGkAbQBpAHQAIABsAGkA
    # YQBiAGkAbABpAHQAeQAgAGEAbgBkACAAYQByAGUAIABpAG4AYwBvAHIAcABvAHIA
    # YQB0AGUAZAAgAGgAZQByAGUAaQBuACAAYgB5ACAAcgBlAGYAZQByAGUAbgBjAGUA
    # LjALBglghkgBhv1sAxUwHwYDVR0jBBgwFoAUFQASKxOYspkH7R7for5XDStnAs0w
    # HQYDVR0OBBYEFGFaTSS2STKdSip5GoNL9B6Jwcp9MH0GA1UdHwR2MHQwOKA2oDSG
    # Mmh0dHA6Ly9jcmwzLmRpZ2ljZXJ0LmNvbS9EaWdpQ2VydEFzc3VyZWRJRENBLTEu
    # Y3JsMDigNqA0hjJodHRwOi8vY3JsNC5kaWdpY2VydC5jb20vRGlnaUNlcnRBc3N1
    # cmVkSURDQS0xLmNybDB3BggrBgEFBQcBAQRrMGkwJAYIKwYBBQUHMAGGGGh0dHA6
    # Ly9vY3NwLmRpZ2ljZXJ0LmNvbTBBBggrBgEFBQcwAoY1aHR0cDovL2NhY2VydHMu
    # ZGlnaWNlcnQuY29tL0RpZ2lDZXJ0QXNzdXJlZElEQ0EtMS5jcnQwDQYJKoZIhvcN
    # AQEFBQADggEBAJ0lfhszTbImgVybhs4jIA+Ah+WI//+x1GosMe06FxlxF82pG7xa
    # FjkAneNshORaQPveBgGMN/qbsZ0kfv4gpFetW7easGAm6mlXIV00Lx9xsIOUGQVr
    # NZAQoHuXx/Y/5+IRQaa9YtnwJz04HShvOlIJ8OxwYtNiS7Dgc6aSwNOOMdgv420X
    # Ewbu5AO2FKvzj0OncZ0h3RTKFV2SQdr5D4HRmXQNJsQOfxu19aDxxncGKBXp2JPl
    # VRbwuwqrHNtcSCdmyKOLChzlldquxC5ZoGHd2vNtomHpigtt7BIYvfdVVEADkitr
    # wlHCCkivsNRu4PQUCjob4489yq9qjXvc2EQwggbNMIIFtaADAgECAhAG/fkDlgOt
    # 6gAK6z8nu7obMA0GCSqGSIb3DQEBBQUAMGUxCzAJBgNVBAYTAlVTMRUwEwYDVQQK
    # EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xJDAiBgNV
    # BAMTG0RpZ2lDZXJ0IEFzc3VyZWQgSUQgUm9vdCBDQTAeFw0wNjExMTAwMDAwMDBa
    # Fw0yMTExMTAwMDAwMDBaMGIxCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2Vy
    # dCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xITAfBgNVBAMTGERpZ2lD
    # ZXJ0IEFzc3VyZWQgSUQgQ0EtMTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC
    # ggEBAOiCLZn5ysJClaWAc0Bw0p5WVFypxNJBBo/JM/xNRZFcgZ/tLJz4FlnfnrUk
    # FcKYubR3SdyJxArar8tea+2tsHEx6886QAxGTZPsi3o2CAOrDDT+GEmC/sfHMUiA
    # fB6iD5IOUMnGh+s2P9gww/+m9/uizW9zI/6sVgWQ8DIhFonGcIj5BZd9o8dD3QLo
    # Oz3tsUGj7T++25VIxO4es/K8DCuZ0MZdEkKB4YNugnM/JksUkK5ZZgrEj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Qgb8NhAh0TN7zdLo0srafIClV2sTWHOcdqOMBj
    # xDPYK94wDQYJKoZIhvcNAQEBBQAEggEACh9hl3hK0Vgta1KXlHMBYfDMfCkB2TNN
    # 7fIFCL0WEeGpWm4LByEOydsNX/nslx08IKw4GbpXyG+OY182wlQQ0ZrOrLyoR+Vt
    # x31Ok3dHNU1uPbEO3GwLVq009nBtZ4W3AtfDNr2EvxWA4l0Q/lMboiRSXs2qovwk
    # F3N722DuuUkQSy/4DQXjCOT3dCt5VkRlK+4mqbWzNiC9HpYxYYWVgR5QkhTB7evP
    # Bspo14WgDg2UvflqANETr54zY4Txl4BfjvbVzlwdzLL9Y5pyvnIqXpF388EEmYTK
    # p1WsZeCtb9oNjamz/gkxhY2KAGlde/0ehkGzbAN/7ujG7iQ0NcJm+qGCAg8wggIL
    # BgkqhkiG9w0BCQYxggH8MIIB+AIBATB2MGIxCzAJBgNVBAYTAlVTMRUwEwYDVQQK
    # EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xITAfBgNV
    # BAMTGERpZ2lDZXJ0IEFzc3VyZWQgSUQgQ0EtMQIQAwGaAjr/WLFr1tXq5hfwZjAJ
    # BgUrDgMCGgUAoF0wGAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAcBgkqhkiG9w0B
    # CQUxDxcNMTcwODA3MDAwNDQ4WjAjBgkqhkiG9w0BCQQxFgQU5QtuIn/jracWlpan
    # Xmdt1Iy35EAwDQYJKoZIhvcNAQEBBQAEggEAQvm53+80lVmnrtguUGkQDjetbXMc
    # yCSd1piHHIkiC9jkbIIArsCgSR6fvgFBsZLZaJVspfk9xRZlV1B1CpwdL8bB0/fO
    # dzZOEOjmEuTBKpsEblc0W/gFoQNU6Im4tNiS2yQl0BS/caB+l9v2jK4MIui4PwAT
    # ORvS61y7r/c7/kh/+6kMun+PMf0/M6GVyArQLOoBGRb3outd0wJOu0IqhXYbbuDT
    # kat2zLuFaGPPlT8+vi+7qhNT02bmrGGZRi31PAdjg3Fjv0oYQixcChMY8LpbLefm
    # KQqrHaFpv+IXDaQ4Qe0mN31U18itiJVBNPw1PMT6lOnxCZTTyRTUm2OJOw==
    # SIG # End signature block
    
  • tools\chocolateyInstall\helpers\functions\Get-EnvironmentVariable.ps1 Show
    # Copyright © 2017 Chocolatey Software, Inc.
    # Copyright © 2015 - 2017 RealDimensions Software, LLC
    # Copyright © 2011 - 2015 RealDimensions Software, LLC & original authors/contributors from https://github.com/chocolatey/chocolatey
    #
    # Licensed under the Apache License, Version 2.0 (the "License");
    # you may not use this file except in compliance with the License.
    # You may obtain a copy of the License at
    #
    #     http://www.apache.org/licenses/LICENSE-2.0
    #
    # Unless required by applicable law or agreed to in writing, software
    # distributed under the License is distributed on an "AS IS" BASIS,
    # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    # See the License for the specific language governing permissions and
    # limitations under the License.
    
    function Get-EnvironmentVariable {
    <#
    .SYNOPSIS
    Gets an Environment Variable.
    
    .DESCRIPTION
    This will will get an environment variable based on the variable name
    and scope while accounting whether to expand the variable or not
    (e.g.: `%TEMP%`-> `C:\User\Username\AppData\Local\Temp`).
    
    .NOTES
    This helper reduces the number of lines one would have to write to get
    environment variables, mainly when not expanding the variables is a
    must.
    
    .PARAMETER Name
    The environemnt variable you want to get the value from.
    
    .PARAMETER Scope
    The environemnt variable target scope. This is `Process`, `User`, or
    `Machine`.
    
    .PARAMETER PreserveVariables
    A switch parameter stating whether you want to expand the variables or
    not. Defaults to false. Available in 0.9.10+.
    
    .PARAMETER IgnoredArguments
    Allows splatting with arguments that do not apply. Do not use directly.
    
    .EXAMPLE
    Get-EnvironmentVariable -Name 'TEMP' -Scope User -PreserveVariables
    
    .EXAMPLE
    Get-EnvironmentVariable -Name 'PATH' -Scope Machine
    
    .LINK
    Get-EnvironmentVariableNames
    
    .LINK
    Set-EnvironmentVariable
    #>
    [CmdletBinding()]
    [OutputType([string])]
    param(
      [Parameter(Mandatory=$true)][string] $Name,
      [Parameter(Mandatory=$true)][System.EnvironmentVariableTarget] $Scope,
      [Parameter(Mandatory=$false)][switch] $PreserveVariables = $false,
      [parameter(ValueFromRemainingArguments = $true)][Object[]] $ignoredArguments
    )
    
      # Do not log function call, it may expose variable names
    
      [string] $MACHINE_ENVIRONMENT_REGISTRY_KEY_NAME = "SYSTEM\CurrentControlSet\Control\Session Manager\Environment\";
      [Microsoft.Win32.RegistryKey] $win32RegistryKey = [Microsoft.Win32.Registry]::LocalMachine.OpenSubKey($MACHINE_ENVIRONMENT_REGISTRY_KEY_NAME)
      if ($Scope -eq [System.EnvironmentVariableTarget]::User) {
        [string] $USER_ENVIRONMENT_REGISTRY_KEY_NAME = "Environment";
        [Microsoft.Win32.RegistryKey] $win32RegistryKey = [Microsoft.Win32.Registry]::CurrentUser.OpenSubKey($USER_ENVIRONMENT_REGISTRY_KEY_NAME)
      } elseif ($Scope -eq [System.EnvironmentVariableTarget]::Process) {
        return [Environment]::GetEnvironmentVariable($Name, $Scope)
      }
    
      [Microsoft.Win32.RegistryValueOptions] $registryValueOptions = [Microsoft.Win32.RegistryValueOptions]::None
    
      if ($PreserveVariables) {
        Write-Verbose "Choosing not to expand environment names"
        $registryValueOptions = [Microsoft.Win32.RegistryValueOptions]::DoNotExpandEnvironmentNames
      }
    
      [string] $environmentVariableValue = [string]::Empty
    
      try {
        #Write-Verbose "Getting environment variable $Name"
        if ($win32RegistryKey -ne $null) {
          # Some versions of Windows do not have HKCU:\Environment
          $environmentVariableValue = $win32RegistryKey.GetValue($Name, [string]::Empty, $registryValueOptions)
        }
      } catch {
        Write-Debug "Unable to retrieve the $Name environment variable. Details: $_"
      } finally {
        if ($win32RegistryKey -ne $null) {
          $win32RegistryKey.Close()
        }
      }
    
      if ($environmentVariableValue -eq $null -or $environmentVariableValue -eq '') {
        $environmentVariableValue = [Environment]::GetEnvironmentVariable($Name, $Scope)
      }
    
      return $environmentVariableValue
    }
    
    # SIG # Begin signature block
    # MIIcpwYJ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BAAGjggHNMIIB
    # yTASBgNVHRMBAf8ECDAGAQH/AgEAMA4GA1UdDwEB/wQEAwIBhjATBgNVHSUEDDAK
    # BggrBgEFBQcDAzB5BggrBgEFBQcBAQRtMGswJAYIKwYBBQUHMAGGGGh0dHA6Ly9v
    # Y3NwLmRpZ2ljZXJ0LmNvbTBDBggrBgEFBQcwAoY3aHR0cDovL2NhY2VydHMuZGln
    # aWNlcnQuY29tL0RpZ2lDZXJ0QXNzdXJlZElEUm9vdENBLmNydDCBgQYDVR0fBHow
    # eDA6oDigNoY0aHR0cDovL2NybDQuZGlnaWNlcnQuY29tL0RpZ2lDZXJ0QXNzdXJl
    # ZElEUm9vdENBLmNybDA6oDigNoY0aHR0cDovL2NybDMuZGlnaWNlcnQuY29tL0Rp
    # Z2lDZXJ0QXNzdXJlZElEUm9vdENBLmNybDBPBgNVHSAESDBGMDgGCmCGSAGG/WwA
    # AgQwKjAoBggrBgEFBQcCARYcaHR0cHM6Ly93d3cuZGlnaWNlcnQuY29tL0NQUzAK
    # BghghkgBhv1sAzAdBgNVHQ4EFgQUWsS5eyoKo6XqcQPAYPkt9mV1DlgwHwYDVR0j
    # BBgwFoAUReuir/SSy4IxLVGLp6chnfNtyA8wDQYJKoZIhvcNAQELBQADggEBAD7s
    # DVoks/Mi0RXILHwlKXaoHV0cLToaxO8wYdd+C2D9wz0PxK+L/e8q3yBVN7Dh9tGS
    # dQ9RtG6ljlriXiSBThCk7j9xjmMOE0ut119EefM2FAaK95xGTlz/kLEbBw6RFfu6
    # r7VRwo0kriTGxycqoSkoGjpxKAI8LpGjwCUR4pwUR6F6aGivm6dcIFzZcbEMj7uo
    # +MUSaJ/PQMtARKUT8OZkDCUIQjKyNookAv4vcn4c10lFluhZHen6dGRrsutmQ9qz
    # sIzV6Q3d9gEgzpkxYz0IGhizgZtPxpMQBvwHgfqL2vmCSfdibqFT+hKUGIUukpHq
    # aGxEMrJmoecYpJpkUe8wggU6MIIEIqADAgECAhAGsBFbtfCQ0/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EyLWFzc3VyZWQtY3MtZzEuY3JsMDWgM6Axhi9odHRwOi8vY3Js
    # NC5kaWdpY2VydC5jb20vc2hhMi1hc3N1cmVkLWNzLWcxLmNybDBMBgNVHSAERTBD
    # MDcGCWCGSAGG/WwDATAqMCgGCCsGAQUFBwIBFhxodHRwczovL3d3dy5kaWdpY2Vy
    # dC5jb20vQ1BTMAgGBmeBDAEEATCBhAYIKwYBBQUHAQEEeDB2MCQGCCsGAQUFBzAB
    # hhhodHRwOi8vb2NzcC5kaWdpY2VydC5jb20wTgYIKwYBBQUHMAKGQmh0dHA6Ly9j
    # YWNlcnRzLmRpZ2ljZXJ0LmNvbS9EaWdpQ2VydFNIQTJBc3N1cmVkSURDb2RlU2ln
    # bmluZ0NBLmNydDAMBgNVHRMBAf8EAjAAMA0GCSqGSIb3DQEBCwUAA4IBAQCLBAE/
    # 2x4amEecDEoy9g+WmWMROiB4GnkPqj+IbiwftmwC5/7yL3/592HOFMJr0qOgUt51
    # moE8SuuLuOGw63c5+/48LJS4jP2XzbVNByRPIxPWorm4t/OzTJNziTowHQ+wLwwI
    # 8U97+8DaHCNL7iLZNEiqbVlpF3j7SMWGgf2BVYADJyxluNzf0ZUO+lXN4gOkM8tl
    # VDc7SjZEKvu6ckAaxXf7NPbCXVL/3+LvdmoLbT3vJlfzeXqduO3oieB10ic3ug5T
    # XtoYmyEk/P3yR3x/TqUlg1x/xaolBxy5TyMeSLcBlYn42fnQL154bvMGwFiCsHWQ
    # wY09I0xpEysOMiy8MIIGajCCBVKgAwIBAgIQAwGaAjr/WLFr1tXq5hfwZjANBgkq
    # hkiG9w0BAQUFADBiMQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5j
    # MRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSEwHwYDVQQDExhEaWdpQ2VydCBB
    # c3N1cmVkIElEIENBLTEwHhcNMTQxMDIyMDAwMDAwWhcNMjQxMDIyMDAwMDAwWjBH
    # MQswCQYDV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# YQBiAGkAbABpAHQAeQAgAGEAbgBkACAAYQByAGUAIABpAG4AYwBvAHIAcABvAHIA
    # YQB0AGUAZAAgAGgAZQByAGUAaQBuACAAYgB5ACAAcgBlAGYAZQByAGUAbgBjAGUA
    # LjALBglghkgBhv1sAxUwHwYDVR0jBBgwFoAUFQASKxOYspkH7R7for5XDStnAs0w
    # HQYDVR0OBBYEFGFaTSS2STKdSip5GoNL9B6Jwcp9MH0GA1UdHwR2MHQwOKA2oDSG
    # Mmh0dHA6Ly9jcmwzLmRpZ2ljZXJ0LmNvbS9EaWdpQ2VydEFzc3VyZWRJRENBLTEu
    # Y3JsMDigNqA0hjJodHRwOi8vY3JsNC5kaWdpY2VydC5jb20vRGlnaUNlcnRBc3N1
    # cmVkSURDQS0xLmNybDB3BggrBgEFBQcBAQRrMGkwJAYIKwYBBQUHMAGGGGh0dHA6
    # Ly9vY3NwLmRpZ2ljZXJ0LmNvbTBBBggrBgEFBQcwAoY1aHR0cDovL2NhY2VydHMu
    # ZGlnaWNlcnQuY29tL0RpZ2lDZXJ0QXNzdXJlZElEQ0EtMS5jcnQwDQYJKoZIhvcN
    # AQEFBQADggEBAJ0lfhszTbImgVybhs4jIA+Ah+WI//+x1GosMe06FxlxF82pG7xa
    # FjkAneNshORaQPveBgGMN/qbsZ0kfv4gpFetW7easGAm6mlXIV00Lx9xsIOUGQVr
    # NZAQoHuXx/Y/5+IRQaa9YtnwJz04HShvOlIJ8OxwYtNiS7Dgc6aSwNOOMdgv420X
    # Ewbu5AO2FKvzj0OncZ0h3RTKFV2SQdr5D4HRmXQNJsQOfxu19aDxxncGKBXp2JPl
    # VRbwuwqrHNtcSCdmyKOLChzlldquxC5ZoGHd2vNtomHpigtt7BIYvfdVVEADkitr
    # wlHCCkivsNRu4PQUCjob4489yq9qjXvc2EQwggbNMIIFtaADAgECAhAG/fkDlgOt
    # 6gAK6z8nu7obMA0GCSqGSIb3DQEBBQUAMGUxCzAJBgNVBAYTAlVTMRUwEwYDVQQK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AGkAYwBhAHQAZQAgAGMA
    # bwBuAHMAdABpAHQAdQB0AGUAcwAgAGEAYwBjAGUAcAB0AGEAbgBjAGUAIABvAGYA
    # IAB0AGgAZQAgAEQAaQBnAGkAQwBlAHIAdAAgAEMAUAAvAEMAUABTACAAYQBuAGQA
    # IAB0AGgAZQAgAFIAZQBsAHkAaQBuAGcAIABQAGEAcgB0AHkAIABBAGcAcgBlAGUA
    # bQBlAG4AdAAgAHcAaABpAGMAaAAgAGwAaQBtAGkAdAAgAGwAaQBhAGIAaQBsAGkA
    # dAB5ACAAYQBuAGQAIABhAHIAZQAgAGkAbgBjAG8AcgBwAG8AcgBhAHQAZQBkACAA
    # aABlAHIAZQBpAG4AIABiAHkAIAByAGUAZgBlAHIAZQBuAGMAZQAuMAsGCWCGSAGG
    # /WwDFTASBgNVHRMBAf8ECDAGAQH/AgEAMHkGCCsGAQUFBwEBBG0wazAkBggrBgEF
    # BQcwAYYYaHR0cDovL29jc3AuZGlnaWNlcnQuY29tMEMGCCsGAQUFBzAChjdodHRw
    # Oi8vY2FjZXJ0cy5kaWdpY2VydC5jb20vRGlnaUNlcnRBc3N1cmVkSURSb290Q0Eu
    # Y3J0MIGBBgNVHR8EejB4MDqgOKA2hjRodHRwOi8vY3JsMy5kaWdpY2VydC5jb20v
    # RGlnaUNlcnRBc3N1cmVkSURSb290Q0EuY3JsMDqgOKA2hjRodHRwOi8vY3JsNC5k
    # aWdpY2VydC5jb20vRGlnaUNlcnRBc3N1cmVkSURSb290Q0EuY3JsMB0GA1UdDgQW
    # BBQVABIrE5iymQftHt+ivlcNK2cCzTAfBgNVHSMEGDAWgBRF66Kv9JLLgjEtUYun
    # pyGd823IDzANBgkqhkiG9w0BAQUFAAOCAQEARlA+ybcoJKc4HbZbKa9Sz1LpMUer
    # Vlx71Q0LQbPv7HUfdDjyslxhopyVw1Dkgrkj0bo6hnKtOHisdV0XFzRyR4WUVtHr
    # uzaEd8wkpfMEGVWp5+Pnq2LN+4stkMLA0rWU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ggH8MIIB+AIBATB2MGIxCzAJBgNVBAYTAlVTMRUwEwYDVQQK
    # EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xITAfBgNV
    # BAMTGERpZ2lDZXJ0IEFzc3VyZWQgSUQgQ0EtMQIQAwGaAjr/WLFr1tXq5hfwZjAJ
    # BgUrDgMCGgUAoF0wGAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAcBgkqhkiG9w0B
    # CQUxDxcNMTcwODA3MDAwNDQ4WjAjBgkqhkiG9w0BCQQxFgQUWG5kvl4g5ewP9zqe
    # BhKR4Nf+kYcwDQYJKoZIhvcNAQEBBQAEggEAL/mwWpFRQjJTNBDdkzTi12lxXdG2
    # NfYmaZ1BHm0tmAMOIIvQEpDxZK57nmZ2j8JS/INKf8CmckKoz1Zn60A7kHJHEYhO
    # Dx0s/kHJMlhDwszQNk5cI9e33qadHAyiJMLYCE8jP5hB7RjWMgYI/vCn0PCcDEWK
    # 4mf9TFyNwUXNY5eLLwG65hm5AzRNSPNzwyqHrdDpypneYBraJQhwv1Wh/+lBj+U/
    # xj3VrEFpC2PFc+Re2QPVmHo+yv9Rvu0ME+bri4rvfF3qtjNWQf+rPJZIuh4w5+i7
    # B+assaswnTv97PajFJ8NFmkPaaFOmii7WQKFq9LXk4KECjHEaHNCezHypg==
    # SIG # End signature block
    
  • tools\chocolateyInstall\helpers\functions\Get-EnvironmentVariableNames.ps1 Show
    # Copyright © 2017 Chocolatey Software, Inc.
    # Copyright © 2015 - 2017 RealDimensions Software, LLC
    # Copyright © 2011 - 2015 RealDimensions Software, LLC & original authors/contributors from https://github.com/chocolatey/chocolatey
    #
    # Licensed under the Apache License, Version 2.0 (the "License");
    # you may not use this file except in compliance with the License.
    # You may obtain a copy of the License at
    #
    #     http://www.apache.org/licenses/LICENSE-2.0
    #
    # Unless required by applicable law or agreed to in writing, software
    # distributed under the License is distributed on an "AS IS" BASIS,
    # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    # See the License for the specific language governing permissions and
    # limitations under the License.
    
    function Get-EnvironmentVariableNames([System.EnvironmentVariableTarget] $Scope) {
    <#
    .SYNOPSIS
    Gets all environment variable names.
    
    .DESCRIPTION
    Provides a list of environment variable names based on the scope. This
    can be used to loop through the list and generate names.
    
    .NOTES
    Process dumps the current environment variable names in memory /
    session. The other scopes refer to the registry values.
    
    .INPUTS
    None
    
    .OUTPUTS
    A list of environment variables names.
    
    .PARAMETER Scope
    The environemnt variable target scope. This is `Process`, `User`, or
    `Machine`.
    
    .EXAMPLE
    Get-EnvironmentVariableNames -Scope Machine
    
    .LINK
    Get-EnvironmentVariable
    
    .LINK
    Set-EnvironmentVariable
    #>
    
      # Do not log function call
    
      # HKCU:\Environment may not exist in all Windows OSes (such as Server Core).
      switch ($Scope) {
        'User' { Get-Item 'HKCU:\Environment' -ErrorAction SilentlyContinue | Select-Object -ExpandProperty Property }
        'Machine' { Get-Item 'HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Environment' | Select-Object -ExpandProperty Property }
        'Process' { Get-ChildItem Env:\ | Select-Object -ExpandProperty Key }
        default { throw "Unsupported environment scope: $Scope" }
      }
    }
    
    # SIG # Begin signature block
    # MIIcpwYJKoZIhvcNAQcCoIIcmDCCHJQCAQExDzANBglghkgBZQMEAgEFADB5Bgor
    # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
    # KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCBYcNSJugYmbRlV
    # mMWT7erzvVrOWcoJ4BHNYe4phzO8Z6CCF7EwggUwMIIEGKADAgECAhAECRgbX9W7
    # ZnVTQ7VvlVAIMA0GCSqGSIb3DQEBCwUAMGUxCzAJBgNVBAYTAlVTMRUwEwYDVQQK
    # EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xJDAiBgNV
    # BA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ofs/s
    # jAw2W3rBerh4x8kGLkYQyI3oBGDbvHN0+k7Y/qpA8bLOcEaD6dpAoVk62RUJV5lW
    # MJPzyWHM0AjMa+xiQpGsAsDvpPCJEY93AgMBAAGjggM1MIIDMTAOBgNVHQ8BAf8E
    # BAMCB4AwDAYDVR0TAQH/BAIwADAWBgNVHSUBAf8EDDAKBggrBgEFBQcDCDCCAb8G
    # A1UdIASCAbYwggGyMIIBoQYJYIZIAYb9bAcBMIIBkjAoBggrBgEFBQcCARYcaHR0
    # cHM6Ly93d3cuZGlnaWNlcnQuY29tL0NQUzCCAWQGCCsGAQUFBwICMIIBVh6CAVIA
    # QQBuAHkAIAB1AHMAZQAgAG8AZgAgAHQAaABpAHMAIABDAGUAcgB0AGkAZgBpAGMA
    # YQB0AGUAIABjAG8AbgBzAHQAaQB0AHUAdABlAHMAIABhAGMAYwBlAHAAdABhAG4A
    # YwBlACAAbwBmACAAdABoAGUAIABEAGkAZwBpAEMAZQByAHQAIABDAFAALwBDAFAA
    # UwAgAGEAbgBkACAAdABoAGUAIABSAGUAbAB5AGkAbgBnACAAUABhAHIAdAB5ACAA
    # QQBnAHIAZQBlAG0AZQBuAHQAIAB3AGgAaQBjAGgAIABsAGkAbQBpAHQAIABsAGkA
    # YQBiAGkAbABpAHQAeQAgAGEAbgBkACAAYQByAGUAIABpAG4AYwBvAHIAcABvAHIA
    # YQB0AGUAZAAgAGgAZQByAGUAaQBuACAAYgB5ACAAcgBlAGYAZQByAGUAbgBjAGUA
    # LjALBglghkgBhv1sAxUwHwYDVR0jBBgwFoAUFQASKxOYspkH7R7for5XDStnAs0w
    # HQYDVR0OBBYEFGFaTSS2STKdSip5GoNL9B6Jwcp9MH0GA1UdHwR2MHQwOKA2oDSG
    # Mmh0dHA6Ly9jcmwzLmRpZ2ljZXJ0LmNvbS9EaWdpQ2VydEFzc3VyZWRJRENBLTEu
    # Y3JsMDigNqA0hjJodHRwOi8vY3JsNC5kaWdpY2VydC5jb20vRGlnaUNlcnR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aeX4jfEXuiU5p/yz5n0uqvL5Cph77MSX24dzUqzEOsZuT5lUf6dqZDVD29Vk5Qn
    # yBanzUbX17MoFonI/Iw34fieGhiKeu3HRIKfknqO5mBiVsdQJ5g6RLklkoKSkGtL
    # IBQRGi1Y4B1NTFbSfZbO6IqnVWXvETYJBhXgmmfudE3Oc7X+7ZxX3bH88d2uvBXT
    # b81YdWAUxIpRBIZ7+6RLDLUOxm3X+BekK28GeBn+vX2l6aGXkvnukRDFvM6e+quk
    # lxUvqbbw2PxlEnhmjz5p8JXHm0vGYid1n51HyBy39CVQH7zpL0KSIgFoyA==
    # SIG # End signature block
    
  • tools\chocolateyInstall\helpers\functions\Get-FtpFile.ps1 Show
    ## Get-FtpFile
    ##############################################################################################################
    ## Downloads a file from ftp
    ## Some code from http://stackoverflow.com/questions/265339/whats-the-best-way-to-automate-secure-ftp-in-powershell
    ## Additional functionality emulated from http://poshcode.org/417 (Get-WebFile)
    ## Written by Stephen C. Austin, Pwnt & Co. http://pwnt.co
    ##############################################################################################################
    ## Additional functionality added by Chocolatey Team / Chocolatey Contributors
    ##  - Proxy
    ##  - Better error handling
    ##  - Inline documentation
    ##  - Cmdlet conversion
    ##  - Closing request/response and cleanup
    ##  - Request / ReadWriteResponse Timeouts
    ##############################################################################################################
    function Get-FtpFile {
    <#
    .SYNOPSIS
    Downloads a file from a File Transfter Protocol (FTP) location.
    
    .DESCRIPTION
    This will download a file from an FTP location, saving the file to the
    FileName location specified.
    
    .NOTES
    This is a low-level function and not recommended for use in package
    scripts. It is recommended you call `Get-ChocolateyWebFile` instead.
    
    Starting in 0.9.10, will automatically call Set-PowerShellExitCode to
    set the package exit code to 404 if the resource is not found.
    
    .INPUTS
    None
    
    .OUTPUTS
    None
    
    .PARAMETER Url
    This is the url to download the file from.
    
    .PARAMETER FileName
    This is the full path to the file to create. If FTPing to the
    package folder next to the install script, the path will be like
    `"$(Split-Path -Parent $MyInvocation.MyCommand.Definition)\\file.exe"`
    
    .PARAMETER UserName
    The user account to connect to FTP with.
    
    .PARAMETER Password
    The password for the user account on the FTP server.
    
    .PARAMETER Quiet
    Silences the progress output.
    
    .PARAMETER IgnoredArguments
    Allows splatting with arguments that do not apply. Do not use directly.
    
    .LINK
    Get-ChocolateyWebFile
    
    .LINK
    Get-WebFile
    #>
    param(
      [parameter(Mandatory=$false, Position=0)][string] $url = '',
      [parameter(Mandatory=$true, Position=1)][string] $fileName = $null,
      [parameter(Mandatory=$false, Position=2)][string] $username = $null,
      [parameter(Mandatory=$false, Position=3)][string] $password = $null,
      [parameter(Mandatory=$false)][switch] $quiet,
      [parameter(ValueFromRemainingArguments = $true)][Object[]] $ignoredArguments
    )
    
      Write-FunctionCallLogMessage -Invocation $MyInvocation -Parameters $PSBoundParameters
    
      if ($url -eq $null -or $url -eq '') {
        Write-Warning "Url parameter is empty, Get-FtpFile has nothing to do."
        return
      }
    
      if ($fileName -eq $null -or $fileName -eq '') {
        Write-Warning "FileName parameter is empty, Get-FtpFile cannot save the output."
        return
      }
    
      try {
        $uri = [System.Uri]$url
        if ($uri.IsFile()) {
          Write-Debug "Url is local file, setting destination"
          if ($url.LocalPath -ne $fileName) {
            Copy-Item $uri.LocalPath -Destination $fileName -Force
          }
    
          return
        }
      } catch {
        #continue on
      }
    
      # Create a FTPWebRequest object to handle the connection to the ftp server
      $ftprequest = [System.Net.FtpWebRequest]::create($url)
    
      # check if a proxy is required
      $explicitProxy = $env:chocolateyProxyLocation
      $explicitProxyUser = $env:chocolateyProxyUser
      $explicitProxyPassword = $env:chocolateyProxyPassword
      $explicitProxyBypassList = $env:chocolateyProxyBypassList
      $explicitProxyBypassOnLocal = $env:chocolateyProxyBypassOnLocal
      if ($explicitProxy -ne $null) {
        # explicit proxy
    	  $proxy = New-Object System.Net.WebProxy($explicitProxy, $true)
    	  if ($explicitProxyPassword -ne $null) {
    	    $passwd = ConvertTo-SecureString $explicitProxyPassword -AsPlainText -Force
    	    $proxy.Credentials = New-Object System.Management.Automation.PSCredential ($explicitProxyUser, $passwd)
    	  }
    
        if ($explicitProxyBypassList -ne $null -and $explicitProxyBypassList -ne '') {
          $proxy.BypassList =  $explicitProxyBypassList.Split(',', [System.StringSplitOptions]::RemoveEmptyEntries)
        }
        if ($explicitProxyBypassOnLocal -eq 'true') { $proxy.BypassProxyOnLocal = $true; }
    
      	Write-Host "Using explicit proxy server '$explicitProxy'."
        $ftprequest.Proxy = $proxy
      }
    
      # set the request's network credentials for an authenticated connection
      $ftprequest.Credentials = New-Object System.Net.NetworkCredential($username, $password)
    
      $ftprequest.Method = [System.Net.WebRequestMethods+Ftp]::DownloadFile
      $ftprequest.UseBinary = $true
      $ftprequest.KeepAlive = $false
    
      # use the default request timeout of 100000
      if ($env:chocolateyRequestTimeout -ne $null -and $env:chocolateyRequestTimeout -ne '') {
        $ftprequest.Timeout =  $env:chocolateyRequestTimeout
      }
      if ($env:chocolateyResponseTimeout -ne $null -and $env:chocolateyResponseTimeout -ne '') {
        $ftprequest.ReadWriteTimeout =  $env:chocolateyResponseTimeout
      }
    
      try {
        # send the ftp request to the server
        $ftpresponse = $ftprequest.GetResponse()
        [long]$goal = $ftpresponse.ContentLength
        $goalFormatted = Format-FileSize $goal
    
        # get a download stream from the server response
        $reader = $ftpresponse.GetResponseStream()
    
        # create the target file on the local system and the download buffer
        $writer = New-Object IO.FileStream ($fileName,[IO.FileMode]::Create)
        [byte[]]$buffer = New-Object byte[] 1048576
        [long]$total = [long]$count = 0
    
        $originalEAP = $ErrorActionPreference
        $ErrorActionPreference = 'Stop'
        try {
          # loop through the download stream and send the data to the target file
          do {
            $count = $reader.Read($buffer, 0, $buffer.Length);
            $writer.Write($buffer, 0, $count);
            if(!$quiet) {
              $total += $count
              $totalFormatted = Format-FileSize $total
              if($goal -gt 0) {
                $percentComplete = [Math]::Truncate(($total/$goal)*100)
                Write-Progress "Downloading $url to $fileName" "Saving $totalFormatted of $goalFormatted ($total/$goal)" -id 0 -percentComplete $percentComplete
              } else {
                Write-Progress "Downloading $url to $fileName" "Saving $total bytes..." -id 0 -Completed
              }
              if ($total -eq $goal -and $count -eq 0) {
                Write-Progress "Completed download of $url." "Completed a total of $total bytes of $fileName" -id 0 -Completed -PercentComplete 100
              }
            }
          } while ($count -ne 0)
          Write-Host ""
          Write-Host "Download of $([System.IO.Path]::GetFileName($fileName)) ($goalFormatted) completed."
        } finally {
            $ErrorActionPreference = $originalEAP
        }
    
        $writer.Flush() # closed in finally block
    
      } catch {
        if ($ftprequest -ne $null) {
          $ftprequest.ServicePoint.MaxIdleTime = 0
          $ftprequest.Abort();
          # ruthlessly remove $ftprequest to ensure it isn't reused
          Remove-Variable ftprequest
          Start-Sleep 1
          [GC]::Collect()
        }
    
        Set-PowerShellExitCode 404
        if ($env:DownloadCacheAvailable -eq 'true') {
           throw "The remote file either doesn't exist, is unauthorized, or is forbidden for url '$url'. $($_.Exception.Message) `nThis package is likely not broken for licensed users - see https://chocolatey.org/docs/features-private-cdn."
        } else {
           throw "The remote file either doesn't exist, is unauthorized, or is forbidden for url '$url'. $($_.Exception.Message)"
        }
      } finally {
    
        if ($reader -ne $null) {
          try { $reader.Close(); } catch {}
        }
    
        if ($writer -ne $null) {
          try { $writer.Close(); } catch {}
        }
    
        if ($ftpresponse -ne $null) {
          try { $ftpresponse.Close(); } catch {}
        }
    
        Start-Sleep 1
      }
    }
    
    # SIG # Begin signature block
    # MIIcpwYJKoZIhvcNAQcCoIIcmDCCHJQCAQExDzANBglghkgBZQMEAgEFADB5Bgor
    # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
    # KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCCmQDCP9RNawhnG
    # TM1ks0EpO5MwIBkWlNyIiAQctFVBpaCCF7EwggUwMIIEGKADAgECAhAECRgbX9W7
    # ZnVTQ7VvlVAIMA0GCSqGSIb3DQEBCwUAMGUxCzAJBgNVBAYTAlVTMRUwEwYDVQQK
    # EwxE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5f
    # 4qi2LVkCYYhhchhoubh87ubnNC8xd4EwH7s2AY3vJ+P3mvBMMWSN4+v6GYeofs/s
    # jAw2W3rBerh4x8kGLkYQyI3oBGDbvHN0+k7Y/qpA8bLOcEaD6dpAoVk62RUJV5lW
    # MJPzyWHM0AjMa+xiQpGsAsDvpPCJEY93AgMBAAGjggM1MIIDMTAOBgNVHQ8BAf8E
    # BAMCB4AwDAYDVR0TAQH/BAIwADAWBgNVHSUBAf8EDDAKBggrBgEFBQcDCDCCAb8G
    # A1UdIASCAbYwggGyMIIBoQYJYIZIAYb9bAcBMIIBkjAoBggrBgEFBQcCARYcaHR0
    # cHM6Ly93d3cuZGlnaWNlcnQuY29tL0NQUzCCAWQGCCsGAQUFBwICMIIBVh6CAVIA
    # QQBuAHkAIAB1AHMAZQAgAG8AZgAgAHQAaABpAHMAIABDAGUAcgB0AGkAZgBpAGMA
    # YQB0AGUAIABjAG8AbgBzAHQAaQB0AHUAdABlAHMAIABhAGMAYwBlAHAAdABhAG4A
    # YwBlACAAbwBmACAAdABoAGUAIABEAGkAZwBpAEMAZQByAHQAIABDAFAALwBDAFAA
    # UwAgAGEAbgBkACAAdABoAGUAIABSAGUAbAB5AGkAbgBnACAAUABhAHIAdAB5ACAA
    # QQBnAHIAZQBlAG0AZQBuAHQAIAB3AGgAaQBjAGgAIABsAGkAbQBpAHQAIABsAGkA
    # YQBiAGkAbABpAHQAeQAgAGEAbgBkACAAYQByAGUAIABpAG4AYwBvAHIAcABvAHIA
    # YQB0AGUAZAAgAGgAZQByAGUAaQBuACAAYgB5ACAAcgBlAGYAZQByAGUAbgBjAGUA
    # LjALBglghkgBhv1sAxUwHwYDVR0jBBgwFoAUFQASKxOYspkH7R7for5XDStnAs0w
    # HQYDVR0OBBYEFGFaTSS2STKdSip5GoNL9B6Jwcp9MH0GA1UdHwR2MHQwOKA2oDSG
    # Mmh0dHA6Ly9jcmwzLmRpZ2ljZXJ0LmNvbS9EaWdpQ2VydEFzc3VyZWRJRENB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4GUTRDntVP4wDQYJKoZIhvcNAQEBBQAEggEAeaqNFihI0rzA5/mAbE5wq+QOzYvF
    # ahvkYoauaNvQSNOFw++aEhXBBZsyhYA90kCECyw+1BLiCWaOmHZzf/VtJYrXS1Wk
    # aHcz8zshKZvBG/lQw3ED6aQ6YWkeJGEI6aR83nXx6YhawkVtuFSTTmqWW/2xTBRn
    # kq4q0FHNd2DWSmfB5ferwkmvOwFyMb+Y5xYiD6blZ+AYCWDYF7ARqK2svz93MMWn
    # wG4zYw363cjy4SixEHvPNlVe3FLuDU0cMqnjqnBC8e/CCDcG2jFje919lIH6um94
    # Lr6E61YjPHPp6Y3FsGqTmzocQ0h/Lhg7WSchHOMlPI4map+i5aYdLMJIkQ==
    # SIG # End signature block
    
  • tools\chocolateyInstall\helpers\functions\Get-OSArchitectureWidth.ps1 Show
    # Copyright © 2017 Chocolatey Software, Inc.
    # Copyright © 2015 - 2017 RealDimensions Software, LLC
    # Copyright © 2011 - 2015 RealDimensions Software, LLC & original authors/contributors from https://github.com/chocolatey/chocolatey
    #
    # Licensed under the Apache License, Version 2.0 (the "License");
    # you may not use this file except in compliance with the License.
    # You may obtain a copy of the License at
    #
    #     http://www.apache.org/licenses/LICENSE-2.0
    #
    # Unless required by applicable law or agreed to in writing, software
    # distributed under the License is distributed on an "AS IS" BASIS,
    # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    # See the License for the specific language governing permissions and
    # limitations under the License.
    
    function Get-OSArchitectureWidth {
    <#
    .SYNOPSIS
    Get the operating system architecture address width.
    
    .DESCRIPTION
    This will return the system architecture address width (probably 32 or
    64 bit). If you pass a comparison, it will return true or false instead
    of {`32`|`64`}.
    
    .NOTES
    When your installation script has to know what architecture it is run
    on, this simple function comes in handy.
    
    Available as `Get-OSArchitectureWidth` in 0.9.10+. If you need
    compatibility with pre 0.9.10, please use the alias `Get-ProcessorBits`.
    
    .INPUTS
    None
    
    .OUTPUTS
    None
    
    .PARAMETER Compare
    This optional parameter causes the function to return $true or $false,
    depending on wether or not the bit width matches.
    #>
    param(
      $compare
    )
    
      Write-FunctionCallLogMessage -Invocation $MyInvocation -Parameters $PSBoundParameters
    
      $bits = 64
      if (([System.IntPtr]::Size -eq 4) -and (Test-Path env:\PROCESSOR_ARCHITEW6432)) {
        $bits = 64
      } elseif ([System.IntPtr]::Size -eq 4) {
        $bits = 32
      }
    
      # Return bool|int
      if ("$compare" -ne '' -and $compare -eq $bits) {
        return $true
      } elseif ("$compare" -ne '') {
        return $false
      } else {
        return $bits
      }
    }
    
    Set-Alias Get-ProcessorBits Get-OSArchitectureWidth
    Set-Alias Get-OSBitness Get-OSArchitectureWidth
    
    # SIG # Begin signature block
    # MIIcpwYJKoZIhvcNAQcCoIIcmDCCHJQCAQExDzANBglghkgBZQMEAgEFADB5Bgor
    # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
    # KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCC+5R24zufGXnsc
    # mWj/25mf6jwe97cvRY7+8fCOG4I2J6CCF7EwggUwMIIEGKADAgECAhAECRgbX9W7
    # ZnVTQ7VvlVAIMA0GCSqGSIb3DQEBCwUAMGUxCzAJBgNVBAYTAlVTMRUwEwYDVQQK
    # EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xJDAiBgNV
    # BAMTG0RpZ2lDZXJ0IEFzc3VyZWQgSUQgUm9vdCBDQTAeFw0xMzEwMjIxMjAwMDBa
    # Fw0yODEwMjIxMjAwMDBaMHIxCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2Vy
    # dCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xMTAvBgNVBAMTKERpZ2lD
    # ZXJ0IFNIQTIgQXNzdXJlZCBJRCBDb2RlIFNpZ25pbmcgQ0EwggEiMA0GCSqGSIb3
    # DQEBAQUAA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ZGlnaWNlcnQuY29tL0NQUzCCAWQGCCsGAQUFBwICMIIBVh6CAVIA
    # QQBuAHkAIAB1AHMAZQAgAG8AZgAgAHQAaABpAHMAIABDAGUAcgB0AGkAZgBpAGMA
    # YQB0AGUAIABjAG8AbgBzAHQAaQB0AHUAdABlAHMAIABhAGMAYwBlAHAAdABhAG4A
    # YwBlACAAbwBmACAAdABoAGUAIABEAGkAZwBpAEMAZQByAHQAIABDAFAALwBDAFAA
    # UwAgAGEAbgBkACAAdABoAGUAIABSAGUAbAB5AGkAbgBnACAAUABhAHIAdAB5ACAA
    # QQBnAHIAZQBlAG0AZQBuAHQAIAB3AGgAaQBjAGgAIABsAGkAbQBpAHQAIABsAGkA
    # YQBiAGkAbABpAHQAeQAgAGEAbgBkACAAYQByAGUAIABpAG4AYwBvAHIAcABvAHIA
    # YQB0AGUAZAAgAGgAZQByAGUAaQBuACAAYgB5ACAAcgBlAGYAZQByAGUAbgBjAGUA
    # LjALBglghkgBhv1sAxUwHwYDVR0jBBgwFoAUFQASKxOYspkH7R7for5XDStnAs0w
    # HQYDVR0OBBYEFGFaTSS2STKdSip5GoNL9B6Jwcp9MH0GA1UdHwR2MHQwOKA2oDSG
    # Mmh0dHA6Ly9jcmwzLmRpZ2ljZXJ0LmNvbS9EaWdpQ2VydEFzc3VyZWRJRENBLTEu
    # Y3JsMDigNqA0hjJodHRwOi8vY3JsNC5kaWdpY2VydC5jb20vRGlnaUNlcnRBc3N1
    # cmVkSURDQS0xLmNybDB3BggrBgEFBQcBAQRrMGkwJAYIKwYBBQUHMAGGGGh0dHA6
    # Ly9vY3NwLmRpZ2ljZXJ0LmNvbTBBBggrBgEFBQcwAoY1aHR0cDovL2NhY2VydHMu
    # ZGlnaWNlcnQuY29tL0RpZ2lDZXJ0QXNzdXJlZElEQ0EtMS5jcnQwDQYJKoZIhvcN
    # AQEFBQADggEBAJ0lfhszTbImgVybhs4jIA+Ah+WI//+x1GosMe06FxlxF82pG7xa
    # FjkAneNshORaQP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862k3EJ+8dJTBos/X4vJIkF5GNgZuXkIk0LQxgkGQ==
    # SIG # End signature block
    
  • tools\chocolateyInstall\helpers\functions\Get-ToolsLocation.ps1 Show
    # Copyright © 2017 Chocolatey Software, Inc.
    # Copyright © 2011 - 2017 RealDimensions Software, LLC
    #
    # Licensed under the Apache License, Version 2.0 (the "License");
    # you may not use this file except in compliance with the License.
    # You may obtain a copy of the License at
    #
    #     http://www.apache.org/licenses/LICENSE-2.0
    #
    # Unless required by applicable law or agreed to in writing, software
    # distributed under the License is distributed on an "AS IS" BASIS,
    # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    # See the License for the specific language governing permissions and
    # limitations under the License.
    
    function Get-ToolsLocation {
    <#
    .SYNOPSIS
    Gets the top level location for tools/software installed outside of
    package folders.
    
    .DESCRIPTION
    Creates or uses an environment variable that a user can control to
    communicate with packages about where they would like software that is
    not installed through native installers, but doesn't make much sense
    to be kept in package folders. Most software coming in packages stays
    with the package itself, but there are some things that seem to fall
    out of this category, like things that have plugins that are installed
    into the same directory as the tool. Having that all combined in the
    same package directory could get tricky.
    
    .NOTES
    This is the successor to the poorly named `Get-BinRoot`. Available as
    `Get-ToolsLocation` in 0.9.10+. If you need compatibility with pre
    0.9.10, please use `Get-BinRoot`.
    
    Sets an environment variable called `ChocolateyToolsLocation`. If the
    older `ChocolateyBinRoot` is set, it uses the value from that and
    removes the older variable.
    
    .INPUTS
    None
    
    .OUTPUTS
    None
    #>
    
      $invocation = $MyInvocation
      Write-FunctionCallLogMessage -Invocation $invocation -Parameters $PSBoundParameters
    
      if ($invocation -ne $null -and $invocation.InvocationName -ne $null -and $invocation.InvocationName.ToLower() -eq 'get-binroot') {
        Write-Host "Get-BinRoot is going to be deprecated in v1 and removed in v2. It has been replaced with Get-ToolsLocation (starting with v0.9.10), however many packages no longer require a special separate directory since package folders no longer have versions on them. Some do though and should continue to use Get-ToolsLocation."
      }
    
      $toolsLocation = $env:ChocolateyToolsLocation
    
      if ($toolsLocation -eq $null) {
        $binRoot = $env:ChocolateyBinRoot
        $olderRoot = $env:chocolatey_bin_root
    
        if ($binRoot -eq $null -and $olderRoot -eq $null) {
          $toolsLocation = Join-Path $env:systemdrive 'tools'
        } else {
          if ($olderRoot -ne $null) {
            if ($binRoot -eq $null) {
              $binRoot = $olderRoot
            }
            Set-EnvironmentVariable -Name "chocolatey_bin_root" -Value '' -Scope User -ErrorAction SilentlyContinue
          }
    
          $toolsLocation = $binRoot
          Set-EnvironmentVariable -Name "ChocolateyBinRoot" -Value '' -Scope User -ErrorAction SilentlyContinue
        }
      }
    
      # Add a drive letter if one doesn't exist
      if (-not($toolsLocation -imatch "^\w:")) {
        $toolsLocation = Join-Path $env:systemdrive $toolsLocation
      }
    
      if (-not($env:ChocolateyToolsLocation -eq $toolsLocation)) {
        try {
          Set-EnvironmentVariable -Name "ChocolateyToolsLocation" -Value $toolsLocation -Scope User
        } catch {
          if (Test-ProcessAdminRights) {
            # sometimes User scope may not exist (such as with core)
            Set-EnvironmentVariable -Name "ChocolateyToolsLocation" -Value $toolsLocation -Scope Machine
          } else {
            throw $_.Exception
          }
        }
      }
    
      return $toolsLocation
    }
    
    Set-Alias Get-BinRoot Get-ToolsLocation -Force -Scope Global -Option AllScope
    
    # SIG # Begin signature block
    # MIIcpwYJKoZIhvcNAQcCoIIcmDCCHJQCAQExDzANBglghkgBZQMEAgEFADB5Bgor
    # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
    # KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCBs7SY2hT94PeHu
    # DDZ8rRekJkr0VcGrRRRJGqRpZeGG9qCCF7EwggUwMIIEGKADAgECAhAECRgbX9W7
    # ZnVTQ7VvlVAIMA0GCSqGSIb3DQEBCwUAMGUxCzAJBgNVBAYTAlVTMRUwEwYDVQQK
    # EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5ka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QTJBc3N1cmVkSURDb2RlU2ln
    # bmluZ0NBLmNydDAMBgNVHRMBAf8EAjAAMA0GCSqGSIb3DQEBCwUAA4IBAQCLBAE/
    # 2x4amEecDEoy9g+WmWMROiB4GnkPqj+IbiwftmwC5/7yL3/592HOFMJr0qOgUt51
    # moE8SuuLuOGw63c5+/48LJS4jP2XzbVNByRPIxPWorm4t/OzTJNziTowHQ+wLwwI
    # 8U97+8DaHCNL7iLZNEiqbVlpF3j7SMWGgf2BVYADJyxluNzf0ZUO+lXN4gOkM8tl
    # VDc7SjZEKvu6ckAaxXf7NPbCXVL/3+LvdmoLbT3vJlfzeXqduO3oieB10ic3ug5T
    # XtoYmyEk/P3yR3x/TqUlg1x/xaolBxy5TyMeSLcBlYn42fnQL154bvMGwFiCsHWQ
    # wY09I0xpEysOMiy8MIIGajCCBVKgAwIBAgIQAwGaAjr/WLFr1tXq5hfwZjANBgkq
    # hkiG9w0BAQUFADBiMQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5j
    # MRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSEwHwYDVQQDExhEaWdpQ2VydCBB
    # c3N1cmVkIElEIENBLTEwHhcNMTQxMDIyMDAwMDAwWhcNMjQxMDIyMDAwMDAwWjBH
    # MQswCQYDVQQGEwJVUzERMA8GA1UEChMIRGlnaUNlcnQxJTAjBgNVBAMTHERpZ2lD
    # ZXJ0IFRpbWVzdGFtcCBSZXNwb25kZXIwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAw
    # ggEKAoIBAQCjZF38fLPggjXg4PbGKuZJdTvMbuBTqZ8fZFnmfGt/a4ydVfiS457V
    # WmNbAklQ2YPOb2bu3cuF6V+l+dSHdIhEOxnJ5fWRn8YUOawk6qhLLJGJzF4o9GS2
    # ULf1ErNzlgpno75hn67z/RJ4dQ6mWxT9RSOOhkRVfRiGBYxVh3lIRvfKDo2n3k5f
    # 4qi2LVkCYYhhchhoubh87ubnNC8xd4EwH7s2AY3vJ+P3mvBMMWSN4+v6GYeofs/s
    # jAw2W3rBerh4x8kGLkYQyI3oBGDbvHN0+k7Y/qpA8bLOcEaD6dpAoVk62RUJV5lW
    # MJPzyWHM0AjMa+xiQpGsAsDvpPCJEY93AgMBAAGjggM1MIIDMTAOBgNVHQ8BAf8E
    # BAMCB4AwDAYDVR0TAQH/BAIwADAWBgNVHSUBAf8EDDAKBggrBgEFBQcDCDCCAb8G
    # A1UdIASCAbYwggGyMIIBoQYJYIZIAYb9bAcBMIIBkjAoBggrBgEFBQcCARYcaHR0
    # cHM6Ly93d3cuZGlnaWNlcnQuY29tL0NQUzCCAWQGCCsGAQUFBwICMIIBVh6CAVIA
    # QQBuAHkAIAB1AHMAZQAgAG8AZgAgAHQAaABpAHMAIABDAGUAcgB0AGkAZgBpAGMA
    # YQB0AGUAIABjAG8AbgBzAHQAaQB0AHUAdABlAHMAIABhAGMAYwBlAHAAdABhAG4A
    # YwBlACAAbwBmACAAdABoAGUAIABEAGkAZwBpAEMAZQByAHQAIABDAFAALwBDAFAA
    # UwAgAGEAbgBkACAAdABoAGUAIABSAGUAbAB5AGkAbgBnACAAUABhAHIAdAB5ACAA
    # QQBnAHIAZQBlAG0AZQBuAHQAIAB3AGgAaQBjAGgAIABsAGkAbQBpAHQAIABsAGkA
    # YQBiAGkAbABpAHQAeQAgAGEAbgBkACAAYQByAGUAIABpAG4AYwBvAHIAcABvAHIA
    # YQB0AGUAZAAgAGgAZQByAGUAaQBuACAAYgB5ACAAcgBlAGYAZQByAGUAbgBjAGUA
    # LjALBglghkgBhv1sAxUwHwYDVR0jBBgwFoAUFQASKxOYspkH7R7for5XDStnAs0w
    # HQYDVR0OBBYEFGFaTSS2STKdSip5GoNL9B6Jwcp9MH0GA1UdHwR2MHQwOKA2oDSG
    # Mmh0dHA6Ly9jcmwzLmRpZ2ljZXJ0LmNvbS9EaWdpQ2VydEFzc3VyZWRJRENBLTEu
    # Y3JsMDigNqA0hjJodHRwOi8vY3JsNC5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XJ0IFNI
    # QTIgQXNzdXJlZCBJRCBDb2RlIFNpZ25pbmcgQ0ECEAawEVu18JDT8NoOYixifVgw
    # DQYJYIZIAWUDBAIBBQCggYQwGAYKKwYBBAGCNwIBDDEKMAigAoAAoQKAADAZBgkq
    # hkiG9w0BCQMxDAYKKwYBBAGCNwIBBDAcBgorBgEEAYI3AgELMQ4wDAYKKwYBBAGC
    # NwIBFTAvBgkqhkiG9w0BCQQxIgQgeznnTnQOoCkUSXVukwOkCvi6q7NXeaGUVZxo
    # D9dIZYcwDQYJKoZIhvcNAQEBBQAEggEAV6mRu74616MZ1fqMoxRkQQtwiK34BJEl
    # jebcpcWLwt6N8bkf8uMo0wM3zudgNpWwt+xYyZfEEcEWXUkbdV7Tf/xCcEZ5hDJH
    # ZIYghHffLj5Ygi+RxKroQ86UWj/VKhHitdaKR65QtkWzerPBohLE7NoErseEebX5
    # vHaNQOlfcMTCalQD5i7l2iwmoDsL0IovVz8xuOBlC/VSFA1Hz93DzhD6/+he2uhZ
    # JCpXse2SjTrelogrGSnGbijT+p/oTe5Zq2LDDXzMGiSeIfwFpv+erEOGK6kxTjko
    # A+0mpUHxy1jt13knLt0FrJoGjgafyZnhHEIdslspuY7n28H+3GkwTKGCAg8wggIL
    # BgkqhkiG9w0BCQYxggH8MIIB+AIBATB2MGIxCzAJBgNVBAYTAlVTMRUwEwYDVQQK
    # EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xITAfBgNV
    # BAMTGERpZ2lDZXJ0IEFzc3VyZWQgSUQgQ0EtMQIQAwGaAjr/WLFr1tXq5hfwZjAJ
    # BgUrDgMCGgUAoF0wGAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAcBgkqhkiG9w0B
    # CQUxDxcNMTcwODA3MDAwNDQ5WjAjBgkqhkiG9w0BCQQxFgQU3essDVMgmu/1Shgu
    # ndCmzau++PAwDQYJKoZIhvcNAQEBBQAEggEAYH1pztUH5mQmKOn//ANLd2cwv0Cr
    # NjdOgFMWmtW2G2w03OgRanZMFkG5yQnIPhLdbkEifKfk303cfZaz/J7Y405Be9sv
    # lfy+T040UwyZ0lRYRvSJ/gMPmpZyrc0ItXoJkQiPTkpn/ZegDxDhO8xCpttRLWpT
    # Z64tVwyeXxUwID9Hr2MCApoKRvzJ3xpKBH39PpZtFClwTCfCtQhn0H9ym0Zdveds
    # b1QznV2Dzdii8Gt6LbG+4wxpMzcg6CjZ+XZZsXQeMe2vspUYJqBRj9/LUb4z3Xyj
    # ZJLKTz5x9lUtZ63bHwywRlVkunGpBQF1Qj9kJlzB0tRCs19GYQPBaMJhjA==
    # SIG # End signature block
    
  • tools\chocolateyInstall\helpers\functions\Get-UACEnabled.ps1 Show
    # Copyright © 2017 Chocolatey Software, Inc.
    # Copyright © 2015 - 2017 RealDimensions Software, LLC
    # Copyright © 2011 - 2015 RealDimensions Software, LLC & original authors/contributors from https://github.com/chocolatey/chocolatey
    #
    # Licensed under the Apache License, Version 2.0 (the "License");
    # you may not use this file except in compliance with the License.
    # You may obtain a copy of the License at
    #
    #     http://www.apache.org/licenses/LICENSE-2.0
    #
    # Unless required by applicable law or agreed to in writing, software
    # distributed under the License is distributed on an "AS IS" BASIS,
    # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    # See the License for the specific language governing permissions and
    # limitations under the License.
    
    function Get-UACEnabled {
    <#
    .SYNOPSIS
    Determines if UAC (User Account Control) is turned on or off.
    
    .DESCRIPTION
    This is a low level function used by Chocolatey to decide whether
    prompting for elevated privileges is necessary or not.
    
    .NOTES
    This checks the `EnableLUA` registry value to be determine the state of
    a system.
    
    .INPUTS
    None
    
    .OUTPUTS
    System.Boolean
    #>
    
      Write-FunctionCallLogMessage -Invocation $MyInvocation -Parameters $PSBoundParameters
    
      $uacRegPath = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System"
      $uacRegValue = "EnableLUA"
      $uacEnabled = $false
    
      # http://msdn.microsoft.com/en-us/library/windows/desktop/ms724832(v=vs.85).aspx
      $osVersion = [Environment]::OSVersion.Version
      if ($osVersion -ge [Version]'6.0')
      {
        $uacRegSetting = Get-ItemProperty -Path $uacRegPath
        try {
          $uacValue = $uacRegSetting.EnableLUA
          if ($uacValue -eq 1) {
            $uacEnabled = $true
          }
        } catch {
          #regkey doesn't exist, so proceed with false
    
        }
      }
    
     return $uacEnabled
    }
    
    # SIG # Begin signature block
    # MIIcpwYJKoZIhvcNAQcCoIIcmDCCHJQCAQExDzANBglghkgBZQMEAgEFADB5Bgor
    # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
    # KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCDQqd4yitDMET4w
    # wEMYQrhiQG1wsQAhT2QEV1bCR8jY8KCCF7EwggUwMIIEGKADAgECAhAECRgbX9W7
    # ZnVTQ7VvlVAIMA0GCSqGSIb3DQEBCwUAMGUxCzAJBgNVBAYTAlVTMRUwEwYDVQQK
    # EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xJDAiBgNV
    # BAMTG0RpZ2lDZXJ0IEFzc3VyZWQgSUQgUm9vdCBDQTAeFw0xMzEwMjIxMjAwMDBa
    # Fw0yODEwMjIxMjAwMDBaMHIxCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2Vy
    # dCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xMTAvBgNVBAMTKERpZ2lD
    # ZXJ0IFNIQTIgQXNzdXJlZCBJRCBDb2RlIFNpZ25pbmcgQ0EwggEiMA0GCSqGSIb3
    # DQEBAQUAA4IBDwAwggEKAoIBAQD407Mcfw4Rr2d3B9MLMUkZz9D7RZmxOttE9X/l
    # qJ3bMtdx6nadBS63j/qSQ8Cl+YnUNxnXtqrwnIal2CWsDnkoOn7p0WfTxvspJ8fT
    # eyOU5JEjlpB3gvmhhCNmElQzUHSxKCa7JGnCwlLyFGeKiUXULaGj6YgsIJWuHEqH
    # CN8M9eJNYBi+qsSyrnAxZjNxPqxwoqvOf+l8y5Kh5TsxHM/q8grkV7tKtel05iv+
    # bMt+dDk2DZDv5LVOpKnqagqrhPOsZ061xPeM0SAlI+sIZD5SlsHyDxL0xY4PwaLo
    # LFH3c7y9hbFig3NBggfkOItqcyDQD2RzPJ6fpjOp/RnfJZPRAgMBAAGjggHNMIIB
    # yTASBgNVHRMBAf8ECDAGAQH/AgEAMA4GA1UdDwEB/wQEAwIBhjATBgNVHSUEDDAK
    # BggrBgEFBQcDAzB5BggrBgEFBQcBAQRtMGswJAYIKwYBBQUHMAGGGGh0dHA6Ly9v
    # Y3NwLmRpZ2ljZXJ0LmNvbTBDBggrBgEFBQcwAoY3aHR0cDovL2NhY2VydHMuZGln
    # aWNlcnQuY29tL0RpZ2lDZXJ0QXNzdXJlZElEUm9vdENBLmNydDCBgQYDVR0fBHow
    # eDA6oDigNoY0aHR0cDovL2NybDQuZGlnaWNlcnQuY29tL0RpZ2lDZXJ0QXNzdXJl
    # ZElEUm9vdENBLmNybDA6oDigNoY0aHR0cDovL2NybDMuZGlnaWNlcnQuY29tL0Rp
    # Z2lDZXJ0QXNzdXJlZElEUm9vdENBLmNybDBPBgNVHSAESDBGMDgGCmCGSAGG/WwA
    # AgQwKjAoBggrBgEFBQcCARYcaHR0cHM6Ly93d3cuZGlnaWNlcnQuY29tL0NQUzAK
    # BghghkgBhv1sAzAdBgNVHQ4EFgQUWsS5eyoKo6XqcQPAYPkt9mV1DlgwHwYDVR0j
    # BBgwFoAUReuir/SSy4IxLVGLp6chnfNtyA8wDQYJKoZIhvcNAQELBQADggEBAD7s
    # DVoks/Mi0RXILHwlKXaoHV0cLToaxO8wYdd+C2D9wz0PxK+L/e8q3yBVN7Dh9tGS
    # dQ9RtG6ljlriXiSBThCk7j9xjmMOE0ut119EefM2FAaK95xGTlz/kLEbBw6RFfu6
    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jAG8AbgBzAHQAaQB0AHUAdABlAHMAIABhAGMAYwBlAHAAdABhAG4A
    # YwBlACAAbwBmACAAdABoAGUAIABEAGkAZwBpAEMAZQByAHQAIABDAFAALwBDAFAA
    # UwAgAGEAbgBkACAAdABoAGUAIABSAGUAbAB5AGkAbgBnACAAUABhAHIAdAB5ACAA
    # QQBnAHIAZQBlAG0AZQBuAHQAIAB3AGgAaQBjAGgAIABsAGkAbQBpAHQAIABsAGkA
    # YQBiAGkAbABpAHQAeQAgAGEAbgBkACAAYQByAGUAIABpAG4AYwBvAHIAcABvAHIA
    # YQB0AGUAZAAgAGgAZQByAGUAaQBuACAAYgB5ACAAcgBlAGYAZQByAGUAbgBjAGUA
    # LjALBglghkgBhv1sAxUwHwYDVR0jBBgwFoAUFQASKxOYspkH7R7for5XDStnAs0w
    # HQYDVR0OBBYEFGFaTSS2STKdSip5GoNL9B6Jwcp9MH0GA1UdHwR2MHQwOKA2oDSG
    # Mmh0dHA6Ly9jcmwzLmRpZ2ljZXJ0LmNvbS9EaWdpQ2VydEFzc3VyZWRJRENBLTEu
    # Y3JsMDigNqA0hjJodHRwOi8vY3JsNC5kaWdpY2VydC5jb20vRGlnaUNlcnRBc3N1
    # cmVkSURDQS0xLmNybDB3BggrBgEFBQcBAQRrMGkwJAYIKwYBBQUHMAGGGGh0dHA6
    # Ly9vY3NwLmRpZ2ljZXJ0LmNvbTBBBggrBgEFBQcwAoY1aHR0cDovL2NhY2VydHMu
    # ZGlnaWNlcnQuY29tL0RpZ2lDZXJ0QXNzdXJlZElEQ0EtMS5jcnQwDQYJKoZIhvcN
    # AQEFBQADggEBAJ0lfhszTbImgVybhs4jIA+Ah+WI//+x1GosMe06FxlxF82pG7xa
    # FjkAneNshORaQPveBgGMN/qbsZ0kfv4gpFetW7easGAm6mlXIV00Lx9xsIOUGQVr
    # NZAQoHuXx/Y/5+IRQaa9YtnwJz04HShvOlIJ8OxwYtNiS7Dgc6aSwNOOMdgv420X
    # Ewbu5AO2FKv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z6I/7cCIUnkCZugqbuwiXQogs2ylMnjhhYh
    # XXGUckTDCjILfkA6Ul3/z8mykdpoxvYfq0pNfcqr77aeCRLjg5QOllijjihW4mG0
    # HfNSR0YZ7HZ3hyrbq6aDpfjXeAzo65Jj3y2PMi+2MkOG9mQxs/uXScLYCQtQH84E
    # X93WAldiDYsqTAcv9PkJnfXkhocFeIYahnAtyOwRwsyEtSMYOsaVRKGCAg8wggIL
    # BgkqhkiG9w0BCQYxggH8MIIB+AIBATB2MGIxCzAJBgNVBAYTAlVTMRUwEwYDVQQK
    # EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xITAfBgNV
    # BAMTGERpZ2lDZXJ0IEFzc3VyZWQgSUQgQ0EtMQIQAwGaAjr/WLFr1tXq5hfwZjAJ
    # BgUrDgMCGgUAoF0wGAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAcBgkqhkiG9w0B
    # CQUxDxcNMTcwODA3MDAwNDUwWjAjBgkqhkiG9w0BCQQxFgQUENnCIfc+nklotb8M
    # Pk83GeB2pw4wDQYJKoZIhvcNAQEBBQAEggEAjLpX8jDrOJUXBSmV9Z7IycRTZ/tS
    # TeNg4h/nVK9sWTb+kKdNBVGk/4RaJAy3WOQ1gs0lDMRNbTNFzrtruQStsOCg52Ld
    # +pI7AFfvwFirCCVqjnYlQnEa3caVwjokUdR0lXyRJ1X7iDpSvc7EF5EiFST6kTCL
    # LVwRXnbObxPgbbyaoR13CdIUUMVoeaMZ28rEg1s6PoO94Pg0ovPRQfF3qjmmmNj/
    # jOH2xcBkpPer4azwNpnd9k+SVVb4f02wXfmFyDjml7mVkonMUHBfnWo9ICzq+zZY
    # cJzEazwJr9iSnl+Bcqu0OavN0f0bQ/i3nIt/+/Cbwe+rfOYBivSCbNm4Xg==
    # SIG # End signature block
    
  • tools\chocolateyInstall\helpers\functions\Get-UninstallRegistryKey.ps1 Show
    # Copyright © 2017 Chocolatey Software, Inc.
    # Copyright © 2011 - 2017 RealDimensions Software, LLC
    #
    # Licensed under the Apache License, Version 2.0 (the "License");
    # you may not use this file except in compliance with the License.
    #
    # You may obtain a copy of the License at
    #
    #   http://www.apache.org/licenses/LICENSE-2.0
    #
    # Unless required by applicable law or agreed to in writing, software
    # distributed under the License is distributed on an "AS IS" BASIS,
    # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    # See the License for the specific language governing permissions and
    # limitations under the License.
    
    function Get-UninstallRegistryKey {
    <#
    .SYNOPSIS
    Retrieve registry key(s) for system-installed applications from an
    exact or wildcard search.
    
    .DESCRIPTION
    This function will attempt to retrieve a matching registry key for an
    already installed application, usually to be used with a
    chocolateyUninstall.ps1 automation script.
    
    The function also prevents `Get-ItemProperty` from failing when
    handling wrongly encoded registry keys.
    
    .NOTES
    Available in 0.9.10+. If you need to maintain compatibility with pre
    0.9.10, please add the following to your nuspec (check for minimum
    version):
    
    ~~~xml
    <dependencies>
      <dependency id="chocolatey-core.extension" version="1.1.0" />
    </dependencies>
    ~~~
    
    .INPUTS
    String
    
    .OUTPUTS
    This function searches registry objects and returns an array
    of PSCustomObject with the matched key's properties.
    
    Retrieve properties with dot notation, for example:
    `$key.UninstallString`
    
    
    .PARAMETER SoftwareName
    Part or all of the Display Name as you see it in Programs and Features.
    It should be enough to be unique.
    The syntax follows the rules of the PowerShell `-like` operator, so the
    `*` character is interpreted as a wildcard, which matches any (zero or
    more) characters.
    
    If the display name contains a version number, such as "Launchy (2.5)",
    it is recommended you use a fuzzy search `"Launchy (*)"` (the wildcard
    `*`) so if Launchy auto-updates or is updated outside of Chocolatey, the
    uninstall script will not fail.
    
    Take care not to abuse fuzzy/glob pattern searches. Be conscious of
    programs that may have shared or common root words to prevent
    overmatching. For example, "SketchUp*" would match two keys with
    software names "SketchUp 2016" and "SketchUp Viewer" that are different
    programs released by the same company.
    
    .PARAMETER IgnoredArguments
    Allows splatting with arguments that do not apply. Do not use directly.
    
    .EXAMPLE
    >
    # Version match: Software name is "Gpg4Win (2.3.0)"
    [array]$key = Get-UninstallRegistryKey -SoftwareName "Gpg4win (*)"
    $key.UninstallString
    
    .EXAMPLE
    >
    # Fuzzy match: Software name is "Launchy 2.5"
    [array]$key = Get-UninstallRegistryKey -SoftwareName "Launchy*"
    $key.UninstallString
    
    .EXAMPLE
    >
    # Exact match: Software name in Programs and Features is "VLC media player"
    [array]$key = Get-UninstallRegistryKey -SoftwareName "VLC media player"
    $key.UninstallString
    
    .EXAMPLE
    >
    #  Version match: Software name is "SketchUp 2016"
    # Note that the similar software name "SketchUp Viewer" would not be matched.
    [array]$key = Get-UninstallRegistryKey -SoftwareName "SketchUp [0-9]*"
    $key.UninstallString
    
    .LINK
    Install-ChocolateyPackage
    
    .LINK
    Install-ChocolateyInstallPackage
    
    .LINK
    Uninstall-ChocolateyPackage
    #>
    [CmdletBinding()]
    param(
      [parameter(Mandatory=$true, Position=0, ValueFromPipeline=$true)]
      [string] $softwareName,
      [parameter(ValueFromRemainingArguments = $true)][Object[]] $ignoredArguments
    )
    
      Write-FunctionCallLogMessage -Invocation $MyInvocation -Parameters $PSBoundParameters
    
      if ($softwareName -eq $null -or $softwareName -eq '') {
        throw "$SoftwareName cannot be empty for Get-UninstallRegistryKey"
      }
    
      $ErrorActionPreference = 'Stop'
      $local_key       = 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Uninstall\*'
      $machine_key     = 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\*'
      $machine_key6432 = 'HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*'
    
      Write-Verbose "Retrieving all uninstall registry keys"
      [array]$keys = Get-ChildItem -Path @($machine_key6432, $machine_key, $local_key) -ErrorAction SilentlyContinue
      Write-Debug "Registry uninstall keys on system: $($keys.Count)"
    
      Write-Debug "Error handling check: `'Get-ItemProperty`' fails if a registry key is encoded incorrectly."
      [int]$maxAttempts = $keys.Count
      for ([int]$attempt = 1; $attempt -le $maxAttempts; $attempt++) {
        [bool]$success = $false
    
        $keyPaths = $keys | Select-Object -ExpandProperty PSPath
        try {
          [array]$foundKey = Get-ItemProperty -Path $keyPaths -ErrorAction Stop | ? { $_.DisplayName -like $softwareName }
          $success = $true
        } catch {
          Write-Debug "Found bad key."
          foreach ($key in $keys){
            try {
              Get-ItemProperty $key.PsPath > $null
            } catch {
              $badKey = $key.PsPath
            }
          }
          Write-Verbose "Skipping bad key: $badKey"
          [array]$keys = $keys | ? { $badKey -NotContains $_.PsPath }
        }
    
        if ($success) { break; }
    
        if ($attempt -ge 10) {
          Write-Warning "Found 10 or more bad registry keys. Run command again with `'--verbose --debug`' for more info."
          Write-Debug "Each key searched should correspond to an installed program. It is very unlikely to have more than a few programs with incorrectly encoded keys, if any at all. This may be indicative of one or more corrupted registry branches."
        }
      }
    
      if ($foundKey -eq $null -or $foundkey.Count -eq 0) {
        Write-Warning "No registry key found based on  '$softwareName'"
      }
    
      Write-Debug "Found $($foundKey.Count) uninstall registry key(s) with SoftwareName:`'$SoftwareName`'";
    
      return $foundKey
    }
    
    Set-Alias Get-InstallRegistryKey Get-UninstallRegistryKey
    
    # SIG # Begin signature block
    # MIIcpwYJKoZIhvcNAQcCoIIcmDCCHJQCAQExDzANBglghkgBZQMEAgEFADB5Bgor
    # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
    # KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCBES8sHzbRLLNcJ
    # 9iSdROLrD1zFWyfa5gBGwaNn1wzd16CCF7EwggUwMIIEGKADAgECAhAECRgbX9W7
    # ZnVTQ7VvlVAIMA0GCSqGSIb3DQEBCwUAMGUxCzAJBgNVBAYTAlVTMRUwEwYDVQQK
    # EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xJDAiBgNV
    # BAMTG0RpZ2lDZXJ0IEFzc3VyZWQgSUQgUm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GCSqGSIb3DQEBCwUAA4IBAQCLBAE/
    # 2x4amEecDEoy9g+WmWMROiB4GnkPqj+IbiwftmwC5/7yL3/592HOFMJr0qOgUt51
    # moE8SuuLuOGw63c5+/48LJS4jP2XzbVNByRPIxPWorm4t/OzTJNziTowHQ+wLwwI
    # 8U97+8DaHCNL7iLZNEiqbVlpF3j7SMWGgf2BVYADJyxluNzf0ZUO+lXN4gOkM8tl
    # VDc7SjZEKvu6ckAaxXf7NPbCXVL/3+LvdmoLbT3vJlfzeXqduO3oieB10ic3ug5T
    # XtoYmyEk/P3yR3x/TqUlg1x/xaolBxy5TyMeSLcBlYn42fnQL154bvMGwFiCsHWQ
    # wY09I0xpEysOMiy8MIIGajCCBVKgAwIBAgIQAwGaAjr/WLFr1tXq5hfwZjANBgkq
    # hkiG9w0BAQUFADBiMQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5j
    # MRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSEwHwYDVQQDExhEaWdpQ2VydCBB
    # c3N1cmVkIElEIENBLTEwHhcNMTQxMDIyMDAwMDAwWhcNMjQxMDIyMDAwMDAwWjBH
    # MQswCQYDVQQGEwJVUzERMA8GA1UEChMIRGlnaUNlcnQxJTAjBgNVBAMTHERpZ2lD
    # ZXJ0IFRpbWVzdGFtcCBSZXNwb25kZXIwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAw
    # ggEKAoIBAQCjZF38fLPggjXg4PbGKuZJdTvMbuBTqZ8fZFnmfGt/a4ydVfiS457V
    # WmNbAklQ2YPOb2bu3cuF6V+l+dSHdIhEOxnJ5fWRn8YUOawk6qhLLJGJzF4o9GS2
    # ULf1ErNzlgpno75hn67z/RJ4dQ6mWxT9RSOOhkRVfRiGBYxVh3lIRvfKDo2n3k5f
    # 4qi2LVkCYYhhchhoubh87ubnNC8xd4EwH7s2AY3vJ+P3mvBMMWSN4+v6GYeofs/s
    # jAw2W3rBerh4x8kGLkYQyI3oBGDbvHN0+k7Y/qpA8bLOcEaD6dpAoVk62RUJV5lW
    # MJPzyWHM0AjMa+xiQpGsAsDvpPCJEY93AgMBAAGjggM1MIIDMTAOBgNVHQ8BAf8E
    # BAMCB4AwDAYDVR0TAQH/BAIwADAWBgNVHSUBAf8EDDAKBggrBgEFBQcDCDCCAb8G
    # A1UdIASCAbYwggGyMIIBoQYJYIZIAYb9bAcBMIIBkjAoBggrBgEFBQcCARYcaHR0
    # cHM6Ly93d3cuZGlnaWNlcnQuY29tL0NQUzCCAWQGCCsGAQUFBwICMIIBVh6CAVIA
    # QQBuAHkAIAB1AHMAZQAgAG8AZgAgAHQAaABpAHMAIABDAGUAcgB0AGkAZgBpAGMA
    # YQB0AGUAIABjAG8AbgBzAHQAaQB0AHUAdABlAHMAIABhAGMAYwBlAHAAdABhAG4A
    # YwBlACAAbwBmACAAdABoAGUAIABEAGkAZwBpAEMAZQByAHQAIABDAFAALwBDAFAA
    # UwAgAGEAbgBkACAAdABoAGUAIABSAGUAbAB5AGkAbgBnACAAUABhAHIAdAB5ACAA
    # QQBnAHIAZQBlAG0AZQBuAHQAIAB3AGgAaQBjAGgAIABsAGkAbQBpAHQAIABsAGkA
    # YQBiAGkAbABpAHQAeQAgAGEAbgBkACAAYQByAGUAIABpAG4AYwBvAHIAcABvAHIA
    # YQB0AGUAZAAgAGgAZQByAGUAaQBuACAAYgB5ACAAcgBlAGYAZQByAGUAbgBjAGUA
    # LjALBglghkgBhv1sAxUwHwYDVR0jBBgwFoAUFQASKxOYspkH7R7for5XDStnAs0w
    # HQYDVR0OBBYEFGFaTSS2STKdSip5GoNL9B6Jwcp9MH0GA1UdHwR2MHQwOKA2oDSG
    # Mmh0dHA6Ly9jcmwzLmRpZ2ljZXJ0LmNvbS9EaWdpQ2VydEFzc3VyZWRJRENBLTEu
    # Y3JsMDigNqA0hjJodHRwOi8vY3JsNC5kaWdpY2VydC5jb20vRGlnaUNlcnRBc3N1
    # cmVkSURDQS0xLmNybDB3BggrBgEFB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HlQOkrXqc0PmCpy42dNZaFbQleOLjCuzoNWEOS
    # YqSWyQUyG7L/hSa2FSWnKVF0bci5qayfnspr6NnSAQ8/71tknnjoKp7TfcvRSUnY
    # 93S+DugGVScgH6xfxoIesoVO33Hmp7Ri6k1kESvpT33qTzZpw+uxd16XhwFcC1A1
    # hVz7Tj1puUnFDD/yCfPJLnVM8FK0iCQxutejtDVCgpiSGzay3AJRMpAQI3QpB9k+
    # XWtZRnxkIF4tqdQu3OALy5EFvgupfu/VuJlxuZOkNF9NbpyY0pD1FVV27w==
    # SIG # End signature block
    
  • tools\chocolateyInstall\helpers\functions\Get-VirusCheckValid.ps1 Show
    # Copyright © 2017 Chocolatey Software, Inc.
    # Copyright © 2015 - 2017 RealDimensions Software, LLC
    # Copyright © 2011 - 2015 RealDimensions Software, LLC & original authors/contributors from https://github.com/chocolatey/chocolatey
    #
    # Licensed under the Apache License, Version 2.0 (the "License");
    # you may not use this file except in compliance with the License.
    # You may obtain a copy of the License at
    #
    #     http://www.apache.org/licenses/LICENSE-2.0
    #
    # Unless required by applicable law or agreed to in writing, software
    # distributed under the License is distributed on an "AS IS" BASIS,
    # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    # See the License for the specific language governing permissions and
    # limitations under the License.
    
    function Get-VirusCheckValid {
    <#
    .SYNOPSIS
    Used in Pro/Business editions. Runtime virus check against downloaded
    resources.
    
    .DESCRIPTION
    Run a runtime malware check against downloaded resources prior to
    allowing Chocolatey to execute a file. This is available in 0.9.10+ only
    in Pro / Business editions.
    
    .NOTES
    Only licensed editions of Chocolatey provide runtime malware protection.
    
    .INPUTS
    None
    
    .OUTPUTS
    None
    
    .PARAMETER Url
    Not used
    
    .PARAMETER File
    The full file path to the file to verify against anti-virus scanners.
    
    .PARAMETER IgnoredArguments
    Allows splatting with arguments that do not apply. Do not use directly.
    #>
    param(
      [parameter(Mandatory=$false, Position=0)][string] $url,
      [parameter(Mandatory=$false, Position=1)][string] $file = '',
      [parameter(ValueFromRemainingArguments = $true)][Object[]] $ignoredArguments
    )
      Write-Debug "No runtime virus checking built into FOSS Chocolatey. Check out Pro/Business - https://chocolatey.org/compare"
    }
    
    # SIG # Begin signature block
    # MIIcpwYJKoZIhvcNAQcCoIIcmDCCHJQCAQExDzANBglghkgBZQMEAgEFADB5Bgor
    # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
    # KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCCdXHW+nvROXlyk
    # 0VpqIg0k2DsReyeCNeGyxdwEeYS2DqCCF7EwggUwMIIEGKADAgECAhAECRgbX9W7
    # ZnVTQ7VvlVAIMA0GCSqGSIb3DQEBCwUAMGUxCzAJBgNVBAYTAlVTMRUwEwYDVQQK
    # EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xJDAiBgNV
    # BAMTG0RpZ2lDZXJ0IEFzc3VyZWQgSUQgUm9vdCBDQTAeFw0xMzEwMjIxMjAwMDBa
    # Fw0yODEwMjIxMjAwMDBaMHIxCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2Vy
    # dCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xMTAvBgNVBAMTKERpZ2lD
    # ZXJ0IFNIQTIgQXNzdXJlZCBJRCBDb2RlIFNpZ25pbmcgQ0EwggEiMA0GCSqGSIb3
    # DQEBAQUAA4IBDwAwggEKAoIBAQD407Mcfw4Rr2d3B9MLMUkZz9D7RZmxOttE9X/l
    # qJ3bMtdx6nadBS63j/qSQ8Cl+YnUNxnXtqrwnIal2CWsDnkoOn7p0WfTxvspJ8fT
    # eyOU5JEjlpB3gvmhhCNmElQzUHSxKCa7JGnCwlLyFGeKiUXULaGj6YgsIJWuHEqH
    # CN8M9eJNYBi+qsSyrnAxZjNxPqxwoqvOf+l8y5Kh5TsxHM/q8grkV7tKtel05iv+
    # bMt+dDk2DZDv5LVOpKnqagqrhPOsZ061xPeM0SAlI+sIZD5SlsHyDxL0xY4PwaLo
    # LFH3c7y9hbFig3NBggfkOItqcyDQD2RzPJ6fpjOp/RnfJZPRAgMBAAGjggHNMIIB
    # yTASBgNVHRMBAf8ECDAGAQH/AgEAMA4GA1UdDwEB/wQEAwIBhjATBgNVHSUEDDAK
    # BggrBgEFBQcDAzB5BggrBgEFBQcBAQRtMGswJAYIKwYBBQUHMAGGGGh0dHA6Ly9v
    # Y3NwLmRpZ2ljZXJ0LmNvbTBDBggrBgEFBQcwAoY3aHR0cDovL2NhY2VydHMuZGln
    # aWNlcnQuY29tL0RpZ2lDZXJ0QXNzdXJlZElEUm9vdENBLmNydDCBgQYDVR0fBHow
    # eDA6oDigNoY0aHR0cDovL2NybDQuZGlnaWNlcnQuY29tL0RpZ2lDZXJ0QXNzdXJl
    # ZElEUm9vdENBLmNybDA6oDigNoY0aHR0cDovL2NybDMuZGlnaWNlcnQuY29tL0Rp
    # Z2lDZXJ0QXNzdXJlZElEUm9vdENBLmNybDBPBgNVHSAESDBGMDgGCmCGSAGG/WwA
    # AgQwKjAoBggrBgEFBQcCARYcaHR0cHM6Ly93d3cuZGlnaWNlcnQuY29tL0NQUzAK
    # BghghkgBhv1sAzAdBgNVHQ4EFgQUWsS5eyoKo6XqcQPAYPkt9mV1DlgwHwYDVR0j
    # BBgwFoAUReuir/SSy4IxLVGLp6chnfNtyA8wDQYJKoZIhvcNAQELBQADggEBAD7s
    # DVoks/Mi0RXILHwlKXaoHV0cLToaxO8wYdd+C2D9wz0PxK+L/e8q3yBVN7Dh9tGS
    # dQ9RtG6ljlriXiSBThCk7j9xjmMOE0ut119EefM2FAaK95xGTlz/kLEbBw6RFfu6
    # r7VRwo0kriTGxycqoSkoGjpxKAI8LpGjwCUR4pwUR6F6aGivm6dcIFzZcbEMj7uo
    # +MUSaJ/PQMtARKUT8OZkDCUIQjKyNookAv4vcn4c10lFluhZHen6dGRrsutmQ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bgBkACAAdABoAGUAIABSAGUAbAB5AGkAbgBnACAAUABhAHIAdAB5ACAA
    # QQBnAHIAZQBlAG0AZQBuAHQAIAB3AGgAaQBjAGgAIABsAGkAbQBpAHQAIABsAGkA
    # YQBiAGkAbABpAHQAeQAgAGEAbgBkACAAYQByAGUAIABpAG4AYwBvAHIAcABvAHIA
    # YQB0AGUAZAAgAGgAZQByAGUAaQBuACAAYgB5ACAAcgBlAGYAZQByAGUAbgBjAGUA
    # LjALBglghkgBhv1sAxUwHwYDVR0jBBgwFoAUFQASKxOYspkH7R7for5XDStnAs0w
    # HQYDVR0OBBYEFGFaTSS2STKdSip5GoNL9B6Jwcp9MH0GA1UdHwR2MHQwOKA2oDSG
    # Mmh0dHA6Ly9jcmwzLmRpZ2ljZXJ0LmNvbS9EaWdpQ2VydEFzc3VyZWRJRENBLTEu
    # Y3JsMDigNqA0hjJodHRwOi8vY3JsNC5kaWdpY2VydC5jb20vRGlnaUNlcnRBc3N1
    # cmVkSURDQS0xLmNybDB3BggrBgEFBQcBAQRrMGkwJAYIKwYBBQUHMAGGGGh0dHA6
    # Ly9vY3NwLmRpZ2ljZXJ0LmNvbTBBBggrBgEFBQcwAoY1aHR0cDovL2NhY2VydHMu
    # ZGlnaWNlcnQuY29tL0RpZ2lDZXJ0QXNzdXJlZElEQ0EtMS5jcnQwDQYJKoZIhvcN
    # AQEFBQADggEBAJ0lfhszTbImgVybhs4jIA+Ah+WI//+x1GosMe06FxlxF82pG7xa
    # FjkAneNshORaQPveBgGMN/qbsZ0kfv4gpFetW7easGAm6mlXIV00Lx9xsIOUGQVr
    # NZAQoHuXx/Y/5+IRQaa9YtnwJz04HShvOlIJ8OxwYtNiS7Dgc6aSwNOOMdgv420X
    # Ewbu5AO2FKvzj0OncZ0h3RTKFV2SQdr5D4HRmXQNJsQOfxu19aDxxncGKBXp2JPl
    # VRbwuwqrHNtcSCdmyKOLChzlldquxC5ZoGHd2vNtomHpigtt7BIYvfdVVEADkitr
    # wlHCCk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c2wtY3Bz
    # LXJlcG9zaXRvcnkuaHRtMIIBZAYIKwYBBQUHAgIwggFWHoIBUgBBAG4AeQAgAHUA
    # cwBlACAAbwBmACAAdABoAGkAcwAgAEMAZQByAHQAaQBmAGkAYwBhAHQAZQAgAGMA
    # bwBuAHMAdABpAHQAdQB0AGUAcwAgAGEAYwBjAGUAcAB0AGEAbgBjAGUAIABvAGYA
    # IAB0AGgAZQAgAEQAaQBnAGkAQwBlAHIAdAAgAEMAUAAvAEMAUABTACAAYQBuAGQA
    # IAB0AGgAZQAgAFIAZQBsAHkAaQBuAGcAIABQAGEAcgB0AHkAIABBAGcAcgBlAGUA
    # bQBlAG4AdAAgAHcAaABpAGMAaAAgAGwAaQBtAGkAdAAgAGwAaQBhAGIAaQBsAGkA
    # dAB5ACAAYQBuAGQAIABhAHIAZQAgAGkAbgBjAG8AcgBwAG8AcgBhAHQAZQBkACAA
    # aABlAHIAZQBpAG4AIABiAHkAIAByAGUAZgBlAHIAZQBuAGMAZQAuMAsGCWCGSAGG
    # /WwDFTASBgNVHRMBAf8ECDAGAQH/AgEAMHkGCCsGAQUFBwEBBG0wazAkBggrBgEF
    # BQcwAYYYaHR0cDovL29jc3AuZGlnaWNlcnQuY29tMEMGCCsGAQUFBzAChjdodHRw
    # Oi8vY2FjZXJ0cy5kaWdpY2VydC5jb20vRGlnaUNlcnRBc3N1cmVkSURSb290Q0Eu
    # Y3J0MIGBBgNVHR8EejB4MDqgOKA2hjRodHRwOi8vY3JsMy5kaWdpY2VydC5jb20v
    # RGlnaUNlcnRBc3N1cmVkSURSb290Q0EuY3JsMDqgOKA2hjRodHRwOi8vY3JsNC5k
    # aWdpY2VydC5jb20vRGlnaUNlcnRBc3N1cmVkSURSb290Q0EuY3JsMB0GA1UdDgQW
    # BBQVABIrE5iymQftHt+ivlcNK2cCzTAfBgNVHSMEGDAWgBRF66Kv9JLLgjEtUYun
    # pyGd823IDzANBgkqhkiG9w0BAQUFAAOCAQEARlA+ybcoJKc4HbZ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MoLnqdjuG6KsUrmdlyhdfw9Qnpj9A1XKNNgTT0FSis
    # u5eQ4eUqd3jUvFGzC1DoSO/KtIhqNTdxWzOMiLITCvYhOGkDsME/xaGCAg8wggIL
    # BgkqhkiG9w0BCQYxggH8MIIB+AIBATB2MGIxCzAJBgNVBAYTAlVTMRUwEwYDVQQK
    # EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xITAfBgNV
    # BAMTGERpZ2lDZXJ0IEFzc3VyZWQgSUQgQ0EtMQIQAwGaAjr/WLFr1tXq5hfwZjAJ
    # BgUrDgMCGgUAoF0wGAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAcBgkqhkiG9w0B
    # CQUxDxcNMTcwODA3MDAwNDUwWjAjBgkqhkiG9w0BCQQxFgQUfzyAWJ8y/EdPPhyZ
    # +amEsDh2K8EwDQYJKoZIhvcNAQEBBQAEggEAOio98g5WX1kF5eGas0cmD0ItkPuB
    # GaCt5IxIT76CNUbtZG7iYIy8gmrljYhdOd7Iqq5wFmQdtPsF77mixyyYv3GjEYDc
    # iNMaasaZoH4Hpy6/H8GHOgQGSfmTq3y5MU0H7ehuQCwMtmNvK95/+jzy572z8b8v
    # xrNlpxgz5JdQvWQUsL2HgJ87NIKfdhX9FtqWL48Hm0HRFs8MiSU3me3UFN+//pta
    # IVmMMWQjmmmBtf2N3vHw9LnzIf1ucCWm7ngZede3dRdSdOW4R/zWdCStmabBh6DI
    # J9lylfWO21nyhhEhVao4KREGCtVbaptAHUN+CtGSRmG4Hc/GV5ZeUNhoeQ==
    # SIG # End signature block
    
  • tools\chocolateyInstall\helpers\functions\Get-WebFile.ps1 Show
    # http://poshcode.org/417
    ## Get-WebFile (aka wget for PowerShell)
    ##############################################################################################################
    ## Downloads a file or page from the web
    ## History:
    ## v3.6 - Add -Passthru switch to output TEXT files
    ## v3.5 - Add -Quiet switch to turn off the progress reports ...
    ## v3.4 - Add progress report for files which don't report size
    ## v3.3 - Add progress report for files which report their size
    ## v3.2 - Use the pure Stream object because StreamWriter is based on TextWriter:
    ##        it was messing up binary files, and making mistakes with extended characters in text
    ## v3.1 - Unwrap the filename when it has quotes around it
    ## v3   - rewritten completely using HttpWebRequest + HttpWebResponse to figure out the file name, if possible
    ## v2   - adds a ton of parsing to make the output pretty
    ##        added measuring the scripts involved in the command, (uses Tokenizer)
    ##############################################################################################################
    ## Additional functionality added by Chocolatey Team / Chocolatey Contributors
    ##  - Proxy
    ##  - Better error handling
    ##  - Inline documentation
    ##  - Cmdlet conversion
    ##  - Closing request/response and cleanup
    ##  - Request / ReadWriteResponse Timeouts
    ##############################################################################################################
    function Get-WebFile {
    <#
    .SYNOPSIS
    Downloads a file from an HTTP/HTTPS location. Prefer HTTPS when
    available.
    
    .DESCRIPTION
    This will download a file from an HTTP/HTTPS location, saving the file
    to the FileName location specified.
    
    .NOTES
    This is a low-level function and not recommended for use in package
    scripts. It is recommended you call `Get-ChocolateyWebFile` instead.
    
    Starting in 0.9.10, will automatically call Set-PowerShellExitCode to
    set the package exit code to 404 if the resource is not found.
    
    .INPUTS
    None
    
    .OUTPUTS
    None
    
    .PARAMETER Url
    This is the url to download the file from. Prefer HTTPS when available.
    
    .PARAMETER FileName
    This is the full path to the file to create. If downloading to the
    package folder next to the install script, the path will be like
    `"$(Split-Path -Parent $MyInvocation.MyCommand.Definition)\\file.exe"`
    
    .PARAMETER UserAgent
    The user agent to use as part of the request. Defaults to 'chocolatey
    command line'.
    
    .PARAMETER PassThru
    DO NOT USE - holdover from original function.
    
    .PARAMETER Quiet
    Silences the progress output.
    
    .PARAMETER Options
    OPTIONAL - Specify custom headers. Available in 0.9.10+.
    
    .PARAMETER IgnoredArguments
    Allows splatting with arguments that do not apply. Do not use directly.
    
    .LINK
    Get-ChocolateyWebFile
    
    .LINK
    Get-FtpFile
    
    .LINK
    Get-WebHeaders
    
    .LINK
    Get-WebFileName
    #>
    param(
      [parameter(Mandatory=$false, Position=0)][string] $url = '', #(Read-Host "The URL to download"),
      [parameter(Mandatory=$false, Position=1)][string] $fileName = $null,
      [parameter(Mandatory=$false, Position=2)][string] $userAgent = 'chocolatey command line',
      [parameter(Mandatory=$false)][switch] $Passthru,
      [parameter(Mandatory=$false)][switch] $quiet,
      [parameter(Mandatory=$false)][hashtable] $options = @{Headers=@{}},
      [parameter(ValueFromRemainingArguments = $true)][Object[]] $ignoredArguments
    )
    
      Write-FunctionCallLogMessage -Invocation $MyInvocation -Parameters $PSBoundParameters
    
      try {
        $uri = [System.Uri]$url
        if ($uri.IsFile()) {
          Write-Debug "Url is local file, setting destination"
          if ($url.LocalPath -ne $fileName) {
            Copy-Item $uri.LocalPath -Destination $fileName -Force
          }
    
          return
        }
      } catch {
        #continue on
      }
    
      $req = [System.Net.HttpWebRequest]::Create($url);
      $defaultCreds = [System.Net.CredentialCache]::DefaultCredentials
      if ($defaultCreds -ne $null) {
        $req.Credentials = $defaultCreds
      }
    
      $webclient = new-object System.Net.WebClient
      if ($defaultCreds -ne $null) {
        $webClient.Credentials = $defaultCreds
      }
    
      # check if a proxy is required
      $explicitProxy = $env:chocolateyProxyLocation
      $explicitProxyUser = $env:chocolateyProxyUser
      $explicitProxyPassword = $env:chocolateyProxyPassword
      $explicitProxyBypassList = $env:chocolateyProxyBypassList
      $explicitProxyBypassOnLocal = $env:chocolateyProxyBypassOnLocal
      if ($explicitProxy -ne $null) {
        # explicit proxy
    	  $proxy = New-Object System.Net.WebProxy($explicitProxy, $true)
    	  if ($explicitProxyPassword -ne $null) {
          $passwd = ConvertTo-SecureString $explicitProxyPassword -AsPlainText -Force
    	    $proxy.Credentials = New-Object System.Management.Automation.PSCredential ($explicitProxyUser, $passwd)
    	  }
        
        if ($explicitProxyBypassList -ne $null -and $explicitProxyBypassList -ne '') {
          $proxy.BypassList =  $explicitProxyBypassList.Split(',', [System.StringSplitOptions]::RemoveEmptyEntries)
        }
        if ($explicitProxyBypassOnLocal -eq 'true') { $proxy.BypassProxyOnLocal = $true; }
    
     	  Write-Host "Using explicit proxy server '$explicitProxy'."
        $req.Proxy = $proxy
      } elseif ($webclient.Proxy -and !$webclient.Proxy.IsBypassed($url)) {
    	  # system proxy (pass through)
        $creds = [net.CredentialCache]::DefaultCredentials
        if ($creds -eq $null) {
          Write-Debug "Default credentials were null. Attempting backup method"
          $cred = get-credential
          $creds = $cred.GetNetworkCredential();
        }
        $proxyaddress = $webclient.Proxy.GetProxy($url).Authority
        Write-Host "Using system proxy server '$proxyaddress'."
        $proxy = New-Object System.Net.WebProxy($proxyaddress)
        $proxy.Credentials = $creds
        $proxy.BypassProxyOnLocal = $true
        $req.Proxy = $proxy
      }
    
      $req.Accept = "*/*"
      $req.AllowAutoRedirect = $true
      $req.MaximumAutomaticRedirections = 20
      #$req.KeepAlive = $true
      $req.AutomaticDecompression = [System.Net.DecompressionMethods]::GZip -bor [System.Net.DecompressionMethods]::Deflate
      $req.Timeout = 30000
      if ($env:chocolateyRequestTimeout -ne $null -and $env:chocolateyRequestTimeout -ne '') {
        Write-Debug "Setting request timeout to  $env:chocolateyRequestTimeout"
        $req.Timeout =  $env:chocolateyRequestTimeout
      }
      if ($env:chocolateyResponseTimeout -ne $null -and $env:chocolateyResponseTimeout -ne '') {
        Write-Debug "Setting read/write timeout to  $env:chocolateyResponseTimeout"
        $req.ReadWriteTimeout =  $env:chocolateyResponseTimeout
      }
    
      #http://stackoverflow.com/questions/518181/too-many-automatic-redirections-were-attempted-error-message-when-using-a-httpw
      $req.CookieContainer = New-Object System.Net.CookieContainer
      if ($userAgent -ne $null) {
        Write-Debug "Setting the UserAgent to `'$userAgent`'"
        $req.UserAgent = $userAgent
      }
    
      if ($options.Headers.Count -gt 0) {
        Write-Debug "Setting custom headers"
        foreach ($item in $options.Headers.GetEnumerator()) {
          $uri = (new-object system.uri $url)
          Write-Debug($item.Key + ':' + $item.Value)
          switch ($item.Key) {
            'Accept' {$req.Accept = $item.Value}
            'Cookie' {$req.CookieContainer.SetCookies($uri, $item.Value)}
            'Referer' {$req.Referer = $item.Value}
            'User-Agent' {$req.UserAgent = $item.Value}
            Default {$req.Headers.Add($item.Key, $item.Value)}
          }
        }
      }
    
      try {
       $res = $req.GetResponse();
    
       try {
          $headers = @{}
          foreach ($key in $res.Headers) {
            $value = $res.Headers[$key];
            if ($value) {
              $headers.Add("$key","$value")
            }
          }
    
          $binaryIsTextCheckFile = "$fileName.istext"
          if (Test-Path($binaryIsTextCheckFile)) { Remove-Item $binaryIsTextCheckFile -Force -EA SilentlyContinue; }
    
          if ($headers.ContainsKey("Content-Type")) {
            $contentType = $headers['Content-Type']
            if ($contentType -ne $null) {
              if ($contentType.ToLower().Contains("text/html") -or $contentType.ToLower().Contains("text/plain")) {
                Write-Warning "$fileName is of content type $contentType"
                Set-Content -Path $binaryIsTextCheckFile -Value "$fileName has content type $contentType" -Encoding UTF8 -Force
              }
            }
          }
        } catch {
          # not able to get content-type header
          Write-Debug "Error getting content type - $($_.Exception.Message)"
        }
    
        if($fileName -and !(Split-Path $fileName)) {
          $fileName = Join-Path (Get-Location -PSProvider "FileSystem") $fileName
        }
        elseif((!$Passthru -and ($fileName -eq $null)) -or (($fileName -ne $null) -and (Test-Path -PathType "Container" $fileName)))
        {
          [string]$fileName = ([regex]'(?i)filename=(.*)$').Match( $res.Headers["Content-Disposition"] ).Groups[1].Value
          $fileName = $fileName.trim("\/""'")
          if(!$fileName) {
             $fileName = $res.ResponseUri.Segments[-1]
             $fileName = $fileName.trim("\/")
             if(!$fileName) {
                $fileName = Read-Host "Please provide a file name"
             }
             $fileName = $fileName.trim("\/")
             if(!([IO.FileInfo]$fileName).Extension) {
                $fileName = $fileName + "." + $res.ContentType.Split(";")[0].Split("/")[1]
             }
          }
          $fileName = Join-Path (Get-Location -PSProvider "FileSystem") $fileName
        }
        if($Passthru) {
          $encoding = [System.Text.Encoding]::GetEncoding( $res.CharacterSet )
          [string]$output = ""
        }
    
        if($res.StatusCode -eq 401 -or $res.StatusCode -eq 403 -or $res.StatusCode -eq 404) {
          $env:ChocolateyExitCode = $res.StatusCode
          throw "Remote file either doesn't exist, is unauthorized, or is forbidden for '$url'."
        }
    
        if($res.StatusCode -eq 200) {
          [long]$goal = $res.ContentLength
          $goalFormatted = Format-FileSize $goal
          $reader = $res.GetResponseStream()
    
          if ($fileName) {
            $fileDirectory = $([System.IO.Path]::GetDirectoryName($fileName))
            if (!(Test-Path($fileDirectory))) {
              [System.IO.Directory]::CreateDirectory($fileDirectory) | Out-Null
            }
    
            try {
              $writer = new-object System.IO.FileStream $fileName, "Create"
            } catch {
              throw $_.Exception
            }
          }
    
          [byte[]]$buffer = new-object byte[] 1048576
          [long]$total = [long]$count = [long]$iterLoop =0
    
          $originalEAP = $ErrorActionPreference
          $ErrorActionPreference = 'Stop'
          try {
            do
            {
              $count = $reader.Read($buffer, 0, $buffer.Length);
              if($fileName) {
                $writer.Write($buffer, 0, $count);
              }
    
              if($Passthru){
                $output += $encoding.GetString($buffer,0,$count)
              } elseif(!$quiet) {
                $total += $count
                $totalFormatted = Format-FileSize $total
                if($goal -gt 0 -and ++$iterLoop%10 -eq 0) {
                  $percentComplete = [Math]::Truncate(($total/$goal)*100)
                  Write-Progress "Downloading $url to $fileName" "Saving $totalFormatted of $goalFormatted" -id 0 -percentComplete $percentComplete
                }
    
                if ($total -eq $goal -and $count -eq 0) {
                  Write-Progress "Completed download of $url." "Completed download of $fileName ($goalFormatted)." -id 0 -Completed -PercentComplete 100
                }
              }
            } while ($count -gt 0)
    	    Write-Host ""
    	    Write-Host "Download of $([System.IO.Path]::GetFileName($fileName)) ($goalFormatted) completed."
          } catch {
            throw $_.Exception
          } finally {
            $ErrorActionPreference = $originalEAP
          }
    
          $reader.Close()
          if($fileName) {
             $writer.Flush()
             $writer.Close()
          }
          if($Passthru){
             $output
          }
        }
      } catch {
        if ($req -ne $null) {
          $req.ServicePoint.MaxIdleTime = 0
          $req.Abort();
          # ruthlessly remove $req to ensure it isn't reused
          Remove-Variable req
          Start-Sleep 1
          [GC]::Collect()
        }
    
        Set-PowerShellExitCode 404
        if ($env:DownloadCacheAvailable -eq 'true') {
           throw "The remote file either doesn't exist, is unauthorized, or is forbidden for url '$url'. $($_.Exception.Message) `nThis package is likely not broken for licensed users - see https://chocolatey.org/docs/features-private-cdn."
        } else {
           throw "The remote file either doesn't exist, is unauthorized, or is forbidden for url '$url'. $($_.Exception.Message)"
        }
      } finally {
        if ($res -ne $null) {
          $res.Close()
        }
    
        Start-Sleep 1
      }
    }
    
    # this could be cleaned up with http://learn-powershell.net/2013/02/08/powershell-and-events-object-events/
    
    # SIG # Begin signature block
    # MIIcpwYJKoZIhvcNAQcCoIIcmDCCHJQCAQExDzANBglghkgBZQMEAgEFADB5Bgor
    # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
    # KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCDvexJR6JVsFWB6
    # VwL5cCsMqeQkBR2xfN1oHBm2m1/Et6CCF7EwggUwMIIEGKADAgECAhAECRgbX9W7
    # ZnVTQ7VvlVAIMA0GCSqGSIb3DQEBCwUAMGUxCzAJBgNVBAYTAlVTMRUwEwYDVQQK
    # EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xJDAiBgNV
    # BAMTG0RpZ2lDZXJ0IEFzc3VyZWQgSUQgUm9vdCBDQTAeFw0xMzEwMjIxMjAwMDBa
    # Fw0yODEwMjIxMjAwMDBaMHIxCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2Vy
    # dCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xMTAvBgNVBAMTKERpZ2lD
    # ZXJ0IFNIQTIgQXNzdXJlZCBJRCBDb2RlIFNpZ25pbmcgQ0EwggEiMA0GCSqGSIb3
    # DQEBAQUAA4IBDwAwggEKAoIBAQD407Mcfw4Rr2d3B9MLMUkZz9D7RZmxOttE9X/l
    # qJ3bMt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B1AHMAZQAgAG8AZgAgAHQAaABpAHMAIABDAGUAcgB0AGkAZgBpAGMA
    # YQB0AGUAIABjAG8AbgBzAHQAaQB0AHUAdABlAHMAIABhAGMAYwBlAHAAdABhAG4A
    # YwBlACAAbwBmACAAdABoAGUAIABEAGkAZwBpAEMAZQByAHQAIABDAFAALwBDAFAA
    # UwAgAGEAbgBkACAAdABoAGUAIABSAGUAbAB5AGkAbgBnACAAUABhAHIAdAB5ACAA
    # QQBnAHIAZQBlAG0AZQBuAHQAIAB3AGgAaQBjAGgAIABsAGkAbQBpAHQAIABsAGkA
    # YQBiAGkAbABpAHQAeQAgAGEAbgBkACAAYQByAGUAIABpAG4AYwBvAHIAcABvAHIA
    # YQB0AGUAZAAgAGgAZQByAGUAaQBuACAAYgB5ACAAcgBlAGYAZQByAGUAbgBjAGUA
    # LjALBglghkgBhv1sAxUwHwYDVR0jBBgwFoAUFQASKxOYspkH7R7for5XDStnAs0w
    # HQYDVR0OBBYEFGFaTSS2STKdSip5GoNL9B6Jwcp9MH0GA1UdHwR2MHQwOKA2oDSG
    # Mmh0dHA6Ly9jcmwzLmRpZ2ljZXJ0LmNvbS9EaWdpQ2VydEFzc3VyZWRJRENBLTEu
    # Y3JsMDigNqA0hjJodHRwOi8vY3JsNC5kaWdpY2VydC5jb20vRGlnaUNlcnRBc3N1
    # cmVkSURDQS0xLmNybDB3BggrBgEFBQcBAQRrMGkwJAYIKwYBBQUHMAGGGGh0dHA6
    # Ly9vY3NwLmRpZ2ljZXJ0LmNvbTBBBggrBgEFBQcwAoY1aHR0cDovL2NhY2VydHMu
    # ZGlnaWNlcnQuY29tL0RpZ2lDZXJ0QXNzdXJlZElEQ0EtMS5jcnQwDQYJKoZIhvcN
    # AQEFBQADggEBAJ0lfhszTbImgVybhs4jIA+Ah+WI//+x1GosMe06FxlxF82pG7xa
    # FjkAneNshORaQPveBgGMN/qbsZ0kfv4gpFetW7easGAm6mlXIV00Lx9xsIOUGQVr
    # NZAQoHuXx/Y/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za1upxUdEQUrH8CvUWxyupOOBuItTBR
    # L3FZahn8k5ANh1VjdpyHIogjcnjIofCCXaLkT9ftw8y9bpXZ0O4WgvlGNsFb8+iG
    # 4ZvKo4z6eU6H9LA+6RIGzJgYcPnrJeYTjuiceFdJXGGldXVJ4Sclu+aSU7aAzsA4
    # H/skCLTwzfh2BYBGB+3QTJoD8MCpGIm0L1BsYbNLYshqKsWRgb+0INVUrWjMVFT+
    # fA0IhrHncrMLGVu3RaSYSptlbomhwZa97XXlbfHgTmm4qMg8eHv9tqGCAg8wggIL
    # BgkqhkiG9w0BCQYxggH8MIIB+AIBATB2MGIxCzAJBgNVBAYTAlVTMRUwEwYDVQQK
    # EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xITAfBgNV
    # BAMTGERpZ2lDZXJ0IEFzc3VyZWQgSUQgQ0EtMQIQAwGaAjr/WLFr1tXq5hfwZjAJ
    # BgUrDgMCGgUAoF0wGAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAcBgkqhkiG9w0B
    # CQUxDxcNMTcwODA3MDAwNDUwWjAjBgkqhkiG9w0BCQQxFgQU74Jkp0Yn9qrZKJT4
    # 1QSAoyCyL+owDQYJKoZIhvcNAQEBBQAEggEAIsGMukyb1Kdq0Aa34vo3UmlQgkZF
    # 2W9ZdAtOkfsmBIJWu9peErYfn1ZYQe3+HPeymNf65bRyjTeMfoCi+oHaS0Xcr6Lp
    # 81sLI0nk/M26pjprUlTPA9mz2+GZkz6uRH30GjQgIJVXQLSGpu1Zr8e/cywuRa7x
    # Od7vZa5j4Ef72GsSVzqxbbKikXEECbl5Zcfqxrkt1S8cjV1hwhDW0scUS1Wrru52
    # pLCk4uGVyG0iPdhmvYTVOmVyLzd/EGsJzVZrOAnw1fOc/624q9vgTGe4hshN8fgC
    # 7kV41zk5R0yQxpQhLxoH1RFOFn+3Eh14gxt8rQDfM7f1oEA8FVODc/PkxQ==
    # SIG # End signature block
    
  • tools\chocolateyInstall\helpers\functions\Get-WebFileName.ps1 Show
    # Copyright © 2017 Chocolatey Software, Inc.
    # Copyright © 2011 - 2017 RealDimensions Software, LLC
    #
    # Licensed under the Apache License, Version 2.0 (the "License");
    # you may not use this file except in compliance with the License.
    # You may obtain a copy of the License at
    #
    #     http://www.apache.org/licenses/LICENSE-2.0
    #
    # Unless required by applicable law or agreed to in writing, software
    # distributed under the License is distributed on an "AS IS" BASIS,
    # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    # See the License for the specific language governing permissions and
    # limitations under the License.
    #
    # Based on http://stackoverflow.com/a/13571471/18475
    
    function Get-WebFileName {
    <#
    .SYNOPSIS
    Gets the original file name from a url. Used by Get-WebFile to determine
    the original file name for a file.
    
    .DESCRIPTION
    Uses several techniques to determine the original file name of the file
    based on the url for the file.
    
    .NOTES
    Available in 0.9.10+.
    Falls back to DefaultName when the name cannot be determined.
    
    Chocolatey works best when the packages contain the software it is
    managing and doesn't require downloads. However most software in the
    Windows world requires redistribution rights and when sharing packages
    publicly (like on the community feed), maintainers may not have those
    aforementioned rights. Chocolatey understands how to work with that,
    hence this function. You are not subject to this limitation with
    internal packages.
    
    .INPUTS
    None
    
    .OUTPUTS
    None
    
    .PARAMETER Url
    This is the url to a file that will be possibly downloaded.
    
    .PARAMETER DefaultName
    The name of the file to use when not able to determine the file name
    from the url response.
    
    .PARAMETER UserAgent
    The user agent to use as part of the request. Defaults to 'chocolatey
    command line'.
    
    .PARAMETER IgnoredArguments
    Allows splatting with arguments that do not apply. Do not use directly.
    
    .EXAMPLE
    Get-WebFileName -Url $url -DefaultName $originalFileName
    
    .LINK
    Get-WebHeaders
    
    .LINK
    Get-ChocolateyWebFile
    #>
    param(
      [parameter(Mandatory=$false, Position=0)][string] $url = '',
      [parameter(Mandatory=$true, Position=1)][string] $defaultName,
      [parameter(Mandatory=$false)][string] $userAgent = 'chocolatey command line',
      [parameter(ValueFromRemainingArguments = $true)][Object[]] $ignoredArguments
    )
    
      Write-FunctionCallLogMessage -Invocation $MyInvocation -Parameters $PSBoundParameters
    
      $originalFileName = $defaultName
      $fileName = $null
    
      if ($url -eq $null -or $url -eq '') {
        Write-Debug "Url was null, using default name."
        return $originalFileName
      }
    
      try {
        $uri = [System.Uri]$url
        if ($uri.IsFile()) {
          $fileName = [System.IO.Path]::GetFileName($uri.LocalPath)
          Write-Debug "Url is local file, returning fileName"
    
          return $fileName
        }
      } catch {
        #continue on
      }
    
      if ($url.StartsWith('ftp')) {
        Write-Debug "Url is FTP, using default name."
        return $originalFileName
      }
    
      $request = [System.Net.HttpWebRequest]::Create($url)
      if ($request -eq $null) {
        Write-Debug "Request was null, using default name."
        return $originalFileName
      }
    
      $defaultCreds = [System.Net.CredentialCache]::DefaultCredentials
      if ($defaultCreds -ne $null) {
        $request.Credentials = $defaultCreds
      }
    
      $client = New-Object System.Net.WebClient
      if ($defaultCreds -ne $null) {
        $client.Credentials = $defaultCreds
      }
    
      # check if a proxy is required
      $explicitProxy = $env:chocolateyProxyLocation
      $explicitProxyUser = $env:chocolateyProxyUser
      $explicitProxyPassword = $env:chocolateyProxyPassword
      $explicitProxyBypassList = $env:chocolateyProxyBypassList
      $explicitProxyBypassOnLocal = $env:chocolateyProxyBypassOnLocal
      if ($explicitProxy -ne $null) {
        # explicit proxy
        $proxy = New-Object System.Net.WebProxy($explicitProxy, $true)
        if ($explicitProxyPassword -ne $null) {
          $passwd = ConvertTo-SecureString $explicitProxyPassword -AsPlainText -Force
          $proxy.Credentials = New-Object System.Management.Automation.PSCredential ($explicitProxyUser, $passwd)
        }
    
        if ($explicitProxyBypassList -ne $null -and $explicitProxyBypassList -ne '') {
          $proxy.BypassList =  $explicitProxyBypassList.Split(',', [System.StringSplitOptions]::RemoveEmptyEntries)
        }
        if ($explicitProxyBypassOnLocal -eq 'true') { $proxy.BypassProxyOnLocal = $true; }
    
        Write-Debug "Using explicit proxy server '$explicitProxy'."
        $request.Proxy = $proxy
    
      } elseif ($client.Proxy -and !$client.Proxy.IsBypassed($url)) {
        # system proxy (pass through)
        $creds = [Net.CredentialCache]::DefaultCredentials
        if ($creds -eq $null) {
          Write-Debug "Default credentials were null. Attempting backup method"
          $cred = Get-Credential
          $creds = $cred.GetNetworkCredential();
        }
        $proxyAddress = $client.Proxy.GetProxy($url).Authority
        Write-Debug "Using system proxy server '$proxyaddress'."
        $proxy = New-Object System.Net.WebProxy($proxyAddress)
        $proxy.Credentials = $creds
        $proxy.BypassProxyOnLocal = $true
        $request.Proxy = $proxy
      }
    
      $request.Method = "GET"
      $request.Accept = '*/*'
      $request.AllowAutoRedirect = $true
      $request.MaximumAutomaticRedirections = 20
      #$request.KeepAlive = $true
      $request.AutomaticDecompression = [System.Net.DecompressionMethods]::GZip -bor [System.Net.DecompressionMethods]::Deflate
      $request.Timeout = 30000
      if ($env:chocolateyRequestTimeout -ne $null -and $env:chocolateyRequestTimeout -ne '') {
        $request.Timeout =  $env:chocolateyRequestTimeout
      }
      if ($env:chocolateyResponseTimeout -ne $null -and $env:chocolateyResponseTimeout -ne '') {
        $request.ReadWriteTimeout =  $env:chocolateyResponseTimeout
      }
    
      #http://stackoverflow.com/questions/518181/too-many-automatic-redirections-were-attempted-error-message-when-using-a-httpw
      $request.CookieContainer = New-Object System.Net.CookieContainer
      $request.UserAgent = $userAgent
    
      [System.Text.RegularExpressions.Regex]$containsABadCharacter = New-Object Regex("[" + [System.Text.RegularExpressions.Regex]::Escape([System.IO.Path]::GetInvalidFileNameChars() -join '') + "\=\;]");
    
      try
      {
        [System.Net.HttpWebResponse]$response = $request.GetResponse()
        if ($response -eq $null) {
          Write-Debug "Response was null, using default name."
          return $originalFileName
        }
    
        [string]$header = $response.Headers['Content-Disposition']
        [string]$headerLocation = $response.Headers['Location']
    
        # start with content-disposition header
        if ($header -ne '') {
          $fileHeaderName = 'filename='
          $index = $header.LastIndexOf($fileHeaderName, [StringComparison]::OrdinalIgnoreCase)
          if ($index -gt -1) {
            Write-Debug "Using header 'Content-Disposition' to determine file name."
            $fileName = $header.Substring($index + $fileHeaderName.Length).Replace('"', '')
          }
        }
        if ($containsABadCharacter.IsMatch($fileName)) { $fileName = $null }
    
        # If empty, check location header next
        if ($fileName -eq $null -or  $fileName -eq '') {
          if ($headerLocation -ne '') {
            Write-Debug "Using header 'Location' to determine file name."
            $fileName = [System.IO.Path]::GetFileName($headerLocation)
          }
        }
        if ($containsABadCharacter.IsMatch($fileName)) { $fileName = $null }
    
        # Next comes using the response url value
        if ($fileName -eq $null -or  $fileName -eq '') {
          $responseUrl = $response.ResponseUri.ToString()
          if (!$responseUrl.Contains('?')) {
            Write-Debug "Using response url to determine file name. '$responseUrl'"
            $fileName = [System.IO.Path]::GetFileName($responseUrl)
          }
        }
        if ($containsABadCharacter.IsMatch($fileName)) { $fileName = $null }
    
        # Next comes using the request url value
        if ($fileName -eq $null -or  $fileName -eq '') {
          $requestUrl = $url
          $extension = [System.IO.Path]::GetExtension($requestUrl)
          if (!$requestUrl.Contains('?') -and $extension -ne $null -and $extension -ne '') {
            Write-Debug "Using request url to determine file name. ' $requestUrl'"
            $fileName = [System.IO.Path]::GetFileName($requestUrl)
          }
        }
    
        # when all else fails, default the name
        if ($fileName -eq $null -or  $fileName -eq '' -or $containsABadCharacter.IsMatch($fileName)) {
          Write-Debug "File name is null or illegal. Using $originalFileName instead."
          $fileName = $originalFileName
        }
    
        Write-Debug "File name determined from url is '$fileName'"
    
        return $fileName
      } catch {
        if ($request -ne $null) {
          $request.ServicePoint.MaxIdleTime = 0
          $request.Abort();
          # ruthlessly remove $request to ensure it isn't reused
          Remove-Variable request
          Start-Sleep 1
          [GC]::Collect()
        }
    
        Write-Debug "Url request/response failed - file name will be '$originalFileName':  $($_)"
    
        return $originalFileName
      } finally {
       if ($response -ne $null) {
          $response.Close();
        }
      }
    }
    
    # SIG # Begin signature block
    # MIIcpwYJKoZIhvcNAQcCoIIcmDCCHJQCAQExDzANBglghkgBZQMEAgEFADB5Bgor
    # BgEEAYI3AgEEoGswaTA0Bg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UEDDAK
    # BggrBgEFBQcDAzB5BggrBgEFBQcBAQRtMGswJAYIKwYBBQUHMAGGGGh0dHA6Ly9v
    # Y3NwLmRpZ2ljZXJ0LmNvbTBDBggrBgEFBQcwAoY3aHR0cDovL2NhY2VydHMuZGln
    # aWNlcnQuY29tL0RpZ2lDZXJ0QXNzdXJlZElEUm9vdENBLmNydDCBgQYDVR0fBHow
    # eDA6oDigNoY0aHR0cDovL2NybDQuZGlnaWNlcnQuY29tL0RpZ2lDZXJ0QXNzdXJl
    # ZElEUm9vdENBLmNybDA6oDigNoY0aHR0cDovL2NybDMuZGlnaWNlcnQuY29tL0Rp
    # Z2lDZXJ0QXNzdXJlZElEUm9vdENBLmNybDBPBgNVHSAESDBGMDgGCmCGSAGG/WwA
    # AgQwKjAoBggrBgEFBQcCARYcaHR0cHM6Ly93d3cuZGlnaWNlcnQuY29tL0NQUzAK
    # BghghkgBhv1sAzAdBgNVHQ4EFgQUWsS5eyoKo6XqcQPAYPkt9mV1DlgwHwYDVR0j
    # BBgwFoAUReuir/SSy4IxLVGLp6chnfNtyA8wDQYJKoZIhvcNAQELBQADggEBAD7s
    # DVoks/Mi0RXILHwlKXaoHV0cLToaxO8wYdd+C2D9wz0PxK+L/e8q3yBVN7Dh9tGS
    # dQ9RtG6ljlriXiSBThCk7j9xjmMOE0ut119EefM2FAaK95xGTlz/kLEbBw6RFfu6
    # r7VRwo0kriTGxycqoSkoGjpxKAI8LpGjwCUR4pwUR6F6aGivm6dcIFzZcbEMj7uo
    # +MUSaJ/PQMtARKUT8OZkDCUIQjKyNookAv4vcn4c10lFluhZHen6dGRrsutmQ9qz
    # sIzV6Q3d9gEgzpkxYz0IGhizgZtPxpMQBvwHgfqL2vmCSfdibqFT+hKUGIUukpHq
    # aGxEMrJmoecYpJpkUe8wggU6MIIEIqADAgECAhAGsBFbtfCQ0/DaDmIsYn1YMA0G
    # CSqGSIb3DQEBCwUAMHIxCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaW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2hhMi1hc3N1cmVkLWNzLWcxLmNybDBMBgNVHSAERTBD
    # MDcGCWCGSAGG/WwDATAqMCgGCCsGAQUFBwIBFhxodHRwczovL3d3dy5kaWdpY2Vy
    # dC5jb20vQ1BTMAgGBmeBDAEEATCBhAYIKwYBBQUHAQEEeDB2MCQGCCsGAQUFBzAB
    # hhhodHRwOi8vb2NzcC5kaWdpY2VydC5jb20wTgYIKwYBBQUHMAKGQmh0dHA6Ly9j
    # YWNlcnRzLmRpZ2ljZXJ0LmNvbS9EaWdpQ2VydFNIQTJBc3N1cmVkSURDb2RlU2ln
    # bmluZ0NBLmNydDAMBgNVHRMBAf8EAjAAMA0GCSqGSIb3DQEBCwUAA4IBAQCLBAE/
    # 2x4amEecDEoy9g+WmWMROiB4GnkPqj+IbiwftmwC5/7yL3/592HOFMJr0qOgUt51
    # moE8SuuLuOGw63c5+/48LJS4jP2XzbVNByRPIxPWorm4t/OzTJNziTowHQ+wLwwI
    # 8U97+8DaHCNL7iLZNEiqbVlpF3j7SMWGgf2BVYADJyxluNzf0ZUO+lXN4gOkM8tl
    # VDc7SjZEKvu6ckAaxXf7NPbCXVL/3+LvdmoLbT3vJlfzeXqduO3oieB10ic3ug5T
    # XtoYmyEk/P3yR3x/TqUlg1x/xaolBxy5TyMeSLcBlYn42fnQL154bvMGwFiCsHWQ
    # wY09I0xpEysOMiy8MIIGajCCBVKgAwIBAgIQAwGaAjr/WLFr1tXq5hfwZjANBgkq
    # hkiG9w0BAQUFADBiMQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5j
    # MRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSEwHwYDVQQDExhEaWdpQ2VydCBB
    # c3N1cmVkIElEIENBLTEwHhcNMTQxMDIyMDAwMDAwWhcNMjQxMDIyMDAwMDAwWjBH
    # MQswCQYDVQQGEwJVUzERMA8GA1UEChMIRGlnaUNlcnQxJTAjBgNVBAMTHERpZ2lD
    # ZXJ0IFRpbWVzdGFtcCBSZXNwb25kZXIwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAw
    # ggEKAoIBAQCjZF38fLPggjXg4PbGKuZJdTvMbuBTqZ8fZFnmfGt/a4ydVfiS457V
    # WmNbAklQ2YPOb2bu3cuF6V+l+dSHdIhEOxnJ5fWRn8YUOawk6qhLLJGJzF4o9GS2
    # ULf1ErNzlgpno75hn67z/RJ4dQ6mWxT9RSOOhkRVfRiGBYxVh3lIRvfKDo2n3k5f
    # 4qi2LVkCYYhhchhoubh87ubnNC8xd4EwH7s2AY3vJ+P3mvBMMWSN4+v6GYeofs/s
    # jAw2W3rBerh4x8kGLkYQyI3oBGDbvHN0+k7Y/qpA8bLOcEaD6dpAoVk62RUJV5lW
    # MJPzyWHM0AjMa+xiQpGsAsDvpPCJEY93AgMBAAGjggM1MIIDMTAOBgNVHQ8BAf8E
    # BAMCB4AwDAYDVR0TAQH/BAIwADAWBgNVHSUBAf8EDDAKBggrBgEFBQcDCDCCAb8G
    # A1UdIASCAbYwggGyMIIBoQYJYIZIAYb9bAcBMIIBkjAoBggrBgEFBQcCARYcaHR0
    # cHM6Ly93d3cuZGlnaWNlcnQuY29tL0NQUzCCAWQGCCsGAQUFBwICMIIBVh6CAVIA
    # QQBuAHkAIAB1AHMAZQAgAG8AZgAgAHQAaABpAHMAIABDAGUAcgB0AGkAZgBpAGMA
    # YQB0AGUAIABjAG8AbgBzAHQAaQB0AHUAdABlAHMAIABhAGMAYwBlAHAAdABhAG4A
    # YwBlACAAbwBmACAAdABoAGUAIABEAGkAZwBpAEMAZQByAHQAIABDAFAALwBDAFAA
    # UwAgAGEAbgBkACAAdABoAGUAIABSAGUAbAB5AGkAbgBnACAAUABhAHIAdAB5ACAA
    # QQBnAHIAZQBlAG0AZQBuAHQAIAB3AGgAaQBjAGgAIABsAGkAbQBpAHQAIABsAGkA
    # YQBiAGkAbABpAHQAeQAgAGEAbgBkACAAYQByAGUAIABpAG4AYwBvAHIAcABvAHIA
    # YQB0AGUAZAAgAGgAZQByAGUAaQBuACAAYgB5ACAAcgBlAGYAZQByAGUAbgBjAGUA
    # LjALBglghkgBhv1sAxUwHwYDVR0jBBgwFoAUFQASKxOYspkH7R7for5XDStnAs0w
    # HQYDVR0OBBYEFGFaTSS2STKdSip5GoNL9B6Jwcp9MH0GA1UdHwR2MHQwOKA2oDSG
    # Mmh0dHA6Ly9jcmwzLmRpZ2ljZXJ0LmNvbS9EaWdpQ2VydEFzc3VyZWRJRENBLTEu
    # Y3JsMDigNqA0hjJodHRwOi8vY3JsNC5kaWdpY2VydC5jb20vRGlnaUNlcnRBc3N1
    # cmVkSURDQS0xLmNybDB3BggrBgEFBQcBAQRrMGkwJAYIKwYBBQUHMAGGGGh0dHA6
    # Ly9vY3NwLmRpZ2ljZXJ0LmNvbTBBBggrBgEFBQcwAoY1aHR0cDovL2NhY2VydHMu
    # ZGlnaWNlcnQuY29tL0RpZ2lDZXJ0QXNzdXJlZElEQ0EtMS5jcnQwDQYJKoZIhvcN
    # AQEFBQADggEBAJ0lfhszTbImgVybhs4jIA+Ah+WI//+x1GosMe06FxlxF82pG7xa
    # FjkAneNshORaQPveBgGMN/qbsZ0kfv4gpFetW7easGAm6mlXIV00Lx9xsIOUGQVr
    # NZAQoHuXx/Y/5+IRQaa9YtnwJz04HShvOlIJ8OxwYtNiS7Dgc6aSwNOOMdgv420X
    # Ewbu5AO2FKvzj0OncZ0h3RTKFV2SQdr5D4HRmXQNJsQOfxu19aDxxncGKBXp2JPl
    # VRbwuwqrHNtcSCdmyKOLChzlldquxC5ZoGHd2vNtomHpigtt7BIYvfdVVEADkitr
    # wlHCCkivsNRu4PQUCjob4489yq9qjXvc2EQwggbNMIIFtaADAgECAhAG/fkDlgOt
    # 6gAK6z8nu7obMA0GCSqGSIb3DQEBBQUAMGUxCzAJBgNVBAYTAlVTMRUwEwYDVQQK
    # EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xJDAiBgNV
    # BAM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gBjAGUAIABvAGYA
    # IAB0AGgAZQAgAEQAaQBnAGkAQwBlAHIAdAAgAEMAUAAvAEMAUABTACAAYQBuAGQA
    # IAB0AGgAZQAgAFIAZQBsAHkAaQBuAGcAIABQAGEAcgB0AHkAIABBAGcAcgBlAGUA
    # bQBlAG4AdAAgAHcAaABpAGMAaAAgAGwAaQBtAGkAdAAgAGwAaQBhAGIAaQBsAGkA
    # dAB5ACAAYQBuAGQAIABhAHIAZQAgAGkAbgBjAG8AcgBwAG8AcgBhAHQAZQBkACAA
    # aABlAHIAZQBpAG4AIABiAHkAIAByAGUAZgBlAHIAZQBuAGMAZQAuMAsGCWCGSAGG
    # /WwDFTASBgNVHRMBAf8ECDAGAQH/AgEAMHkGCCsGAQUFBwEBBG0wazAkBggrBgEF
    # BQcwAYYYaHR0cDovL29jc3AuZGlnaWNlcnQuY29tMEMGCCsGAQUFBzAChjdodHRw
    # Oi8vY2FjZXJ0cy5kaWdpY2VydC5jb20vRGlnaUNlcnRBc3N1cmVkSURSb290Q0Eu
    # Y3J0MIGBBgNVHR8EejB4MDqgOKA2hjRodHRwOi8vY3JsMy5kaWdpY2VydC5jb20v
    # RGlnaUNlcnRBc3N1cmVkSURSb290Q0EuY3JsMDqgOKA2hjRodHRwOi8vY3JsNC5k
    # aWdpY2VydC5jb20vRGlnaUNlcnRBc3N1cmVkSURSb290Q0EuY3JsMB0GA1UdDgQW
    # BBQVABIrE5iymQftHt+ivlcNK2cCzTAfBgNVHSMEGDAWgBRF66Kv9JLLgjEtUYun
    # pyGd823IDzANBgkqhkiG9w0BAQUFAAOCAQEARlA+ybcoJKc4HbZbKa9Sz1LpMUer
    # Vlx71Q0LQbPv7HUfdDjyslxhopyVw1Dkgrkj0bo6hnKtOHisdV0XFzRyR4WUVtHr
    # uzaEd8wkpfMEGVWp5+Pnq2LN+4stkMLA0rWUvV5PsQXSDj0aqRRbpoYxYqioM+Sb
    # OafE9c4deHaUJXPkKqvPnHZL7V/CSxbkS3BMAIke/MV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JbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xITAfBgNV
    # BAMTGERpZ2lDZXJ0IEFzc3VyZWQgSUQgQ0EtMQIQAwGaAjr/WLFr1tXq5hfwZjAJ
    # BgUrDgMCGgUAoF0wGAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAcBgkqhkiG9w0B
    # CQUxDxcNMTcwODA3MDAwNDUxWjAjBgkqhkiG9w0BCQQxFgQU46TpD6SRKatcD+Wo
    # cSHyL4BvWkEwDQYJKoZIhvcNAQEBBQAEggEAlNYEtb8zA28dWBwO6pJ2+52QNMKq
    # jCwcXwLK5sUaGOj1EE5+2YFwTJuqQCHvsMpRRLRIBdWm6GxSfLmdpiWS6k5833D/
    # J0t8QvTkSPYTVsqxKvbWa3QFlzxMatSQs3lKvpR5S5Vl5pWD2LNPrIEcsBlId1qs
    # 50c1FBLF6jVdgKZc+VioPZY4Yeo7cm5o6Ga/jiSlM/J753HG7D3ir6dlACtJ3xv+
    # 9R8fHRgzlTXv4Bpfxze4wF7BRpQD7z1grPf7LjTvOvOpTWThf5w0bkvtrqED33do
    # q3+iAxDHuRu9TzdC7/+wVeGwG9eTFBxDee/303RzlIREC/Ue63BdLdv0cw==
    # SIG # End signature block
    
  • tools\chocolateyInstall\helpers\functions\Get-WebHeaders.ps1 Show
    # Copyright © 2017 Chocolatey Software, Inc.
    # Copyright © 2015 - 2017 RealDimensions Software, LLC
    # Copyright © 2011 - 2015 RealDimensions Software, LLC & original authors/contributors from https://github.com/chocolatey/chocolatey
    #
    # Licensed under the Apache License, Version 2.0 (the "License");
    # you may not use this file except in compliance with the License.
    # You may obtain a copy of the License at
    #
    #     http://www.apache.org/licenses/LICENSE-2.0
    #
    # Unless required by applicable law or agreed to in writing, software
    # distributed under the License is distributed on an "AS IS" BASIS,
    # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    # See the License for the specific language governing permissions and
    # limitations under the License.
    
    function Get-WebHeaders {
    <#
    .SYNOPSIS
    Gets the request/response headers for a url.
    
    .DESCRIPTION
    This is a low-level function that is used by Chocolatey to get the
    headers for a request/response to better help when getting and
    validating internet resources.
    
    .NOTES
    Not recommended for use in package scripts.
    
    .INPUTS
    None
    
    .OUTPUTS
    None
    
    .PARAMETER Url
    This is the url to get a request/response from.
    
    .PARAMETER UserAgent
    The user agent to use as part of the request. Defaults to 'chocolatey
    command line'.
    
    .PARAMETER IgnoredArguments
    Allows splatting with arguments that do not apply. Do not use directly.
    
    .LINK
    Get-ChocolateyWebFile
    
    .LINK
    Get-WebFileName
    
    .LINK
    Get-WebFile
    #>
    param(
      [parameter(Mandatory=$false, Position=0)][string] $url = '',
      [parameter(Mandatory=$false, Position=1)][string] $userAgent = 'chocolatey command line',
      [parameter(ValueFromRemainingArguments = $true)][Object[]] $ignoredArguments
    )
    
      Write-FunctionCallLogMessage -Invocation $MyInvocation -Parameters $PSBoundParameters
    
      if ($url -eq '') { return @{} }
    
      $request = [System.Net.HttpWebRequest]::Create($url);
      $defaultCreds = [System.Net.CredentialCache]::DefaultCredentials
      if ($defaultCreds -ne $null) {
        $request.Credentials = $defaultCreds
      }
    
      #$request.Method = "HEAD"
      $client = New-Object System.Net.WebClient
      if ($defaultCreds -ne $null) {
        $client.Credentials = $defaultCreds
      }
    
      # check if a proxy is required
      $explicitProxy = $env:chocolateyProxyLocation
      $explicitProxyUser = $env:chocolateyProxyUser
      $explicitProxyPassword = $env:chocolateyProxyPassword
      $explicitProxyBypassList = $env:chocolateyProxyBypassList
      $explicitProxyBypassOnLocal = $env:chocolateyProxyBypassOnLocal
      if ($explicitProxy -ne $null) {
        # explicit proxy
        $proxy = New-Object System.Net.WebProxy($explicitProxy, $true)
        if ($explicitProxyPassword -ne $null) {
          $passwd = ConvertTo-SecureString $explicitProxyPassword -AsPlainText -Force
          $proxy.Credentials = New-Object System.Management.Automation.PSCredential ($explicitProxyUser, $passwd)
        }
    
        if ($explicitProxyBypassList -ne $null -and $explicitProxyBypassList -ne '') {
          $proxy.BypassList =  $explicitProxyBypassList.Split(',', [System.StringSplitOptions]::RemoveEmptyEntries)
        }
        if ($explicitProxyBypassOnLocal -eq 'true') { $proxy.BypassProxyOnLocal = $true; }
    
        Write-Host "Using explicit proxy server '$explicitProxy'."
        $request.Proxy = $proxy
    
      } elseif ($client.Proxy -and !$client.Proxy.IsBypassed($url)) {
        # system proxy (pass through)
        $creds = [Net.CredentialCache]::DefaultCredentials
        if ($creds -eq $null) {
          Write-Debug "Default credentials were null. Attempting backup method"
          $cred = Get-Credential
          $creds = $cred.GetNetworkCredential();
        }
        $proxyAddress = $client.Proxy.GetProxy($url).Authority
        Write-Host "Using system proxy server '$proxyaddress'."
        $proxy = New-Object System.Net.WebProxy($proxyAddress)
        $proxy.Credentials = $creds
        $proxy.BypassProxyOnLocal = $true
        $request.Proxy = $proxy
      }
    
      $request.Accept = '*/*'
      $request.AllowAutoRedirect = $true
      $request.MaximumAutomaticRedirections = 20
      #$request.KeepAlive = $true
      $request.AutomaticDecompression = [System.Net.DecompressionMethods]::GZip -bor [System.Net.DecompressionMethods]::Deflate
      $request.Timeout = 30000
      if ($env:chocolateyRequestTimeout -ne $null -and $env:chocolateyRequestTimeout -ne '') {
        $request.Timeout =  $env:chocolateyRequestTimeout
      }
      if ($env:chocolateyResponseTimeout -ne $null -and $env:chocolateyResponseTimeout -ne '') {
        $request.ReadWriteTimeout =  $env:chocolateyResponseTimeout
      }
    
      #http://stackoverflow.com/questions/518181/too-many-automatic-redirections-were-attempted-error-message-when-using-a-httpw
      $request.CookieContainer = New-Object System.Net.CookieContainer
      if ($userAgent -ne $null) {
        Write-Debug "Setting the UserAgent to `'$userAgent`'"
        $request.UserAgent = $userAgent
      }
    
      Write-Debug "Request Headers:"
      foreach ($key in $request.Headers) {
        $value = $request.Headers[$key];
        if ($value) {
          Write-Debug "  `'$key`':`'$value`'"
        } else {
          Write-Debug "  `'$key`'"
        }
      }
    
      $headers = @{}
      try {
        $response = $request.GetResponse();
        Write-Debug "Response Headers:"
        foreach ($key in $response.Headers) {
          $value = $response.Headers[$key];
          if ($value) {
            $headers.Add("$key","$value")
            Write-Debug "  `'$key`':`'$value`'"
          }
        }
      } catch {
        if ($request -ne $null) {
          $request.ServicePoint.MaxIdleTime = 0
          $request.Abort();
          # ruthlessly remove $request to ensure it isn't reused
          Remove-Variable request
          Start-Sleep 1
          [GC]::Collect()
        }
    
        throw "The remote file either doesn't exist, is unauthorized, or is forbidden for url '$url'. $($_.Exception.Message)"
      } finally {
       if ($response -ne $null) {
          $response.Close();
        }
      }
    
      $headers
    }
    
    # SIG # Begin signature block
    # MIIcpwYJKoZIhvcNAQcCoIIcmDCCHJQCAQExDzANBglghkgBZQMEAgEFADB5Bgor
    # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
    # KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCBIywVeApHFkthX
    # +TXpq4Asse9ZcA9oI9e/kuBh/2BhoaCCF7EwggUwMIIEGKADAgECAhAECRgbX9W7
    # ZnVTQ7VvlVAIMA0GCSqGSIb3DQEBCwUAMGUxCzAJBgNVBAYTAlVTMRUwEwYDVQQK
    # EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xJDAiBgNV
    # BAMTG0RpZ2lDZXJ0IEFzc3VyZWQgSUQgUm9vdCBDQTAeFw0xMzEwMjIxMjAwMDBa
    # Fw0yODEwMjIxMjAwMDBaMHIxCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2Vy
    # dCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xMTAvBgNVBAMTKERpZ2lD
    # ZXJ0IFNIQTIgQXNzdXJlZCBJRCBDb2RlIFNpZ25pbmcgQ0EwggEiMA0GCSqGSIb3
    # DQEBAQUAA4IBDwAwggEKAoIBAQD407Mcfw4Rr2d3B9MLMUkZz9D7RZmxOttE9X/l
    # qJ3bMtdx6nadBS63j/qSQ8Cl+YnUNxnXtqrwnIal2CWsDnkoOn7p0WfTxvspJ8fT
    # eyOU5JEjlpB3gvmhhCNmElQzUHSxKCa7JGnCwlLyFGeKiUXULaGj6YgsIJWuHEqH
    # CN8M9eJNYBi+qsSyrnAxZjNxPqxwoqvOf+l8y5Kh5TsxHM/q8grkV7tKtel05iv+
    # bMt+dDk2DZDv5LVOpKnqagqrhPOsZ061xPeM0SAlI+sIZD5SlsHyDxL0xY4PwaLo
    # LFH3c7y9hbFig3NBggfkOItqcyDQD2RzPJ6fpjOp/RnfJZPRAgMBAAGjggHNMIIB
    # yTASBgNVHRMBAf8ECDAGAQH/AgEAMA4GA1UdDwEB/wQEAwIBhjATBgNVHSUEDDAK
    # BggrBgEFBQcDAzB5BggrBgEFBQcBAQRtMGswJAYIKwYBBQUHMAGGGGh0dHA6Ly9v
    # Y3NwLmRpZ2ljZXJ0LmNvbTBDBggrBgEFBQcwAoY3aHR0cDovL2NhY2VydHMuZGln
    # aWNlcnQuY29tL0RpZ2lDZXJ0QXNzdXJlZElEUm9vdENBLmNydDCBgQYDVR0fBHow
    # eDA6oDigNoY0aHR0cDovL2NybDQuZGlnaWNlcnQuY29tL0RpZ2lDZXJ0QXNzdXJl
    # ZElEUm9vdENBLmNybDA6oDigNoY0aHR0cDovL2NybDMuZGlnaWNlcnQuY29tL0Rp
    # Z2lDZXJ0QXNzdXJlZElEUm9vdENBLmNybDBPBgNVHSAESDBGMDgGCmCGSAGG/WwA
    # AgQwKjAoBggrBgEFBQcCARYcaHR0cHM6Ly93d3cuZGlnaWNlcnQuY29tL0NQUzAK
    # BghghkgBhv1sAzAdBgNVHQ4EFgQUWsS5eyoKo6XqcQPAYPkt9mV1DlgwHwYDVR0j
    # BBgwFoAUReuir/SSy4IxLVGLp6chnfNtyA8wDQYJKoZIhvcNAQELBQADggEBAD7s
    # DVoks/Mi0RXILHwlKXaoHV0cLToaxO8wYdd+C2D9wz0PxK+L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VIA
    # QQBuAHkAIAB1AHMAZQAgAG8AZgAgAHQAaABpAHMAIABDAGUAcgB0AGkAZgBpAGMA
    # YQB0AGUAIABjAG8AbgBzAHQAaQB0AHUAdABlAHMAIABhAGMAYwBlAHAAdABhAG4A
    # YwBlACAAbwBmACAAdABoAGUAIABEAGkAZwBpAEMAZQByAHQAIABDAFAALwBDAFAA
    # UwAgAGEAbgBkACAAdABoAGUAIABSAGUAbAB5AGkAbgBnACAAUABhAHIAdAB5ACAA
    # QQBnAHIAZQBlAG0AZQBuAHQAIAB3AGgAaQBjAGgAIABsAGkAbQBpAHQAIABsAGkA
    # YQBiAGkAbABpAHQAeQAgAGEAbgBkACAAYQByAGUAIABpAG4AYwBvAHIAcABvAHIA
    # YQB0AGUAZAAgAGgAZQByAGUAaQBuACAAYgB5ACAAcgBlAGYAZQByAGUAbgBjAGUA
    # LjALBglghkgBhv1sAxUwHwYDVR0jBBgwFoAUFQASKxOYspkH7R7for5XDStnAs0w
    # HQYDVR0OBBYEFGFaTSS2STKdSip5GoNL9B6Jwcp9MH0GA1UdHwR2MHQwOKA2oDSG
    # Mmh0dHA6Ly9jcmwzLmRpZ2ljZXJ0LmNvbS9EaWdpQ2VydEFzc3VyZWRJRENBLTEu
    # Y3JsMDigNqA0hjJodHRwOi8vY3JsNC5kaWdpY2VydC5jb20vRGlnaUNlcnRBc3N1
    # cmVkSURDQS0xLmNybDB3BggrBgEFBQcBAQRrMGkwJAYIKwYBBQUHMAGGGGh0dHA6
    # Ly9vY3NwLmRpZ2ljZXJ0LmNvbTBBBggrBgEFBQcwAoY1aHR0cDovL2NhY2VydHMu
    # ZGlnaWNlcnQuY29tL0RpZ2lDZXJ0QXNzdXJlZElEQ0EtMS5jcnQwDQYJKoZIhvcN
    # AQEFBQADggEBAJ0lfhszTbImgVybhs4jIA+Ah+WI//+x1GosMe06FxlxF82pG7xa
    # FjkAneNshORaQPveBgGMN/qbsZ0kfv4gpFetW7easGAm6mlXIV00Lx9xsIOUGQVr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# End signature block
    
  • tools\chocolateyInstall\helpers\functions\Install-BinFile.ps1 Show
    # Copyright © 2017 Chocolatey Software, Inc.
    # Copyright © 2015 - 2017 RealDimensions Software, LLC
    # Copyright © 2011 - 2015 RealDimensions Software, LLC & original authors/contributors from https://github.com/chocolatey/chocolatey
    #
    # Licensed under the Apache License, Version 2.0 (the "License");
    # you may not use this file except in compliance with the License.
    # You may obtain a copy of the License at
    #
    #     http://www.apache.org/licenses/LICENSE-2.0
    #
    # Unless required by applicable law or agreed to in writing, software
    # distributed under the License is distributed on an "AS IS" BASIS,
    # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    # See the License for the specific language governing permissions and
    # limitations under the License.
    
    function Install-BinFile {
    <#
    .SYNOPSIS
    Creates a shim (or batch redirect) for a file that is on the PATH.
    
    .DESCRIPTION
    Chocolatey installs have the folder `$($env:ChocolateyInstall)\bin`
    included in the PATH environment variable. Chocolatey automatically
    shims executables in package folders that are not explicitly ignored,
    putting them into the bin folder (and subsequently onto the PATH).
    
    When you have other files you want to shim to add them to the PATH or
    if you want to handle the shimming explicitly, use this function.
    
    If you do use this function, ensure you also add `Uninstall-BinFile` to
    your `chocolateyUninstall.ps1` script as Chocolatey will not
    automatically clean up shims created with this function.
    
    .NOTES
    Not normally needed for exe files in the package folder, those are
    automatically discovered and added as shims after the install script
    completes.
    
    .INPUTS
    None
    
    .OUTPUTS
    None
    
    .PARAMETER Name
    The name of the redirect file, will have .exe appended to it.
    
    .PARAMETER Path
    The path to the original file. Can be relative from
    `$($env:ChocolateyInstall)\bin` back to your file or a full path to the
    file.
    
    .PARAMETER UseStart
    This should be passed if the shim should not wait on the action to
    complete. This is usually the case with GUI apps, you don't want the
    command shell blocked waiting for the GUI app to be shut back down.
    
    .PARAMETER Command
    OPTIONAL - This is any additional command arguments you want passed
    every time to the command. This is not normally used, but may be
    necessary if you are calling something and then your application. For
    example if you are calling Java with your JAR, the command would be the
    JAR file plus any other options to start Java appropriately.
    
    .PARAMETER IgnoredArguments
    Allows splatting with arguments that do not apply. Do not use directly.
    
    .LINK
    Uninstall-BinFile
    
    .LINK
    Install-ChocolateyShortcut
    
    .LINK
    Install-ChocolateyPath
    #>
    param(
      [parameter(Mandatory=$true, Position=0)][string] $name,
      [parameter(Mandatory=$true, Position=1)][string] $path,
      [parameter(Mandatory=$false)]
      [alias("isGui")][switch] $useStart,
      [parameter(Mandatory=$false)][string] $command = '',
      [parameter(ValueFromRemainingArguments = $true)][Object[]] $ignoredArguments
    )
    
      Write-FunctionCallLogMessage -Invocation $MyInvocation -Parameters $PSBoundParameters
    
      $nugetPath = [System.IO.Path]::GetFullPath((Join-Path "$helpersPath" '..\'))
      $nugetExePath = Join-Path "$nugetPath" 'bin'
      $packageBatchFileName = Join-Path $nugetExePath "$name.bat"
      $packageBashFileName = Join-Path $nugetExePath "$name"
      $packageShimFileName = Join-Path $nugetExePath "$name.exe"
    
      if (Test-Path ($packageBatchFileName)) {Remove-Item $packageBatchFileName -force}
      if (Test-Path ($packageBashFileName)) {Remove-Item $packageBashFileName -force}
      $originalPath = $path
      $path = $path.ToLower().Replace($nugetPath.ToLower(), "..\").Replace("\\","\")
    
      $ShimGenArgs = "-o `"$packageShimFileName`" -p `"$path`" -i `"$originalPath`""
      if ($command -ne $null -and $command -ne '') {
        $ShimGenArgs +=" -c $command"
      }
    
      if ($useStart) {
        $ShimGenArgs +=" -gui"
      }
    
      if ($debug) {
        $ShimGenArgs +=" -debug"
      }
    
      $ShimGen = Join-Path "$helpersPath" '..\tools\shimgen.exe'
      if (!([System.IO.File]::Exists($ShimGen))) {
    	  Update-SessionEnvironment
    	  $ShimGen = Join-Path "$env:ChocolateyInstall" 'tools\shimgen.exe'
      }
    
      $ShimGen = [System.IO.Path]::GetFullPath($ShimGen)
      Write-Debug "ShimGen found at `'$ShimGen`'"
    
      Write-Debug "Calling $ShimGen $ShimGenArgs"
    
      if (Test-Path ("$ShimGen")) {
        #Start-Process "$ShimGen" -ArgumentList "$ShimGenArgs" -Wait -WindowStyle Hidden
        $process = New-Object System.Diagnostics.Process
        $process.StartInfo = new-object System.Diagnostics.ProcessStartInfo($ShimGen, $ShimGenArgs)
        $process.StartInfo.RedirectStandardOutput = $true
        $process.StartInfo.RedirectStandardError = $true
        $process.StartInfo.UseShellExecute = $false
        $process.StartInfo.WindowStyle = [System.Diagnostics.ProcessWindowStyle]::Hidden
    
        $process.Start() | Out-Null
        $process.WaitForExit()
      }
    
      if (Test-Path ($packageShimFileName)) {
        Write-Host "Added $packageShimFileName shim pointed to `'$path`'."
      } else {
        Write-Warning "An error occurred generating shim, using old method."
    
        $path = "%DIR%$($path)"
        $pathBash = $path.Replace("%DIR%..\","`$DIR/../").Replace("\","/")
        Write-Host "Adding $packageBatchFileName and pointing to `'$path`'."
        Write-Host "Adding $packageBashFileName and pointing to `'$path`'."
        if ($useStart) {
          Write-Host "Setting up $name as a non-command line application."
    "@echo off
    SET DIR=%~dp0%
    start """" ""$path"" %*" | Out-File $packageBatchFileName -encoding ASCII
    
          $sw = New-Object IO.StreamWriter "$packageBashFileName"
          $sw.Write("#!/bin/sh`nDIR=`${0%/*}`n""$pathBash"" ""`$@"" &`n")
          $sw.Close()
          $sw.Dispose()
        } else {
    
    "@echo off
    SET DIR=%~dp0%
    cmd /c """"$path"" %*""
    exit /b %ERRORLEVEL%" | Out-File $packageBatchFileName -encoding ASCII
    
          $sw = New-Object IO.StreamWriter "$packageBashFileName"
          $sw.Write("#!/bin/sh`nDIR=`${0%/*}`n""$pathBash"" ""`$@""`nexit `$?`n")
          $sw.Close()
          $sw.Dispose()
    
        }
      }
    }
    
    Set-Alias Generate-BinFile Install-BinFile
    Set-Alias Add-BinFile Install-BinFile
    
    # SIG # Begin signature block
    # MIIcpwYJKoZIhvcNAQcCoIIcmDCCHJQCAQExDzANBglghkgBZQMEAgEFADB5Bgor
    # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
    # KX7zUQIBA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GGGGh0dHA6Ly9v
    # Y3NwLmRpZ2ljZXJ0LmNvbTBDBggrBgEFBQcwAoY3aHR0cDovL2NhY2VydHMuZGln
    # aWNlcnQuY29tL0RpZ2lDZXJ0QXNzdXJlZElEUm9vdENBLmNydDCBgQYDVR0fBHow
    # eDA6oDigNoY0aHR0cDovL2NybDQuZGlnaWNlcnQuY29tL0RpZ2lDZXJ0QXNzdXJl
    # ZElEUm9vdENBLmNybDA6oDigNoY0aHR0cDovL2NybDMuZGlnaWNlcnQuY29tL0Rp
    # Z2lDZXJ0QXNzdXJlZElEUm9vdENBLmNybDBPBgNVHSAESDBGMDgGCmCGSAGG/WwA
    # AgQwKjAoBggrBgEFBQcCARYcaHR0cHM6Ly93d3cuZGlnaWNlcnQuY29tL0NQUzAK
    # BghghkgBhv1sAzAdBgNVHQ4EFgQUWsS5eyoKo6XqcQPAYPkt9mV1DlgwHwYDVR0j
    # BBgwFoAUReuir/SSy4IxLVGLp6chnfNtyA8wDQYJKoZIhvcNAQELBQADggEBAD7s
    # DVoks/Mi0RXILHwlKXaoHV0cLToaxO8wYdd+C2D9wz0PxK+L/e8q3yBVN7Dh9tGS
    # dQ9RtG6ljlriXiSBThCk7j9xjmMOE0ut119EefM2FAaK95xGTlz/kLEbBw6RFfu6
    # r7VRwo0kriTGxycqoSkoGjpxKAI8LpGjwCUR4pwUR6F6aGivm6dcIFzZcbEMj7uo
    # +MUSaJ/PQMtARKUT8OZkDCUIQjKyNookAv4vcn4c10lFluhZHen6dGRrsutmQ9qz
    # sIzV6Q3d9gEgzpkxYz0IGhizgZtPxpMQBvwHgfqL2vmCSfdibqFT+hKUGIUukpHq
    # aGxEMrJmoecYpJpkUe8wggU6MIIEIqADAgECAhAGsBFbtfCQ0/DaDmIsYn1YMA0G
    # CSqGSIb3DQEBCwUAMHIxCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2VydCBJ
    # bmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xMTAv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/WwDATAqMCgGCCsGAQUFBwIBFhxodHRwczovL3d3dy5kaWdpY2Vy
    # dC5jb20vQ1BTMAgGBmeBDAEEATCBhAYIKwYBBQUHAQEEeDB2MCQGCCsGAQUFBzAB
    # hhhodHRwOi8vb2NzcC5kaWdpY2VydC5jb20wTgYIKwYBBQUHMAKGQmh0dHA6Ly9j
    # YWNlcnRzLmRpZ2ljZXJ0LmNvbS9EaWdpQ2VydFNIQTJBc3N1cmVkSURDb2RlU2ln
    # bmluZ0NBLmNydDAMBgNVHRMBAf8EAjAAMA0GCSqGSIb3DQEBCwUAA4IBAQCLBAE/
    # 2x4amEecDEoy9g+WmWMROiB4GnkPqj+IbiwftmwC5/7yL3/592HOFMJr0qOgUt51
    # moE8SuuLuOGw63c5+/48LJS4jP2XzbVNByRPIxPWorm4t/OzTJNziTowHQ+wLwwI
    # 8U97+8DaHCNL7iLZNEiqbVlpF3j7SMWGgf2BVYADJyxluNzf0ZUO+lXN4gOkM8tl
    # VDc7SjZEKvu6ckAaxXf7NPbCXVL/3+LvdmoLbT3vJlfzeXqduO3oieB10ic3ug5T
    # XtoYmyEk/P3yR3x/TqUlg1x/xaolBxy5TyMeSLcBlYn42fnQL154bvMGwFiCsHWQ
    # wY09I0xpEysOMiy8MIIGajCCBVKgAwIBAgIQAwGaAjr/WLFr1tXq5hfwZjANBgkq
    # hkiG9w0BAQUFADBiMQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5j
    # MRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSEwHwYDVQQDExhEaWdpQ2VydCBB
    # c3N1cmVkIElEIENBLTEwHhcNMTQxMDIyMDAwMDAwWhcNMjQxMDIyMDAwMDAwWjBH
    # MQswCQYDVQQGEwJVUzERMA8GA1UEChMIRGlnaUNlcnQxJTAjBgNVBAMTHERpZ2lD
    # ZXJ0IFRpbWVzdGFtcCBSZXNwb25kZXIwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAw
    # ggEKAoIBAQCjZF38fLPggjXg4PbGKuZJdTvMbuBTqZ8fZFnmfGt/a4ydVfiS457V
    # WmNbAklQ2YPOb2bu3cuF6V+l+dSHdIhEOxnJ5fWRn8YUOawk6qhLLJGJzF4o9GS2
    # ULf1ErNzlgpno75hn67z/RJ4dQ6mWxT9RSOOhkRVfRiGBYxVh3lIRvfKDo2n3k5f
    # 4qi2LVkCYYhhchhoubh87ubnNC8xd4EwH7s2AY3vJ+P3mvBMMWSN4+v6GYeofs/s
    # jAw2W3rBerh4x8kGLkYQyI3oBGDbvHN0+k7Y/qpA8bLOcEaD6dpAoVk62RUJV5lW
    # MJPzyWHM0AjMa+xiQpGsAsDvpPCJEY93AgMBAAGjggM1MIIDMTAOBgNVHQ8BAf8E
    # BAMCB4AwDAYDVR0TAQH/BAIwADAWBgNVHSUBAf8EDDAKBggrBgEFBQcDCDCCAb8G
    # A1UdIASCAbYwggGyMIIBoQYJYIZIAYb9bAcBMIIBkjAoBggrBgEFBQcCARYcaHR0
    # cHM6Ly93d3cuZGlnaWNlcnQuY29tL0NQUzCCAWQGCCsGAQUFBwICMIIBVh6CAVIA
    # QQBuAHkAIAB1AHMAZQAgAG8AZgAgAHQAaABpAHMAIABDAGUAcgB0AGkAZgBpAGMA
    # YQB0AGUAIABjAG8AbgBzAHQAaQB0AHUAdABlAHMAIABhAGMAYwBlAHAAdABhAG4A
    # YwBlACAAbwBmACAAdABoAGUAIABEAGkAZwBpAEMAZQByAHQAIABDAFAALwBDAFAA
    # UwAgAGEAbgBkACAAdABoAGUAIABSAGUAbAB5AGkAbgBnACAAUABhAHIAdAB5ACAA
    # QQBnAHIAZQBlAG0AZQBuAHQAIAB3AGgAaQBjAGgAIABsAGkAbQBpAHQAIABsAGkA
    # YQBiAGkAbABpAHQAeQAgAGEAbgBkACAAYQByAGUAIABpAG4AYwBvAHIAcABvAHIA
    # YQB0AGUAZAAgAGgAZQByAGUAaQBuACAAYgB5ACAAcgBlAGYAZQByAGUAbgBjAGUA
    #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AUAAvAEMAUABTACAAYQBuAGQA
    # IAB0AGgAZQAgAFIAZQBsAHkAaQBuAGcAIABQAGEAcgB0AHkAIABBAGcAcgBlAGUA
    # bQBlAG4AdAAgAHcAaABpAGMAaAAgAGwAaQBtAGkAdAAgAGwAaQBhAGIAaQBsAGkA
    # dAB5ACAAYQBuAGQAIABhAHIAZQAgAGkAbgBjAG8AcgBwAG8AcgBhAHQAZQBkACAA
    # aABlAHIAZQBpAG4AIABiAHkAIAByAGUAZgBlAHIAZQBuAGMAZQAuMAsGCWCGSAGG
    # /WwDFTASBgNVHRMBAf8ECDAGAQH/AgEAMHkGCCsGAQUFBwEBBG0wazAkBggrBgEF
    # BQcwAYYYaHR0cDovL29jc3AuZGlnaWNlcnQuY29tMEMGCCsGAQUFBzAChjdodHRw
    # Oi8vY2FjZXJ0cy5kaWdpY2VydC5jb20vRGlnaUNlcnRBc3N1cmVkSURSb290Q0Eu
    # Y3J0MIGBBgNVHR8EejB4MDqgOKA2hjRodHRwOi8vY3JsMy5kaWdpY2VydC5jb20v
    # RGlnaUNlcnRBc3N1cmVkSURSb290Q0EuY3JsMDqgOKA2hjRodHRwOi8vY3JsNC5k
    # aWdpY2VydC5jb20vRGlnaUNlcnRBc3N1cmVkSURSb290Q0EuY3JsMB0GA1UdDgQW
    # BBQVABIrE5iymQftHt+ivlcNK2cCzTAfBgNVHSMEGDAWgBRF66Kv9JLLgjEtUYun
    # pyGd823IDzANBgkqhkiG9w0BAQUFAAOCAQEARlA+ybcoJKc4HbZbKa9Sz1LpMUer
    # Vlx71Q0LQbPv7HUfdDjyslxhopyVw1Dkgrkj0bo6hnKtOHisdV0XFzRyR4WUVtHr
    # uzaEd8wkpfMEGVWp5+Pnq2LN+4stkMLA0rWUvV5PsQXSDj0aqRRbpoYxYqioM+Sb
    # OafE9c4deHaUJXPkKqvPnHZL7V/CSxbkS3BMAIke/MV5vEwSV/5f4R68Al2o/vsH
    # OE8Nxl2RuQ9nRc3Wg+3nkg2NsWmMT/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Fzc3VyZWQgSUQgQ0EtMQIQAwGaAjr/WLFr1tXq5hfwZjAJ
    # BgUrDgMCGgUAoF0wGAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAcBgkqhkiG9w0B
    # CQUxDxcNMTcwODA3MDAwNDUxWjAjBgkqhkiG9w0BCQQxFgQUtCvsm1PouVmFRmyi
    # rmQkTI3qfCIwDQYJKoZIhvcNAQEBBQAEggEABGO/pjfdCnl5AeNS83FlUAV2zMty
    # 1VZWK07TfcPVApI70HvYDpvg4EV7MHwS/bvj5LugnLq+FmxuBzO5Eb2PcT2vwFxj
    # bhc++e9uqT5KetMth+7GwpLCJ/Co6sr7SkqECqjUNdmjXYpIBi+Su4IpBg0ost+R
    # ST5KGM0BzmmBZSZ9ghLRxYFnyM2QOyncBKm8SsgAip9twPMN6HeQxPEfidCsFCwA
    # eXx7YXNGLKpUmyM++02HbfL6bVLjm0fnKYO4d2IwkULnSNTYeqGJLyILh+joAeP2
    # O3TJuMBhkJwGtwbDN1ziVHSRZMZIzZO1mQS1tGmriuLhx9vZRa87s9uk5Q==
    # SIG # End signature block
    
  • tools\chocolateyInstall\helpers\functions\Install-ChocolateyDesktopLink.ps1 Show
  • tools\chocolateyInstall\helpers\functions\Install-ChocolateyEnvironmentVariable.ps1 Show
    # Copyright © 2017 Chocolatey Software, Inc.
    # Copyright © 2015 - 2017 RealDimensions Software, LLC
    # Copyright © 2011 - 2015 RealDimensions Software, LLC & original authors/contributors from https://github.com/chocolatey/chocolatey
    #
    # Licensed under the Apache License, Version 2.0 (the "License");
    # you may not use this file except in compliance with the License.
    # You may obtain a copy of the License at
    #
    #     http://www.apache.org/licenses/LICENSE-2.0
    #
    # Unless required by applicable law or agreed to in writing, software
    # distributed under the License is distributed on an "AS IS" BASIS,
    # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    # See the License for the specific language governing permissions and
    # limitations under the License.
    
    function Install-ChocolateyEnvironmentVariable {
    <#
    .SYNOPSIS
    **NOTE:** Administrative Access Required when `-VariableType 'Machine'.`
    
    Creates a persistent environment variable.
    
    .DESCRIPTION
    Install-ChocolateyEnvironmentVariable creates an environment variable
    with the specified name and value. The variable is persistent and
    will remain after reboots and across multiple PowerShell and command
    line sessions. The variable can be scoped either to the User or to
    the Machine. If Machine level scoping is specified, the command is
    elevated to an administrative session.
    
    .NOTES
    This command will assert UAC/Admin privileges on the machine when
    `-VariableType Machine`.
    
    This will add the environment variable to the current session.
    
    .INPUTS
    None
    
    .OUTPUTS
    None
    
    .PARAMETER VariableName
    The name or key of the environment variable
    
    .PARAMETER VariableValue
    A string value assigned to the above name.
    
    .PARAMETER VariableType
    Specifies whether this variable is to be accesible at either the
    individual user level or at the Machine level.
    
    .PARAMETER IgnoredArguments
    Allows splatting with arguments that do not apply. Do not use directly.
    
    .EXAMPLE
    >
    # Creates a User environment variable "JAVA_HOME" pointing to
    # "d:\oracle\jdk\bin".
    Install-ChocolateyEnvironmentVariable "JAVA_HOME" "d:\oracle\jdk\bin"
    
    .EXAMPLE
    >
    # Creates a User environment variable "_NT_SYMBOL_PATH" pointing to
    # "symsrv*symsrv.dll*f:\localsymbols*http://msdl.microsoft.com/download/symbols".
    # The command will be elevated to admin priviledges.
    Install-ChocolateyEnvironmentVariable `
      -VariableName "_NT_SYMBOL_PATH" `
      -VariableValue "symsrv*symsrv.dll*f:\localsymbols*http://msdl.microsoft.com/download/symbols" `
      -VariableType Machine
    
    .EXAMPLE
    >
    # Remove an environment variable
    Install-ChocolateyEnvironmentVariable -VariableName 'bob' -VariableValue $null
    
    .LINK
    Uninstall-ChocolateyEnvironmentVariable
    
    .LINK
    Get-EnvironmentVariable
    
    .LINK
    Set-EnvironmentVariable
    
    .LINK
    Install-ChocolateyPath
    #>
    param(
      [parameter(Mandatory=$false, Position=0)][string] $variableName,
      [parameter(Mandatory=$false, Position=1)][string] $variableValue,
      [parameter(Mandatory=$false, Position=2)]
      [System.EnvironmentVariableTarget] $variableType = [System.EnvironmentVariableTarget]::User,
      [parameter(ValueFromRemainingArguments = $true)][Object[]] $ignoredArguments
    )
    
      Write-FunctionCallLogMessage -Invocation $MyInvocation -Parameters $PSBoundParameters
    
      if ($variableType -eq [System.EnvironmentVariableTarget]::Machine) {
        if (Test-ProcessAdminRights) {
          Set-EnvironmentVariable -Name $variableName -Value $variableValue -Scope $variableType
        } else {
          $psArgs = "Install-ChocolateyEnvironmentVariable -variableName `'$variableName`' -variableValue `'$variableValue`' -variableType `'$variableType`'"
          Start-ChocolateyProcessAsAdmin "$psArgs"
        }
      } else {
        try {
          Set-EnvironmentVariable -Name $variableName -Value $variableValue -Scope $variableType
        } catch {
          if (Test-ProcessAdminRights) {
            # HKCU:\Environment may not exist, which happens sometimes with Server Core
            Set-EnvironmentVariable -Name $variableName -Value $variableValue -Scope Machine
          } else {
            throw $_.Exception
          }
        }
      }
    
      Set-Content env:\$variableName $variableValue
    }
    
    # SIG # Begin signature block
    # MIIcpwYJKoZIhvcNAQcCoIIcmDCCHJQCAQExDzANBglghkgBZQMEAgEFADB5Bgor
    # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
    # KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCATL+MDH48zSNqQ
    # POXtlcVjPFzaFJ7+F+aQjLRAlSbXP6CCF7EwggUwMIIEGKADAgECAhAECRgbX9W7
    # ZnVTQ7VvlVAIMA0GCSqGSIb3DQEBCwUAMGUxCzAJBgNVBAYTAlVTMRUwEwYDVQQK
    # EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xJDAiBgNV
    # BAMTG0RpZ2lDZXJ0IEFzc3VyZWQgSUQgUm9vdCBDQTAeFw0xMzEwMjIxMjAwMDBa
    # Fw0yODEwMjIxMjAwMDBaMHIxCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2Vy
    # dCBJbmMxGTAXBgNVBAsTEH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/BAIwADAWBgNVHSUBAf8EDDAKBggrBgEFBQcDCDCCAb8G
    # A1UdIASCAbYwggGyMIIBoQYJYIZIAYb9bAcBMIIBkjAoBggrBgEFBQcCARYcaHR0
    # cHM6Ly93d3cuZGlnaWNlcnQuY29tL0NQUzCCAWQGCCsGAQUFBwICMIIBVh6CAVIA
    # QQBuAHkAIAB1AHMAZQAgAG8AZgAgAHQAaABpAHMAIABDAGUAcgB0AGkAZgBpAGMA
    # YQB0AGUAIABjAG8AbgBzAHQAaQB0AHUAdABlAHMAIABhAGMAYwBlAHAAdABhAG4A
    # YwBlACAAbwBmACAAdABoAGUAIABEAGkAZwBpAEMAZQByAHQAIABDAFAALwBDAFAA
    # UwAgAGEAbgBkACAAdABoAGUAIABSAGUAbAB5AGkAbgBnACAAUABhAHIAdAB5ACAA
    # QQBnAHIAZQBlAG0AZQBuAHQAIAB3AGgAaQBjAGgAIABsAGkAbQBpAHQAIABsAGkA
    # YQBiAGkAbABpAHQAeQAgAGEAbgBkACAAYQByAGUAIABpAG4AYwBvAHIAcABvAHIA
    # YQB0AGUAZAAgAGgAZQByAGUAaQBuACAAYgB5ACAAcgBlAGYAZQByAGUAbgBjAGUA
    # LjALBglghkgBhv1sAxUwHwYDVR0jBBgwFoAUFQASKxOYspkH7R7for5XDStnAs0w
    # HQYDVR0OBBYEFGFaTSS2STKdSip5GoNL9B6Jwcp9MH0GA1UdHwR2MHQwOKA2oDSG
    # Mmh0dHA6Ly9jcmwzLmRpZ2ljZXJ0LmNvbS9EaWdpQ2VydEFzc3VyZWRJRENBLTEu
    # Y3JsMDigNqA0hjJodHRwOi8vY3JsNC5kaWdpY2VydC5jb20vRGlnaUNlcnRBc3N1
    # cmVkSURDQS0xLmNybDB3BggrBgEFBQcBAQRrMGkwJAYIKwYBBQUHMAGGGGh0dHA6
    # Ly9vY3NwLmRpZ2ljZXJ0LmNvbTBBBggrBgEFBQcwAoY1aHR0cDovL2NhY2VydHMu
    # ZGlnaWNlcnQuY29tL0R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FE5ShAijVbYNR1KFG75fZs0IzuGjVc
    # FOh/4AdqQDDPxm7LMu6BLIogWZfP2y/a+piZcYfONYi47hzpI/oHUjHoK5Ca4XYZ
    # sKmTU4dFA+TW3ZcKUqByIBkgsRSWuL9FHddNO3qVPtS1goGq+1+PorOEFg==
    # SIG # End signature block
    
  • tools\chocolateyInstall\helpers\functions\Install-ChocolateyExplorerMenuItem.ps1 Show
    # Copyright © 2017 Chocolatey Software, Inc.
    # Copyright © 2015 - 2017 RealDimensions Software, LLC
    # Copyright © 2011 - 2015 RealDimensions Software, LLC & original authors/contributors from https://github.com/chocolatey/chocolatey
    #
    # Licensed under the Apache License, Version 2.0 (the "License");
    # you may not use this file except in compliance with the License.
    # You may obtain a copy of the License at
    #
    #     http://www.apache.org/licenses/LICENSE-2.0
    #
    # Unless required by applicable law or agreed to in writing, software
    # distributed under the License is distributed on an "AS IS" BASIS,
    # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    # See the License for the specific language governing permissions and
    # limitations under the License.
    
    function Install-ChocolateyExplorerMenuItem {
    <#
    .SYNOPSIS
    **NOTE:** Administrative Access Required.
    
    Creates a windows explorer context menu item that can be associated with
    a command
    
    .DESCRIPTION
    Install-ChocolateyExplorerMenuItem can add an entry in the context menu
    of Windows Explorer. The menu item is given a text label and a command.
    The command can be any command accepted on the windows command line. The
    menu item can be applied to either folder items or file items.
    
    Because this command accesses and edits the root class registry node, it
    will be elevated to admin.
    
    .NOTES
    This command will assert UAC/Admin privileges on the machine.
    
    Chocolatey will automatically add the path of the file or folder clicked
    to the command. This is done simply by appending a %1 to the end of the
    command.
    
    .INPUTS
    None
    
    .OUTPUTS
    None
    
    .PARAMETER MenuKey
    A unique string to identify this menu item in the registry
    
    .PARAMETER MenuLabel
    The string that will be displayed in the context menu
    
    .PARAMETER Command
    A command line command that will be invoked when the menu item is
    selected
    
    .PARAMETER Type
    Specifies if the menu item should be applied to a folder or a file
    
    .PARAMETER IgnoredArguments
    Allows splatting with arguments that do not apply. Do not use directly.
    
    .EXAMPLE
    >
    # This will create a context menu item in Windows Explorer when any file
    # is right clicked. The menu item will appear with the text "Open with
    # Sublime Text 2" and will invoke sublime text 2 when selected.
    $sublimeDir = (Get-ChildItem $env:ALLUSERSPROFILE\chocolatey\lib\sublimetext* | select $_.last)
    $sublimeExe = "$sublimeDir\tools\sublime_text.exe"
    Install-ChocolateyExplorerMenuItem "sublime" "Open with Sublime Text 2" $sublimeExe
    
    .EXAMPLE
    >
    # This will create a context menu item in Windows Explorer when any
    # folder is right clicked. The menu item will appear with the text
    # "Open with Sublime Text 2" and will invoke sublime text 2 when selected.
    $sublimeDir = (Get-ChildItem $env:ALLUSERSPROFILE\chocolatey\lib\sublimetext* | select $_.last)
    $sublimeExe = "$sublimeDir\tools\sublime_text.exe"
    Install-ChocolateyExplorerMenuItem "sublime" "Open with Sublime Text 2" $sublimeExe "directory"
    
    .LINK
    Install-ChocolateyShortcut
    #>
    param(
      [parameter(Mandatory=$true, Position=0)][string] $menuKey,
      [parameter(Mandatory=$false, Position=1)][string] $menuLabel,
      [parameter(Mandatory=$false, Position=2)][string] $command,
      [parameter(Mandatory=$false, Position=3)]
      [ValidateSet('file','directory')][string] $type = "file",
      [parameter(ValueFromRemainingArguments = $true)][Object[]] $ignoredArguments
    )
    try {
    
      Write-FunctionCallLogMessage -Invocation $MyInvocation -Parameters $PSBoundParameters
    
      if($type -eq "file") {$key = "*"} elseif($type -eq "directory") {$key="directory"} else{ return 1}
      $elevated = "`
        if( -not (Test-Path -path HKCR:) ) {New-PSDrive -Name HKCR -PSProvider registry -Root Hkey_Classes_Root};`
        if(!(test-path -LiteralPath 'HKCR:\$key\shell\$menuKey')) { new-item -Path 'HKCR:\$key\shell\$menuKey' };`
        Set-ItemProperty -LiteralPath 'HKCR:\$key\shell\$menuKey' -Name '(Default)'  -Value '$menuLabel';`
        if(!(test-path -LiteralPath 'HKCR:\$key\shell\$menuKey\command')) { new-item -Path 'HKCR:\$key\shell\$menuKey\command' };`
        Set-ItemProperty -LiteralPath 'HKCR:\$key\shell\$menuKey\command' -Name '(Default)' -Value '$command \`"%1\`"';`
        return 0;"
    
      Start-ChocolateyProcessAsAdmin $elevated
      Write-Host "'$menuKey' explorer menu item has been created"
    }
    catch {
        $errorMessage = "'$menuKey' explorer menu item was not created - $($_.Exception.Message)"
    	Write-Warning $errorMessage
      }
    }
    
    # SIG # Begin signature block
    # MIIcpwYJKoZIhvcNAQcCoIIcmDCCHJQCAQExDzANBglghkgBZQMEAgEFADB5Bgor
    # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
    # KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCDyBPVXl4mvUEMa
    # qwTlCHHAAYHCknx5Mbo66irH6hVNCKCCF7EwggUwMIIEGKADAgECAhAECRgbX9W7
    # ZnVTQ7VvlVAIMA0GCSqGSIb3DQEBCwUAMGUxCzAJBgNVBAYTAlVTMRUwEwYDVQQK
    # EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xJDAiBgNV
    # BAMTG0RpZ2lDZXJ0IEFzc3VyZWQgSUQgUm9vdCBDQTAeFw0xMzEwMjIxMjAwMDBa
    # Fw0yODEwMjIxMjAwMDBaMHIxCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2Vy
    # dCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xMTAvBgNVBAMTKERpZ2lD
    # ZXJ0IFNIQTIgQXNzdXJlZCBJRCBDb2RlIFNpZ25pbmcgQ0EwggEiMA0GCSqGSIb3
    # DQEBAQUAA4IBDwAwggEKAoIBAQD407Mcfw4Rr2d3B9MLMUkZz9D7RZmxOttE9X/l
    # qJ3bMtdx6nadBS63j/qSQ8Cl+YnUNxnXtqrwnIal2CWsDnkoOn7p0WfTxvspJ8fT
    # eyOU5JEjlpB3gvmhhCNmElQzUHSxKCa7JGnCwlLyFGeKiUXULaGj6YgsIJWuHEqH
    # CN8M9eJNYBi+qsSyrnAxZjNxPqxwoqvOf+l8y5Kh5TsxHM/q8grkV7tKtel05iv+
    # bMt+dDk2DZDv5LVOpKnqagqrhPOsZ061xPeM0SAlI+sIZD5SlsHyDxL0xY4PwaLo
    # LFH3c7y9hbFig3NBggfkOItqcyDQD2RzPJ6fpjOp/RnfJZPRAgMBAAGjggHNMIIB
    # yTASBgNVHRMBAf8ECDAGAQH/AgEAMA4GA1UdDwEB/wQEAwIBhjATBgNVHSUEDDAK
    # BggrBgEFBQcDAzB5BggrBgEFBQcBAQRtMGswJAYIKwYBBQUHMAGGGGh0dHA6Ly9v
    # Y3NwLmRpZ2ljZXJ0LmNvbTBDBggrBgEFBQcwAoY3aHR0cDovL2NhY2VydHMuZGln
    # aWNlcnQuY29tL0RpZ2lDZXJ0QXNzdXJlZElEUm9vdENBLmNydDCBgQYDVR0fBHow
    # eDA6oDigNoY0aHR0cDovL2NybDQuZGlnaWNlcnQuY29tL0RpZ2lDZXJ0QXNzdXJl
    # ZElEUm9vdENBLmNybDA6oDigNoY0aHR0cDovL2NybDMuZGlnaWNlcnQuY29tL0Rp
    # Z2lDZXJ0QXNzdXJlZElEUm9vdENBLmNybDBPBgNVHSAESDBGMDgGCmCGSAGG/WwA
    # AgQwKjAoBggrBgEFBQcCARYcaHR0cHM6Ly93d3cuZGlnaWNlcnQuY29tL0NQUzAK
    # BghghkgBhv1sAzAdBgNVHQ4EFgQUWsS5eyoKo6XqcQPAYPkt9mV1DlgwHwYDVR0j
    # BBgwFoAUReuir/SSy4IxLVGLp6chnfNtyA8wDQYJKoZIhvcNAQELBQADggEBAD7s
    # DVoks/Mi0RXILHwlKXaoHV0cLToaxO8wYdd+C2D9wz0PxK+L/e8q3yBVN7Dh9tGS
    # dQ9RtG6ljlriXiSBThCk7j9xjmMOE0ut119EefM2FAaK95xGTlz/kLEbBw6RFfu6
    # r7VRwo0kriTG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AaQB0AHUAdABlAHMAIABhAGMAYwBlAHAAdABhAG4A
    # YwBlACAAbwBmACAAdABoAGUAIABEAGkAZwBpAEMAZQByAHQAIABDAFAALwBDAFAA
    # UwAgAGEAbgBkACAAdABoAGUAIABSAGUAbAB5AGkAbgBnACAAUABhAHIAdAB5ACAA
    # QQBnAHIAZQBlAG0AZQBuAHQAIAB3AGgAaQBjAGgAIABsAGkAbQBpAHQAIABsAGkA
    # YQBiAGkAbABpAHQAeQAgAGEAbgBkACAAYQByAGUAIABpAG4AYwBvAHIAcABvAHIA
    # YQB0AGUAZAAgAGgAZQByAGUAaQBuACAAYgB5ACAAcgBlAGYAZQByAGUAbgBjAGUA
    # LjALBglghkgBhv1sAxUwHwYDVR0jBBgwFoAUFQASKxOYspkH7R7for5XDStnAs0w
    # HQYDVR0OBBYEFGFaTSS2STKdSip5GoNL9B6Jwcp9MH0GA1UdHwR2MHQwOKA2oDSG
    # Mmh0dHA6Ly9jcmwzLmRpZ2ljZXJ0LmNvbS9EaWdpQ2VydEFzc3VyZWRJRENBLTEu
    # Y3JsMDigNqA0hjJodHRwOi8vY3JsNC5kaWdpY2VydC5jb20vRGlnaUNlcnRBc3N1
    # cmVkSURDQS0xLmNybDB3BggrBgEFBQcBAQRrMGkwJAYIKwYBBQUHMAGGGGh0dHA6
    # Ly9vY3NwLmRpZ2ljZXJ0LmNvbTBBBggrBgEFBQcwAoY1aHR0cDovL2NhY2VydHMu
    # ZGlnaWNlcnQuY29tL0RpZ2lDZXJ0QXNzdXJlZElEQ0EtMS5jcnQwDQYJKoZIhvcN
    # AQEFBQADggEBAJ0lfhszTbImgVybhs4jIA+Ah+WI//+x1GosMe06FxlxF82pG7xa
    # FjkAneNshORaQPveBgGMN/qbsZ0kfv4gpFetW7easGAm6mlXIV00Lx9xsIOUGQVr
    # NZAQoHuXx/Y/5+IRQaa9YtnwJz04HShvOlIJ8OxwYtNiS7Dgc6aSwNOOMdgv420X
    # Ewbu5AO2FKvzj0OncZ0h3RT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m7tXESDfzAvTc
    # 0fsZbedn3zpObZzr9O6Z1kXp9hOO9+mli/3h6GXyR1Jgz03UuOCTekmKQPYMPeQw
    # MSHvgG504upPjXXs5zElc2mT2Np26c2gohecukBlgQ0AQLs91asR+wUVME2u/W+a
    # oMNM5qtinO2KhVi4Hf5r2STZxJns/hZgmLW4DbOfhfNVfvuHvaIEVaGCAg8wggIL
    # BgkqhkiG9w0BCQYxggH8MIIB+AIBATB2MGIxCzAJBgNVBAYTAlVTMRUwEwYDVQQK
    # EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xITAfBgNV
    # BAMTGERpZ2lDZXJ0IEFzc3VyZWQgSUQgQ0EtMQIQAwGaAjr/WLFr1tXq5hfwZjAJ
    # BgUrDgMCGgUAoF0wGAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAcBgkqhkiG9w0B
    # CQUxDxcNMTcwODA3MDAwNDUyWjAjBgkqhkiG9w0BCQQxFgQUpxQz8JZZD49MWlrk
    # 5V15T2OZIpswDQYJKoZIhvcNAQEBBQAEggEAbIhE8/eFPHWCfFLdq9XIQWRiMti/
    # qs3vcCZWdsEvDJhSjYl6qotW3SIwJaGIxIcM/Zjc2QqpKzg8XUhjDOYzAbvssEYw
    # q3PACqDIDY/Qinx1Ctp4CaYaFvCNYZca4f9Jyd9kRyT0V6125esYinSdP6vF6wI0
    # Bh1uKHdJQ7T8flzepxSpJWWZzUG1G38obRJIxKp764jHUmniqlUnPQAPsr7oVZ+/
    # Aq8kG6Z0FTl34a+OZQgORf7XphXqOfk/dBRpyV3uVyhcbNP5KGpYhT7yeBQNWV1q
    # eMbYcu3AfA8/d3+wAUSdZTAC+KgXvUlv23TQE/s+raesaJBMTXisW7Gdsg==
    # SIG # End signature block
    
  • tools\chocolateyInstall\helpers\functions\Install-ChocolateyFileAssociation.ps1 Show
    # Copyright © 2017 Chocolatey Software, Inc.
    # Copyright © 2015 - 2017 RealDimensions Software, LLC
    # Copyright © 2011 - 2015 RealDimensions Software, LLC & original authors/contributors from https://github.com/chocolatey/chocolatey
    #
    # Licensed under the Apache License, Version 2.0 (the "License");
    # you may not use this file except in compliance with the License.
    # You may obtain a copy of the License at
    #
    #     http://www.apache.org/licenses/LICENSE-2.0
    #
    # Unless required by applicable law or agreed to in writing, software
    # distributed under the License is distributed on an "AS IS" BASIS,
    # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    # See the License for the specific language governing permissions and
    # limitations under the License.
    
    function Install-ChocolateyFileAssociation {
    <#
    .SYNOPSIS
    **NOTE:** Administrative Access Required.
    
    Creates an association between a file extension and a executable.
    
    .DESCRIPTION
    Install-ChocolateyFileAssociation can associate a file extension
    with a downloaded application. Once this command has created an
    association, all invocations of files with the specified extension
    will be opened via the executable specified.
    
    .NOTES
    This command will assert UAC/Admin privileges on the machine.
    
    .INPUTS
    None
    
    .OUTPUTS
    None
    
    .PARAMETER Extension
    The file extension to be associated.
    
    .PARAMETER Executable
    The path to the application's executable to be associated.
    
    .PARAMETER IgnoredArguments
    Allows splatting with arguments that do not apply. Do not use directly.
    
    .EXAMPLE
    >
    # This will create an association between Sublime Text 2 and all .txt
    # files. Any .txt file opened will by default open with Sublime Text 2.
    $sublimeDir = (Get-ChildItem $env:ALLUSERSPROFILE\chocolatey\lib\sublimetext* | select $_.last)
    $sublimeExe = "$sublimeDir\tools\sublime_text.exe"
    Install-ChocolateyFileAssociation ".txt" $sublimeExe
    
    #>
    param(
      [parameter(Mandatory=$true, Position=0)][string] $extension,
      [parameter(Mandatory=$true, Position=1)][string] $executable,
      [parameter(ValueFromRemainingArguments = $true)][Object[]] $ignoredArguments
    )
    
      Write-FunctionCallLogMessage -Invocation $MyInvocation -Parameters $PSBoundParameters
    
      if(-not(Test-Path $executable)){
        $errorMessage = "`'$executable`' does not exist, not able to create association"
        Write-Error $errorMessage
        throw $errorMessage
      }
      $extension=$extension.trim()
      if(-not($extension.StartsWith("."))) {
          $extension = ".$extension"
      }
      $fileType = Split-Path $executable -leaf
      $fileType = $fileType.Replace(" ","_")
      $elevated = @"
        cmd /c "assoc $extension=$fileType"
        cmd /c 'ftype $fileType="$executable" "%1" "%*"'
        New-PSDrive -Name HKCR -PSProvider Registry -Root HKEY_CLASSES_ROOT
        Set-ItemProperty -Path "HKCR:\$fileType" -Name "(Default)" -Value "$fileType file" -ErrorAction Stop
    "@
      Start-ChocolateyProcessAsAdmin $elevated
      Write-Host "`'$extension`' has been associated with `'$executable`'"
    }
    
    # SIG # Begin signature block
    # MIIcpwYJKoZIhvcNAQcCoIIcmDCCHJQCAQExDzANBglghkgBZQMEAgEFADB5Bgor
    # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
    # KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCBMFUMmraU6ySfh
    # 6W5qI0xsEwmQ3c26sJrIRfT0i8Mp3aCCF7EwggUwMIIEGKADAgECAhAECRgbX9W7
    # ZnVTQ7VvlVAIMA0GCSqGSIb3DQEBCwUAMGUxCzAJBgNVBAYTAlVTMRUwEwYDVQQK
    # EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xJDAiBgNV
    # BAMTG0RpZ2lDZXJ0IEFzc3VyZWQgSUQgUm9vdCBDQTAeFw0xMzEwMjIxMjAwMDBa
    # Fw0yODEwMjIxMjAwMDBaMHIxCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2Vy
    # dCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xMTAvBgNVBAMTKERpZ2lD
    # ZXJ0IFNIQTIgQXNzdXJlZCBJRCBDb2RlIFNpZ25pbmcgQ0EwggEiMA0GCSqGSIb3
    # DQEBAQUAA4IBDwAwggEKAoIBAQD407Mcfw4Rr2d3B9MLMUkZz9D7RZmxOttE9X/l
    # qJ3bMtdx6nadBS63j/qSQ8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gAgAHQAaABpAHMAIABDAGUAcgB0AGkAZgBpAGMA
    # YQB0AGUAIABjAG8AbgBzAHQAaQB0AHUAdABlAHMAIABhAGMAYwBlAHAAdABhAG4A
    # YwBlACAAbwBmACAAdABoAGUAIABEAGkAZwBpAEMAZQByAHQAIABDAFAALwBDAFAA
    # UwAgAGEAbgBkACAAdABoAGUAIABSAGUAbAB5AGkAbgBnACAAUABhAHIAdAB5ACAA
    # QQBnAHIAZQBlAG0AZQBuAHQAIAB3AGgAaQBjAGgAIABsAGkAbQBpAHQAIABsAGkA
    # YQBiAGkAbABpAHQAeQAgAGEAbgBkACAAYQByAGUAIABpAG4AYwBvAHIAcABvAHIA
    # YQB0AGUAZAAgAGgAZQByAGUAaQBuACAAYgB5ACAAcgBlAGYAZQByAGUAbgBjAGUA
    # LjALBglghkgBhv1sAxUwHwYDVR0jBBgwFoAUFQASKxOYspkH7R7for5XDStnAs0w
    # HQYDVR0OBBYEFGFaTSS2STKdSip5GoNL9B6Jwcp9MH0GA1UdHwR2MHQwOKA2oDSG
    # Mmh0dHA6Ly9jcmwzLmRpZ2ljZXJ0LmNvbS9EaWdpQ2VydEFzc3VyZWRJRENBLTEu
    # Y3JsMDigNqA0hjJodHRwOi8vY3JsNC5kaWdpY2VydC5jb20vRGlnaUNlcnRBc3N1
    # cmVkSURDQS0xLmNybDB3BggrBgEFBQcBAQRrMGkwJAYIKwYBBQUHMAGGGGh0dHA6
    # Ly9vY3NwLmRpZ2ljZXJ0LmNvbTBBBggrBgEFBQcwAoY1aHR0cDovL2NhY2VydHMu
    # ZGlnaWNlcnQuY29tL0RpZ2lDZXJ0QXNzdXJlZElEQ0EtMS5jcnQwDQYJKoZIhvcN
    # AQEFBQADggEBAJ0lfhszTbImgVybhs4jIA+Ah+WI//+x1GosMe06FxlxF82pG7xa
    # FjkAneNshORaQPveBgGMN/qbsZ0kfv4gpFetW7easGAm6mlXIV00Lx9xsIOUGQVr
    # NZAQoHuXx/Y/5+IRQaa9YtnwJz04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Wo3O8+Nqmr1zr4h0/
    # FaI6PL1HikRzynRbJ7zPPm/EOfYjQZCLtsOETX1LMtYqbaODLwrdAjiLERIZ+79K
    # vgEaqFEexmzK/CctHl1rfxE9AHsCC6ry9c2V17VT3OY+XL4u1RP1RUKq1ifjV1iX
    # 44/heOCdWllOu6WBjiILGccvkS8k2casT6AaItOmC4cIs/PXLtQ4a9LV8TEVdOd2
    # 5paIePT0QoZ3NmClHr4Nwuc22QWCP+l+k9qdleeXo/SH1OSZ5JLS/qGCAg8wggIL
    # BgkqhkiG9w0BCQYxggH8MIIB+AIBATB2MGIxCzAJBgNVBAYTAlVTMRUwEwYDVQQK
    # EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xITAfBgNV
    # BAMTGERpZ2lDZXJ0IEFzc3VyZWQgSUQgQ0EtMQIQAwGaAjr/WLFr1tXq5hfwZjAJ
    # BgUrDgMCGgUAoF0wGAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAcBgkqhkiG9w0B
    # CQUxDxcNMTcwODA3MDAwNDUyWjAjBgkqhkiG9w0BCQQxFgQUDKlIrJI738kh7cea
    # qRmjOb4An/4wDQYJKoZIhvcNAQEBBQAEggEALoAfFdtxokGkgzm1XFhj4qWnDBQv
    # 9MLPFWzGzv28l0UGm85bEagblQ5oNnkutm/eMDbCumuVMN816bCFN7/SBJ3K8b+h
    # wJmStJj/rIptkTihppaPSwt6BnY8yXirnAf90ZfQgrceYOjaNJPrY6wI/DPUOd8S
    # 4d300D8FNVk6pmqoiDlC3IQ8wFFrfKwa043Y214kU0cz05l8WWE+ITmGuihQwFE4
    # 5+iwUk0u8a/liI6ZcfOZRqthLDYxw1z8JGE3hak4vz4rJlUeQalDI/zAJ5h6X36p
    # QQofWC8GM9Eeyp0+6ydeBv2i36kmqQsDapIhFNtftWZ+C+GwOD+v/5Wwaw==
    # SIG # End signature block
    
  • tools\chocolateyInstall\helpers\functions\Install-ChocolateyInstallPackage.ps1 Show
    # Copyright © 2017 Chocolatey Software, Inc.
    # Copyright © 2015 - 2017 RealDimensions Software, LLC
    # Copyright © 2011 - 2015 RealDimensions Software, LLC & original authors/contributors from https://github.com/chocolatey/chocolatey
    #
    # Licensed under the Apache License, Version 2.0 (the "License");
    # you may not use this file except in compliance with the License.
    # You may obtain a copy of the License at
    #
    #     http://www.apache.org/licenses/LICENSE-2.0
    #
    # Unless required by applicable law or agreed to in writing, software
    # distributed under the License is distributed on an "AS IS" BASIS,
    # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    # See the License for the specific language governing permissions and
    # limitations under the License.
    
    function Install-ChocolateyInstallPackage {
    <#
    .SYNOPSIS
    **NOTE:** Administrative Access Required.
    
    Installs software into "Programs and Features". Use
    Install-ChocolateyPackage when software must be downloaded first.
    
    .DESCRIPTION
    This will run an installer (local file) on your machine.
    
    .NOTES
    This command will assert UAC/Admin privileges on the machine.
    
    If you are embedding files into a package, ensure that you have the
    rights to redistribute those files if you are sharing this package
    publicly (like on the community feed). Otherwise, please use
    Install-ChocolateyPackage to download those resources from their
    official distribution points.
    
    This is a native installer wrapper function. A "true" package will
    contain all the run time files and not an installer. That could come
    pre-zipped and require unzipping in a PowerShell script. Chocolatey
    works best when the packages contain the software it is managing. Most
    software in the Windows world comes as installers and Chocolatey
    understands how to work with that, hence this wrapper function.
    
    .INPUTS
    None
    
    .OUTPUTS
    None
    
    .PARAMETER PackageName
    The name of the package - while this is an arbitrary value, it's
    recommended that it matches the package id.
    
    .PARAMETER FileType
    This is the extension of the file. This can be 'exe', 'msi', or 'msu'.
    Licensed editions of Chocolatey use this to automatically determine
    silent arguments. If this is not provided, Chocolatey will
    automatically determine this using the downloaded file's extension.
    
    .PARAMETER SilentArgs
    OPTIONAL - These are the parameters to pass to the native installer,
    including any arguments to make the installer silent/unattended.
    Pro/Business Editions of Chocolatey will automatically determine the
    installer type and merge the arguments with what is provided here.
    
    Try any of the to get the silent installer -
    `/s /S /q /Q /quiet /silent /SILENT /VERYSILENT`. With msi it is always
    `/quiet`. Please pass it in still but it will be overridden by
    Chocolatey to `/quiet`. If you don't pass anything it could invoke the
    installer with out any arguments. That means a nonsilent installer.
    
    Please include the `notSilent` tag in your Chocolatey package if you
    are not setting up a silent/unattended package. Please note that if you
    are submitting to the community repository, it is nearly a requirement
    for the package to be completely unattended.
    
    .PARAMETER File
    Full file path to native installer to run. If embedding in the package,
    you can get it to the path with
    `"$(Split-Path -parent $MyInvocation.MyCommand.Definition)\\INSTALLER_FILE"`
    
    In 0.10.1+, `FileFullPath` is an alias for File.
    
    This can be a 32-bit or 64-bit file. This is mandatory in earlier versions
    of Chocolatey, but optional if File64 has been provided.
    
    .PARAMETER File64
    Full file path to a 64-bit native installer to run. Available in 0.10.4+.
    If embedding in the package, you can get it to the path with
    `"$(Split-Path -parent $MyInvocation.MyCommand.Definition)\\INSTALLER_FILE"`
    
    Provide this when you want to provide both 32-bit and 64-bit
    installers or explicitly only a 64-bit installer (which will cause a package 
    install failure on 32-bit systems).
    
    .PARAMETER ValidExitCodes
    Array of exit codes indicating success. Defaults to `@(0)`.
    
    .PARAMETER UseOnlyPackageSilentArguments
    Do not allow choco to provide/merge additional silent arguments and
    only use the ones available with the package. Available in 0.9.10+.
    
    .PARAMETER IgnoredArguments
    Allows splatting with arguments that do not apply. Do not use directly.
    
    .EXAMPLE
    >
    $packageName= 'bob'
    $toolsDir   = "$(Split-Path -Parent $MyInvocation.MyCommand.Definition)"
    $fileLocation = Join-Path $toolsDir 'INSTALLER_EMBEDDED_IN_PACKAGE'
    
    $packageArgs = @{
      packageName   = $packageName
      fileType      = 'msi'
      file          = $fileLocation
      silentArgs    = "/qn /norestart"
      validExitCodes= @(0, 3010, 1641)
      softwareName  = 'Bob*'
    }
    
    Install-ChocolateyInstallPackage @packageArgs
    
    .EXAMPLE
    >
    $packageArgs = @{
      packageName   = 'bob'
      fileType      = 'exe'
      file          = '\\SHARE_LOCATION\to\INSTALLER_FILE'
      silentArgs    = "/S"
      validExitCodes= @(0)
      softwareName  = 'Bob*'
    }
    
    Install-ChocolateyInstallPackage @packageArgs
    
    .EXAMPLE
    Install-ChocolateyInstallPackage 'bob' 'exe' '/S' "$(Split-Path -Parent $MyInvocation.MyCommand.Definition)\bob.exe"
    
    .EXAMPLE
    >
    Install-ChocolateyInstallPackage -PackageName 'bob' -FileType 'exe' `
      -SilentArgs '/S' `
      -File "$(Split-Path -Parent $MyInvocation.MyCommand.Definition)\bob.exe" `
      -ValidExitCodes = @(0)
    
    .LINK
    Install-ChocolateyPackage
    
    .LINK
    Uninstall-ChocolateyPackage
    
    .LINK
    Get-UninstallRegistryKey
    
    .LINK
    Start-ChocolateyProcessAsAdmin
    #>
    param(
      [parameter(Mandatory=$true, Position=0)][string] $packageName,
      [parameter(Mandatory=$false, Position=1)]
      [alias("installerType","installType")][string] $fileType = 'exe',
      [parameter(Mandatory=$false, Position=2)][string[]] $silentArgs = '',
      [alias("fileFullPath")][parameter(Mandatory=$false, Position=3)][string] $file,
      [alias("fileFullPath64")][parameter(Mandatory=$false)][string] $file64,
      [parameter(Mandatory=$false)] $validExitCodes = @(0),
      [parameter(Mandatory=$false)]
      [alias("useOnlyPackageSilentArgs")][switch] $useOnlyPackageSilentArguments = $false,
      [parameter(ValueFromRemainingArguments = $true)][Object[]] $ignoredArguments
    )
      [string]$silentArgs = $silentArgs -join ' '
    
      Write-FunctionCallLogMessage -Invocation $MyInvocation -Parameters $PSBoundParameters
    
      $bitnessMessage = ''
      $fileFullPath = $file
      if ((Get-ProcessorBits 32) -or $env:ChocolateyForceX86 -eq 'true') {
        if (!$file) { throw "32-bit installation is not supported for $packageName"; }
        if ($file64) { $bitnessMessage = '32-bit '; }
      } elseif ($file64) {
        $fileFullPath = $file64
        $bitnessMessage = '64-bit '
      }
      
      if ($fileFullPath -eq '' -or $fileFullPath -eq $null) {
        throw 'Package parameters incorrect, either File or File64 must be specified.'
      }
      
      Write-Host "Installing $bitnessMessage$packageName..."
      
      if ($fileType -eq '' -or $fileType -eq $null) {
        Write-Debug 'No FileType supplied. Using the file extension to determine FileType'
        $fileType = [System.IO.Path]::GetExtension("$fileFullPath").Replace(".", "")
      }
    
      $installerTypeLower = $fileType.ToLower()
      if ($installerTypeLower -ne 'msi' -and $installerTypeLower -ne 'exe' -and $installerTypeLower -ne 'msu') {
        Write-Warning "FileType '$fileType' is unrecognized, using 'exe' instead."
        $fileType = 'exe'
      }
    
      $env:ChocolateyInstallerType = $fileType
    
      $additionalInstallArgs = $env:chocolateyInstallArguments;
      if ($additionalInstallArgs -eq $null) {
        $additionalInstallArgs = '';
      } else {
        if ($additionalInstallArgs -match 'INSTALLDIR' -or `
          $additionalInstallArgs -match 'TARGETDIR' -or `
          $additionalInstallArgs -match 'dir\=' -or `
          $additionalInstallArgs -match '\/D\='
        ) {
    @"
    Pro / Business supports a single, ubiquitous install directory option.
     Stop the hassle of determining how to pass install directory overrides
     to install arguments for each package / installer type.
     Check out Pro / Business - https://chocolatey.org/compare"
    "@ | Write-Warning
        }
      }
      $overrideArguments = $env:chocolateyInstallOverride;
    
      # remove \chocolatey\chocolatey\
      # might be a slight issue here if the download path is the older
      $silentArgs = $silentArgs -replace '\\chocolatey\\chocolatey\\', '\chocolatey\'
      $additionalInstallArgs = $additionalInstallArgs -replace '\\chocolatey\\chocolatey\\', '\chocolatey\'
      $updatedFilePath = $fileFullPath -replace '\\chocolatey\\chocolatey\\', '\chocolatey\'
      if ([System.IO.File]::Exists($updatedFilePath)) {
        $fileFullPath = $updatedFilePath
      }
    
      $ignoreFile = $fileFullPath + '.ignore'
      if ($env:ChocolateyInstall -and $ignoreFile -match [System.Text.RegularExpressions.Regex]::Escape($env:ChocolateyInstall)) {
        try {
          '' | out-file $ignoreFile
        } catch {
          Write-Warning "Unable to generate `'$ignoreFile`'"
        }
      }
    
      $workingDirectory = Get-Location
      try {
        $workingDirectory = [System.IO.Path]::GetDirectoryName($fileFullPath)
      } catch {
        Write-Warning "Unable to set the working directory for installer to location of '$fileFullPath'"
      }
    
      try {
        # make sure any logging folder exists
        $pattern = "(?:['`"])([a-zA-Z]\:\\[^'`"]+)(?:[`"'])|([a-zA-Z]\:\\[\S]+)"
        $silentArgs, $additionalInstallArgs | %{ Select-String $pattern -input $_ -AllMatches } |
          % { $_.Matches } | % {
            $argDirectory = $_.Groups[1]
            if ($argDirectory -eq $null -or $argDirectory -eq '') { continue }
            $argDirectory = [System.IO.Path]::GetFullPath([System.IO.Path]::GetDirectoryName($argDirectory))
            Write-Debug "Ensuring '$argDirectory' exists"
            if (![System.IO.Directory]::Exists($argDirectory)) { [System.IO.Directory]::CreateDirectory($argDirectory) | Out-Null }
          }
      } catch {
        Write-Debug "Error ensuring directories exist -  $($_.Exception.Message)"
      }
    
      if ($fileType -like 'msi') {
        $msiArgs = "/i `"$fileFullPath`""
        if ($overrideArguments) {
          Write-Host "Overriding package arguments with '$additionalInstallArgs' (replacing '$silentArgs')";
          $msiArgs = "$msiArgs $additionalInstallArgs";
        } else {
          $msiArgs = "$msiArgs $silentArgs $additionalInstallArgs";
        }
    
        $env:ChocolateyExitCode = Start-ChocolateyProcessAsAdmin "$msiArgs" "$($env:SystemRoot)\System32\msiexec.exe" -validExitCodes $validExitCodes -workingDirectory $workingDirectory
      }
    
      if ($fileType -like 'exe') {
        if ($overrideArguments) {
          Write-Host "Overriding package arguments with '$additionalInstallArgs' (replacing '$silentArgs')";
          $env:ChocolateyExitCode = Start-ChocolateyProcessAsAdmin "$additionalInstallArgs" $fileFullPath -validExitCodes $validExitCodes -workingDirectory $workingDirectory
        } else {
          $env:ChocolateyExitCode = Start-ChocolateyProcessAsAdmin "$silentArgs $additionalInstallArgs" $fileFullPath -validExitCodes $validExitCodes -workingDirectory $workingDirectory
        }
      }
    
      if($fileType -like 'msu') {
        if ($overrideArguments) {
          Write-Host "Overriding package arguments with '$additionalInstallArgs' (replacing '$silentArgs')";
          $msuArgs = "`"$fileFullPath`" $additionalInstallArgs"
        } else {
          $msuArgs = "`"$fileFullPath`" $silentArgs $additionalInstallArgs"
        }
        $env:ChocolateyExitCode = Start-ChocolateyProcessAsAdmin "$msuArgs" "$($env:SystemRoot)\System32\wusa.exe" -validExitCodes $validExitCodes -workingDirectory $workingDirectory
      }
    
      Write-Host "$packageName has been installed."
    }
    
    # SIG # Begin signature block
    # MIIcpwYJKoZIhvcNAQcCoIIcmDCCHJQCAQExDzANBglghkgBZQMEAgEFADB5Bgor
    # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
    # KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCD/0pMa+hVyx0D9
    # WI5Xq9gqxK/BANxFP4JJ/58VjdZLa6CCF7EwggUwMIIEGKADAgECAhAECRgbX9W7
    # ZnVTQ7VvlVAIMA0GCSqGSIb3DQEBCwUAMGUxCzAJBgNVBAYTAlVTMRUwEwYDVQQK
    # EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xJDAiBgNV
    # BAMTG0RpZ2lDZXJ0IEFzc3VyZWQgSUQgUm9vdCBDQTAeFw0xMzEwMjIxMjAwMDBa
    # Fw0yODEwMjIxMjAwMDBaMHIxCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2Vy
    # dCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xMTAvBgNVBAMTKERpZ2lD
    # ZXJ0IFNIQTIgQXNzdXJlZCBJRCBDb2RlIFNpZ25pbmcgQ0EwggEiMA0GCSqGSIb3
    # DQEBAQUAA4IBDwAwggEKAoIBAQD407Mcfw4Rr2d3B9MLMUkZz9D7RZmxOttE9X/l
    # qJ3bMtdx6nadBS63j/qSQ8Cl+YnUNxnXtqrwnIal2CWsDnkoOn7p0WfTxvspJ8fT
    # eyOU5JEjlpB3gvmhhCNmElQzUHSxKCa7JGnCwlLyFGeKiUXULaGj6YgsIJWuHEqH
    # CN8M9eJNYBi+qsSyrnAxZjNxPqxwoqvOf+l8y5Kh5TsxHM/q8grkV7tKtel05iv+
    # bMt+dDk2DZDv5LVOpKnqagqrhPOsZ061xPeM0SAlI+sIZD5SlsHyDxL0xY4PwaLo
    # LFH3c7y9hbFig3NBggfkOItqcyDQD2RzPJ6fpjOp/RnfJZPRAgMBAAGjggHNMIIB
    # yTASBgNVHRMBAf8ECDAGAQH/AgEAMA4GA1UdDwEB/wQEAwIBhjATBgNVHSUEDDAK
    # BggrBgEFBQcDAzB5BggrBgEFBQcBAQRtMGswJAYIKwYBBQUHMAGGGGh0dHA6Ly9v
    # Y3NwLmRpZ2ljZXJ0LmNvbTBDBggrBgEFBQcwAoY3aHR0cDovL2NhY2VydHMuZGln
    # aWNlcnQuY29tL0RpZ2lDZXJ0QXNzdXJlZElEUm9vdENBLmNydDCBgQYDVR0fBHow
    # eDA6oDigNoY0aHR0cDovL2NybDQuZGlnaWNlcnQuY29tL0RpZ2lDZXJ0QXNzdXJl
    # ZElEUm9vdENBLmNybDA6oDigNoY0aHR0cDovL2NybDMuZGlnaWNlcnQuY29tL0Rp
    # Z2lDZXJ0QXNzdXJlZElEUm9vdENBLmNybDBPBgNVHSAESDBGMDgGCmCGSAGG/WwA
    # AgQwKjAoBggrBgEFBQcCARYcaHR0cHM6Ly93d3cuZGlnaWNlcnQuY29tL0NQUzAK
    # BghghkgBhv1sAzAdBgNVHQ4EFgQUWsS5eyoKo6XqcQPAYPkt9mV1DlgwHwYDVR0j
    # BBgwFoAUReuir/SSy4IxLVGLp6chnfNtyA8wDQYJKoZIhvcNAQELBQADggEBAD7s
    # DVoks/Mi0RXILHwlKXaoHV0cLToaxO8wYdd+C2D9wz0PxK+L/e8q3yBVN7Dh9tGS
    # dQ9RtG6ljlriXiSBThCk7j9xjmMOE0ut119EefM2FAaK95xGTlz/kLEbBw6RFfu6
    # r7VRwo0kriTGxycqoSkoGjpxKAI8LpGjwCUR4pwUR6F6aGivm6dcIFzZcbEMj7uo
    # +MU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ABoAGUAIABEAGkAZwBpAEMAZQByAHQAIABDAFAALwBDAFAA
    # UwAgAGEAbgBkACAAdABoAGUAIABSAGUAbAB5AGkAbgBnACAAUABhAHIAdAB5ACAA
    # QQBnAHIAZQBlAG0AZQBuAHQAIAB3AGgAaQBjAGgAIABsAGkAbQBpAHQAIABsAGkA
    # YQBiAGkAbABpAHQAeQAgAGEAbgBkACAAYQByAGUAIABpAG4AYwBvAHIAcABvAHIA
    # YQB0AGUAZAAgAGgAZQByAGUAaQBuACAAYgB5ACAAcgBlAGYAZQByAGUAbgBjAGUA
    # LjALBglghkgBhv1sAxUwHwYDVR0jBBgwFoAUFQASKxOYspkH7R7for5XDStnAs0w
    # HQYDVR0OBBYEFGFaTSS2STKdSip5GoNL9B6Jwcp9MH0GA1UdHwR2MHQwOKA2oDSG
    # Mmh0dHA6Ly9jcmwzLmRpZ2ljZXJ0LmNvbS9EaWdpQ2VydEFzc3VyZWRJRENBLTEu
    # Y3JsMDigNqA0hjJodHRwOi8vY3JsNC5kaWdpY2VydC5jb20vRGlnaUNlcnRBc3N1
    # cmVkSURDQS0xLmNybDB3BggrBgEFBQcBAQRrMGkwJAYIKwYBBQUHMAGGGGh0dHA6
    # Ly9vY3NwLmRpZ2ljZXJ0LmNvbTBBBggrBgEFBQcwAoY1aHR0cDovL2NhY2VydHMu
    # ZGlnaWNlcnQuY29tL0RpZ2lDZXJ0QXNzdXJlZElEQ0EtMS5jcnQwDQYJKoZIhvcN
    # AQEFBQADggEBAJ0lfhszTbImgVybhs4jIA+Ah+WI//+x1GosMe06FxlxF82pG7xa
    # FjkAneNshORaQPveBgGMN/qbsZ0kfv4gpFetW7easGAm6mlXIV00Lx9xsIOUGQVr
    # NZAQoHuXx/Y/5+IRQaa9YtnwJz04HShvOlIJ8OxwYtNiS7Dgc6aSwNOOMdgv420X
    # Ewbu5AO2FKvzj0OncZ0h3RTKFV2SQdr5D4HRmXQNJsQOfxu19aDxxncGKBXp2JPl
    # VRbwuwqrHNtcSC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yxXTXiZLoFs5Ipy26JNJ
    # nHgZ0MA4cfFsVddcJBnf0NdZK+K5Mj4IbjxDJ5zu6ncw2v7VYnU/Yz6hPSOHJpll
    # Oia4v+X05jJJQNUlzmv+2AXpF7eEYzssZaDbS/ETs/AxCgc0hESV4KGCAg8wggIL
    # BgkqhkiG9w0BCQYxggH8MIIB+AIBATB2MGIxCzAJBgNVBAYTAlVTMRUwEwYDVQQK
    # EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xITAfBgNV
    # BAMTGERpZ2lDZXJ0IEFzc3VyZWQgSUQgQ0EtMQIQAwGaAjr/WLFr1tXq5hfwZjAJ
    # BgUrDgMCGgUAoF0wGAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAcBgkqhkiG9w0B
    # CQUxDxcNMTcwODA3MDAwNDUyWjAjBgkqhkiG9w0BCQQxFgQUZ5JeQl7TeaU4EdEa
    # /ZUqTqy4CY0wDQYJKoZIhvcNAQEBBQAEggEAN0QwlwuOF1+trj3vi2bH9zLuC3/J
    # zUk6e0qztAhSY0ncBYDIgOiR1NA+PuLUmOpV1Em5l3JYPX1rOAxJSEAc6HFD0ceZ
    # UWTzkPknx6Mb83FmdiVUyBYe2xf5S4YuaeKiO1EWqnyEzCEzRTWVIEP0RoffJ5J8
    # XRd38EE10nus35WPjDY+mfwwfQdOBtn1ecv+mZpyI1P/iMilpoZoQrXNzmyzdd9m
    # 2JD1i5L5A13excO3cbMRqPfoYNoBIhYr+epxZrivRIp4DV5ZzTElS7XW/77fOA9L
    # vvihlBwECnWgTXIrx2X0bOcGPFuQXYrMfxhMd9Sh/Z9sAAEUT5brXxuELw==
    # SIG # End signature block
    
  • tools\chocolateyInstall\helpers\functions\Install-ChocolateyPackage.ps1 Show
    # Copyright © 2017 Chocolatey Software, Inc.
    # Copyright © 2015 - 2017 RealDimensions Software, LLC
    # Copyright © 2011 - 2015 RealDimensions Software, LLC & original authors/contributors from https://github.com/chocolatey/chocolatey
    #
    # Licensed under the Apache License, Version 2.0 (the "License");
    # you may not use this file except in compliance with the License.
    # You may obtain a copy of the License at
    #
    #     http://www.apache.org/licenses/LICENSE-2.0
    #
    # Unless required by applicable law or agreed to in writing, software
    # distributed under the License is distributed on an "AS IS" BASIS,
    # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    # See the License for the specific language governing permissions and
    # limitations under the License.
    
    function Install-ChocolateyPackage {
    <#
    .SYNOPSIS
    **NOTE:** Administrative Access Required.
    
    Installs software into "Programs and Features" based on a remote file
    download. Use Install-ChocolateyInstallPackage when local or embedded
    file.
    
    .DESCRIPTION
    This will download a native installer from a url and install it on your
    machine. Has error handling built in.
    
    If you are embedding the file(s) directly in the package (or do not need
    to download a file first), use Install-ChocolateyInstallPackage instead.
    
    .NOTES
    This command will assert UAC/Admin privileges on the machine.
    
    This is a native installer wrapper function. A "true" package will
    contain all the run time files and not an installer. That could come
    pre-zipped and require unzipping in a PowerShell script. Chocolatey
    works best when the packages contain the software it is managing. Most
    software in the Windows world comes as installers and Chocolatey
    understands how to work with that, hence this wrapper function.
    
    Chocolatey works best when the packages contain the software it is
    managing and doesn't require downloads. However most software in the
    Windows world requires redistribution rights and when sharing packages
    publicly (like on the community feed), maintainers may not have those
    aforementioned rights. Chocolatey understands how to work with that,
    hence this function. You are not subject to this limitation with
    internal packages.
    
    .INPUTS
    None
    
    .OUTPUTS
    None
    
    .PARAMETER PackageName
    The name of the package - while this is an arbitrary value, it's
    recommended that it matches the package id.
    
    .PARAMETER FileType
    This is the extension of the file. This can be 'exe', 'msi', or 'msu'.
    Licensed editions of Chocolatey use this to automatically determine
    silent arguments. If this is not provided, Chocolatey will
    automatically determine this using the downloaded file's extension.
    
    .PARAMETER SilentArgs
    OPTIONAL - These are the parameters to pass to the native installer,
    including any arguments to make the installer silent/unattended.
    Licensed editions of Chocolatey will automatically determine the
    installer type and merge the arguments with what is provided here.
    
    Try any of the to get the silent (unattended) installer -
    `/s /S /q /Q /quiet /silent /SILENT /VERYSILENT`. With msi it is always
    `/quiet`. Please pass it in still but it will be overridden by
    Chocolatey to `/quiet`. If you don't pass anything it could invoke the
    installer with out any arguments. That means a nonsilent installer.
    
    Please include the `notSilent` tag in your Chocolatey package if you
    are not setting up a silent/unattended package. Please note that if you
    are submitting to the community repository, it is nearly a requirement
    for the package to be completely unattended.
    
    .PARAMETER Url
    This is the 32 bit url to download the resource from. This resource can
    be used on 64 bit systems when a package has both a Url and Url64bit
    specified if a user passes `--forceX86`. If there is only a 64 bit url
    available, please remove do not use the paramter (only use Url64bit).
    Will fail on 32bit systems if missing or if a user attempts to force
    a 32 bit installation on a 64 bit system.
    
    Prefer HTTPS when available. Can be HTTP, FTP, or File URIs.
    
    .PARAMETER Url64bit
    OPTIONAL - If there is a 64 bit resource available, use this
    parameter. Chocolatey will automatically determine if the user is
    running a 64 bit OS or not and adjust accordingly. Please note that
    the 32 bit url will be used in the absence of this. This parameter
    should only be used for 64 bit native software. If the original Url
    contains both (which is quite rare), set this to '$url' Otherwise remove
    this parameter.
    
    Prefer HTTPS when available. Can be HTTP, FTP, or File URIs.
    
    .PARAMETER ValidExitCodes
    Array of exit codes indicating success. Defaults to `@(0)`.
    
    .PARAMETER Checksum
    The checksum hash value of the Url resource. This allows a checksum to
    be validated for files that are not local. The checksum type is covered
    by ChecksumType.
    
    **NOTE:** Checksums in packages are meant as a measure to validate the
    originally intended file that was used in the creation of a package is
    the same file that is received at a future date. Since this is used for
    other steps in the process related to the community repository, it
    ensures that the file a user receives is the same file a maintainer
    and a moderator (if applicable), plus any moderation review has
    intended for you to receive with this package. If you are looking at a
    remote source that uses the same url for updates, you will need to
    ensure the package also stays updated in line with those remote
    resource updates. You should look into [automatic packaging](https://chocolatey.org/docs/automatic-packages)
    to help provide that functionality.
    
    **NOTE:** To determine checksums, you can get that from the original
    site if provided. You can also use the [checksum tool available on
    the community feed](https://chocolatey.org/packages/checksum) (`choco install checksum`)
    and use it e.g. `checksum -t sha256 -f path\to\file`. Ensure you
    provide checksums for all remote resources used.
    
    .PARAMETER ChecksumType
    The type of checkum that the file is validated with - valid
    values are 'md5', 'sha1', 'sha256' or 'sha512' - defaults to 'md5'.
    
    MD5 is not recommended as certain organizations need to use FIPS
    compliant algorithms for hashing - see
    https://support.microsoft.com/en-us/kb/811833 for more details.
    
    The recommendation is to use at least SHA256.
    
    .PARAMETER Checksum64
    OPTIONAL if no Url64bit - The checksum hash value of the Url64bit
    resource. This allows a checksum to be validated for files that are not
    local. The checksum type is covered by ChecksumType64.
    
    **NOTE:** Checksums in packages are meant as a measure to validate the
    originally intended file that was used in the creation of a package is
    the same file that is received at a future date. Since this is used for
    other steps in the process related to the community repository, it
    ensures that the file a user receives is the same file a maintainer
    and a moderator (if applicable), plus any moderation review has
    intended for you to receive with this package. If you are looking at a
    remote source that uses the same url for updates, you will need to
    ensure the package also stays updated in line with those remote
    resource updates. You should look into [automatic packaging](https://chocolatey.org/docs/automatic-packages)
    to help provide that functionality.
    
    .PARAMETER ChecksumType64
    OPTIONAL - The type of checkum that the file is validated with - valid
    values are 'md5', 'sha1', 'sha256' or 'sha512' - defaults to
    ChecksumType parameter value.
    
    MD5 is not recommended as certain organizations need to use FIPS
    compliant algorithms for hashing - see
    https://support.microsoft.com/en-us/kb/811833 for more details.
    
    The recommendation is to use at least SHA256.
    
    .PARAMETER Options
    OPTIONAL - Specify custom headers. Available in 0.9.10+.
    
    .PARAMETER File
    Will be used for Url if Url is empty. Available in 0.10.7+.
    
    This parameter provides compatibility, but should not be used directly
    and not with the community package repository until January 2018.
    
    .PARAMETER File64
    Will be used for Url64bit if Url64bit is empty. Available in 0.10.7+.
    
    This parameter provides compatibility, but should not be used directly
    and not with the community package repository until January 2018.
    
    .PARAMETER UseOnlyPackageSilentArguments
    Do not allow choco to provide/merge additional silent arguments and only
    use the ones available with the package. Available in 0.9.10+.
    
    .PARAMETER UseOriginalLocation
    Do not download the resources. This is typically passed if Url/Url64bit
    are pointed to local files or files on a share and those files should
    be used in place. Available in 0.10.1+.
    
    NOTE: You can also use `Install-ChocolateyInstallPackage` for the same
    functionality (see links).
    
    .PARAMETER IgnoredArguments
    Allows splatting with arguments that do not apply. Do not use directly.
    
    .EXAMPLE
    >
    $packageName= 'bob'
    $toolsDir   = "$(Split-Path -Parent $MyInvocation.MyCommand.Definition)"
    $url        = 'https://somewhere.com/file.msi'
    $url64      = 'https://somewhere.com/file-x64.msi'
    
    $packageArgs = @{
      packageName   = $packageName
      fileType      = 'msi'
      url           = $url
      url64bit      = $url64
      silentArgs    = "/qn /norestart"
      validExitCodes= @(0, 3010, 1641)
      softwareName  = 'Bob*'
      checksum      = '12345'
      checksumType  = 'sha256'
      checksum64    = '123356'
      checksumType64= 'sha256'
    }
    
    Install-ChocolateyPackage @packageArgs
    
    .EXAMPLE
    >
    Install-ChocolateyPackage 'StExBar' 'msi' '/quiet' `
     'http://stexbar.googlecode.com/files/StExBar-1.8.3.msi' `
     'http://stexbar.googlecode.com/files/StExBar64-1.8.3.msi'
    
    .EXAMPLE
    >
    Install-ChocolateyPackage 'mono' 'exe' '/SILENT' `
     'http://somehwere/something.exe' -ValidExitCodes @(0,21)
    
    .EXAMPLE
    >
    Install-ChocolateyPackage 'ruby.devkit' 'exe' '/SILENT' `
     'http://cdn.rubyinstaller.org/archives/devkits/DevKit-mingw64-32-4.7.2-20130224-1151-sfx.exe' `
     'http://cdn.rubyinstaller.org/archives/devkits/DevKit-mingw64-64-4.7.2-20130224-1432-sfx.exe' `
     -checksum '9383f12958aafc425923e322460a84de' -checksumType 'md5' `
     -checksum64 'ce99d873c1acc8bffc639bd4e764b849'
    
    .EXAMPLE
    Install-ChocolateyPackage 'bob' 'exe' '/S' 'https://somewhere/bob.exe' 'https://somewhere/bob-x64.exe'
    
    .EXAMPLE
    >
    $options =
    @{
      Headers = @{
        Accept = 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8';
        'Accept-Charset' = 'ISO-8859-1,utf-8;q=0.7,*;q=0.3';
        'Accept-Language' = 'en-GB,en-US;q=0.8,en;q=0.6';
        Cookie = 'requiredinfo=info';
        Referer = 'https://somelocation.com/';
      }
    }
    
    Install-ChocolateyPackage -PackageName 'package' -FileType 'exe' -SilentArgs '/S' 'https://somelocation.com/thefile.exe' -Options $options
    
    .LINK
    Get-ChocolateyWebFile
    
    .LINK
    Install-ChocolateyInstallPackage
    
    .LINK
    Get-UninstallRegistryKey
    
    .LINK
    Install-ChocolateyZipPackage
    #>
    param(
      [parameter(Mandatory=$true, Position=0)][string] $packageName,
      [parameter(Mandatory=$false, Position=1)]
      [alias("installerType","installType")][string] $fileType = 'exe',
      [parameter(Mandatory=$false, Position=2)][string[]] $silentArgs = '',
      [parameter(Mandatory=$false, Position=3)][string] $url = '',
      [parameter(Mandatory=$false, Position=4)]
      [alias("url64")][string] $url64bit = '',
      [parameter(Mandatory=$false)] $validExitCodes = @(0),
      [parameter(Mandatory=$false)][string] $checksum = '',
      [parameter(Mandatory=$false)][string] $checksumType = '',
      [parameter(Mandatory=$false)][string] $checksum64 = '',
      [parameter(Mandatory=$false)][string] $checksumType64 = '',
      [parameter(Mandatory=$false)][hashtable] $options = @{Headers=@{}},
      [alias("fileFullPath")][parameter(Mandatory=$false)][string] $file = '',
      [alias("fileFullPath64")][parameter(Mandatory=$false)][string] $file64 = '',
      [parameter(Mandatory=$false)]
      [alias("useOnlyPackageSilentArgs")][switch] $useOnlyPackageSilentArguments = $false,
      [parameter(Mandatory=$false)][switch]$useOriginalLocation,
      [parameter(ValueFromRemainingArguments = $true)][Object[]] $ignoredArguments
    )
      [string]$silentArgs = $silentArgs -join ' '
    
      Write-FunctionCallLogMessage -Invocation $MyInvocation -Parameters $PSBoundParameters
    
      $chocTempDir = $env:TEMP
      $tempDir = Join-Path $chocTempDir "$($env:chocolateyPackageName)"
      if ($env:chocolateyPackageVersion -ne $null) { $tempDir = Join-Path $tempDir "$($env:chocolateyPackageVersion)"; }
      $tempDir = $tempDir -replace '\\chocolatey\\chocolatey\\', '\chocolatey\'
      if (![System.IO.Directory]::Exists($tempDir)) { [System.IO.Directory]::CreateDirectory($tempDir) | Out-Null }
      $downloadFilePath = Join-Path $tempDir "$($packageName)Install.$fileType"
    
      if ($url -eq '' -or $url -eq $null) {
        $url = $file
      } 
      if ($url64bit -eq '' -or $url64bit -eq $null) {
        $url64bit = $file64
      }
    
      [string]$filePath = $downloadFilePath
      if ($useOriginalLocation) {
        $filePath = $url
        if (Get-ProcessorBits 64) {
          $forceX86 = $env:chocolateyForceX86
          if ($forceX86) {
            Write-Debug "User specified '-x86' so forcing 32-bit"
          } else {
            if ($url64bit -ne $null -and $url64bit -ne '') {
              $filePath = $url64bit
            }
          }
        }
      } else {
        $filePath = Get-ChocolateyWebFile -PackageName $packageName `
                                          -FileFullPath $downloadFilePath `
                                          -Url $url `
                                          -Url64bit $url64bit `
                                          -Checksum $checksum `
                                          -ChecksumType $checksumType `
                                          -Checksum64 $checksum64 `
                                          -ChecksumType64 $checksumType64 `
                                          -Options $options `
                                          -GetOriginalFileName
      }
    
      Install-ChocolateyInstallPackage -PackageName $packageName `
                                       -FileType $fileType `
                                       -SilentArgs $silentArgs `
                                       -File $filePath `
                                       -ValidExitCodes $validExitCodes `
                                       -UseOnlyPackageSilentArguments:$useOnlyPackageSilentArguments
    }
    
    # SIG # Begin signature block
    # MIIcpwYJKoZIhvcNAQcCoIIcmDCCHJQCAQExDzANBglghkgBZQMEAgEFADB5Bgor
    # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
    # KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCC6lba7dwxzgqqn
    # 5UA32l1IbLgSoqMzbuq9D7aTvIs8v6CCF7EwggUwMIIEGKADAgECAhAECRgbX9W7
    # ZnVTQ7VvlVAIMA0GCSqGSIb3DQEBCwUAMGUxCzAJBgNVBAYTAlVTMRUwEwYDVQQK
    # EwxEaWdpQ2VydCBJbm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YYhhchhoubh87ubnNC8xd4EwH7s2AY3vJ+P3mvBMMWSN4+v6GYeofs/s
    # jAw2W3rBerh4x8kGLkYQyI3oBGDbvHN0+k7Y/qpA8bLOcEaD6dpAoVk62RUJV5lW
    # MJPzyWHM0AjMa+xiQpGsAsDvpPCJEY93AgMBAAGjggM1MIIDMTAOBgNVHQ8BAf8E
    # BAMCB4AwDAYDVR0TAQH/BAIwADAWBgNVHSUBAf8EDDAKBggrBgEFBQcDCDCCAb8G
    # A1UdIASCAbYwggGyMIIBoQYJYIZIAYb9bAcBMIIBkjAoBggrBgEFBQcCARYcaHR0
    # cHM6Ly93d3cuZGlnaWNlcnQuY29tL0NQUzCCAWQGCCsGAQUFBwICMIIBVh6CAVIA
    # QQBuAHkAIAB1AHMAZQAgAG8AZgAgAHQAaABpAHMAIABDAGUAcgB0AGkAZgBpAGMA
    # YQB0AGUAIABjAG8AbgBzAHQAaQB0AHUAdABlAHMAIABhAGMAYwBlAHAAdABhAG4A
    # YwBlACAAbwBmACAAdABoAGUAIABEAGkAZwBpAEMAZQByAHQAIABDAFAALwBDAFAA
    # UwAgAGEAbgBkACAAdABoAGUAIABSAGUAbAB5AGkAbgBnACAAUABhAHIAdAB5ACAA
    # QQBnAHIAZQBlAG0AZQBuAHQAIAB3AGgAaQBjAGgAIABsAGkAbQBpAHQAIABsAGkA
    # YQBiAGkAbABpAHQAeQAgAGEAbgBkACAAYQByAGUAIABpAG4AYwBvAHIAcABvAHIA
    # YQB0AGUAZAAgAGgAZQByAGUAaQBuACAAYgB5ACAAcgBlAGYAZQByAGUAbgBjAGUA
    # LjALBglghkgBhv1sAxUwHwYDVR0jBBgwFoAUFQASKxOYspkH7R7for5XDStnAs0w
    # HQYDVR0OBBYEFGFaTSS2STKdSip5GoNL9B6Jwcp9MH0GA1UdHwR2MHQwOKA2oDSG
    # Mmh0dHA6Ly9jcmwzLmRpZ2ljZXJ0LmNvbS9EaWdpQ2VydEFzc3VyZWRJRENBLTEu
    # Y3JsMD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oZIhvcNAQEBBQAEggEAhBnArlhht11tAWveRvoz+NkoZhMW
    # y0pocSBLAiCzQihxNp3jGOm6uUdvnQZK5TvC9bnlPtQCg3a7j4C71k0H/yp5oy3n
    # T2kw/C+y+ZhDSVytsITjCFQfwmys2RC5BuurW0QrWTROGEV+CtoChZEwCqQXqyk5
    # 74jy9+gccwdu+0N+wz9fFCFnyguOpvM9uLtqQsoAnzfugiTtisvf4W1sJH62/wJm
    # mnudIzqK1/rVMEu+/Snuqo+SmfmnP/h6PwiVG0Z9vDTv9WTHSpgeX6vI6A/H7Vm+
    # VKcetOIjX8UU0PxIrqEEINZ+6iw5CTEKbvZ0chsS6uzgPa2aPbKokYTxWQ==
    # SIG # End signature block
    
  • tools\chocolateyInstall\helpers\functions\Install-ChocolateyPath.ps1 Show
    # Copyright © 2017 Chocolatey Software, Inc.
    # Copyright © 2015 - 2017 RealDimensions Software, LLC
    # Copyright © 2011 - 2015 RealDimensions Software, LLC & original authors/contributors from https://github.com/chocolatey/chocolatey
    #
    # Licensed under the Apache License, Version 2.0 (the "License");
    # you may not use this file except in compliance with the License.
    # You may obtain a copy of the License at
    #
    #     http://www.apache.org/licenses/LICENSE-2.0
    #
    # Unless required by applicable law or agreed to in writing, software
    # distributed under the License is distributed on an "AS IS" BASIS,
    # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    # See the License for the specific language governing permissions and
    # limitations under the License.
    
    function Install-ChocolateyPath {
    <#
    .SYNOPSIS
    **NOTE:** Administrative Access Required when `-PathType 'Machine'.`
    
    This puts a directory to the PATH environment variable.
    
    .DESCRIPTION
    Looks at both PATH environment variables to ensure a path variable
    correctly shows up on the right PATH.
    
    .NOTES
    This command will assert UAC/Admin privileges on the machine if
    `-PathType 'Machine'`.
    
    This is used when the application/tool is not being linked by Chocolatey
    (not in the lib folder).
    
    .INPUTS
    None
    
    .OUTPUTS
    None
    
    .PARAMETER PathToInstall
    The full path to a location to add / ensure is in the PATH.
    
    .PARAMETER PathType
    Which PATH to add it to. If specifying `Machine`, this requires admin
    privileges to run correctly.
    
    .PARAMETER IgnoredArguments
    Allows splatting with arguments that do not apply. Do not use directly.
    
    .EXAMPLE
    Install-ChocolateyPath -PathToInstall "$($env:SystemDrive)\tools\gittfs"
    
    .EXAMPLE
    Install-ChocolateyPath "$($env:SystemDrive)\Program Files\MySQL\MySQL Server 5.5\bin" -PathType 'Machine'
    
    .LINK
    Install-ChocolateyEnvironmentVariable
    
    .LINK
    Get-EnvironmentVariable
    
    .LINK
    Set-EnvironmentVariable
    
    .LINK
    Get-ToolsLocation
    #>
    param(
      [parameter(Mandatory=$true, Position=0)][string] $pathToInstall,
      [parameter(Mandatory=$false, Position=1)][System.EnvironmentVariableTarget] $pathType = [System.EnvironmentVariableTarget]::User,
      [parameter(ValueFromRemainingArguments = $true)][Object[]] $ignoredArguments
    )
    
      Write-FunctionCallLogMessage -Invocation $MyInvocation -Parameters $PSBoundParameters
    
      $originalPathToInstall = $pathToInstall
    
      #get the PATH variable
      Update-SessionEnvironment
      $envPath = $env:PATH
      if (!$envPath.ToLower().Contains($pathToInstall.ToLower()))
      {
        Write-Host "PATH environment variable does not have $pathToInstall in it. Adding..."
        $actualPath = Get-EnvironmentVariable -Name 'Path' -Scope $pathType -PreserveVariables
    
        $statementTerminator = ";"
        #does the path end in ';'?
        $hasStatementTerminator = $actualPath -ne $null -and $actualPath.EndsWith($statementTerminator)
        # if the last digit is not ;, then we are adding it
        If (!$hasStatementTerminator -and $actualPath -ne $null) {$pathToInstall = $statementTerminator + $pathToInstall}
        if (!$pathToInstall.EndsWith($statementTerminator)) {$pathToInstall = $pathToInstall + $statementTerminator}
        $actualPath = $actualPath + $pathToInstall
    
        if ($pathType -eq [System.EnvironmentVariableTarget]::Machine) {
          if (Test-ProcessAdminRights) {
            Set-EnvironmentVariable -Name 'Path' -Value $actualPath -Scope $pathType
          } else {
            $psArgs = "Install-ChocolateyPath -pathToInstall `'$originalPathToInstall`' -pathType `'$pathType`'"
            Start-ChocolateyProcessAsAdmin "$psArgs"
          }
        } else {
          Set-EnvironmentVariable -Name 'Path' -Value $actualPath -Scope $pathType
        }
    
        #add it to the local path as well so users will be off and running
        $envPSPath = $env:PATH
        $env:Path = $envPSPath + $statementTerminator + $pathToInstall
      }
    }
    
    # [System.Text.RegularExpressions.Regex]::Match($Path,[System.Text.RegularExpressions.Regex]::Escape('locationtoMatch') + '(?>;)?', '', [System.Text.RegularExpressions.RegexOptions]::IgnoreCase)
    
    # SIG # Begin signature block
    # MIIcpwYJKoZIhvcNAQcCoIIcmDCCHJQCAQExDzANBglghkgBZQMEAgEFADB5Bgor
    # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
    # KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCB+S3JxIhMOOSpN
    # sRPblW6mzzGDYfea+CWkzdCrfzcdg6CCF7EwggUwMIIEGKADAgECAhAECRgbX9W7
    # ZnVTQ7VvlVAIMA0GCSqGSIb3DQEBCwUAMGUxCzAJBgNVBAYTAlVTMRUwEwYDVQQK
    # EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xJDAiBgNV
    # BAMTG0RpZ2lDZXJ0IEFzc3VyZWQgSUQgUm9vdCBDQTAeFw0xMzEwMjIxMjAwMDBa
    # Fw0yODEwMjIxMjAwMDBaMHIxCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2Vy
    # dCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xMTAvBgNVBAMTKERpZ2lD
    # ZXJ0IFNIQTIgQXNzdXJlZCBJRCBDb2RlIFNpZ25pbmcgQ0EwggEiMA0GCSqGSIb3
    # DQEBAQUAA4IBDwAwggEKAoIBAQD407Mcfw4Rr2d3B9MLMUkZz9D7RZmxOttE9X/l
    # qJ3bMtdx6nadBS63j/qSQ8Cl+YnUNxnXtqrwnIal2CWsDnkoOn7p0WfTxvspJ8fT
    # eyOU5JEjlpB3gvmhhCNmElQzUHSxKCa7JGnCwlLyFGeKiUXULaGj6YgsIJWuHEqH
    # CN8M9eJNYBi+qsSyrnAxZjNxPqxwoqvOf+l8y5Kh5TsxHM/q8grkV7tKtel05iv+
    # bMt+dDk2DZDv5LVOpKnqagqrhPOsZ061xPeM0SAlI+sIZD5SlsHyDxL0xY4PwaLo
    # LFH3c7y9hbFig3NBggfkOItqcyDQD2RzPJ6fpjOp/RnfJZPRAgMBAAGjggHNMIIB
    # yTASBgNVHRMBAf8ECDAGAQH/AgEAMA4GA1UdDwEB/wQEAwIBhjATBgNVHSUEDDAK
    # BggrBgEFBQcDAzB5BggrBgEFBQcBAQRtMGswJAYIKwYBBQUHMAGGGGh0dHA6Ly9v
    # Y3NwLmRpZ2ljZXJ0LmNvbTBDBggrBgEFBQcwAoY3aHR0cDovL2NhY2VydHMuZGln
    # aWNlcnQuY29tL0RpZ2lDZXJ0QXNzdXJlZElEUm9vdENBLmNydDCBgQYDVR0fBHow
    # eDA6oDigNoY0aHR0cDovL2NybDQuZGlnaWNlcnQuY29tL0RpZ2lDZXJ0QXNzdXJl
    # ZElEUm9vdENBLmNybDA6oDigNoY0aHR0cDovL2NybDMuZGlnaWNlcnQuY29tL0Rp
    # Z2lDZXJ0QXNzdXJlZElEUm9vdENBLmNybDBPBgNVHSAESDBGMDgGCmCGSAGG/WwA
    # AgQwKjAoBggrBgEFBQcCARYcaHR0cHM6Ly93d3cuZGlnaWNlcnQuY29tL0NQUzAK
    # BghghkgBhv1sAzAdBgNVHQ4EFgQUWsS5eyoKo6XqcQPAYPkt9mV1DlgwHwYDVR0j
    # BBgwFoAUReuir/SSy4IxLVGLp6chnfNtyA8wDQYJKoZIhvcNAQELBQADggEBAD7s
    # DVoks/Mi0RXILHwlKXaoHV0cLToaxO8wYdd+C2D9wz0PxK+L/e8q3yBVN7Dh9tGS
    # dQ9RtG6ljlriXiSBThCk7j9xjmM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ABDAGUAcgB0AGkAZgBpAGMA
    # YQB0AGUAIABjAG8AbgBzAHQAaQB0AHUAdABlAHMAIABhAGMAYwBlAHAAdABhAG4A
    # YwBlACAAbwBmACAAdABoAGUAIABEAGkAZwBpAEMAZQByAHQAIABDAFAALwBDAFAA
    # UwAgAGEAbgBkACAAdABoAGUAIABSAGUAbAB5AGkAbgBnACAAUABhAHIAdAB5ACAA
    # QQBnAHIAZQBlAG0AZQBuAHQAIAB3AGgAaQBjAGgAIABsAGkAbQBpAHQAIABsAGkA
    # YQBiAGkAbABpAHQAeQAgAGEAbgBkACAAYQByAGUAIABpAG4AYwBvAHIAcABvAHIA
    # YQB0AGUAZAAgAGgAZQByAGUAaQBuACAAYgB5ACAAcgBlAGYAZQByAGUAbgBjAGUA
    # LjALBglghkgBhv1sAxUwHwYDVR0jBBgwFoAUFQASKxOYspkH7R7for5XDStnAs0w
    # HQYDVR0OBBYEFGFaTSS2STKdSip5GoNL9B6Jwcp9MH0GA1UdHwR2MHQwOKA2oDSG
    # Mmh0dHA6Ly9jcmwzLmRpZ2ljZXJ0LmNvbS9EaWdpQ2VydEFzc3VyZWRJRENBLTEu
    # Y3JsMDigNqA0hjJodHRwOi8vY3JsNC5kaWdpY2VydC5jb20vRGlnaUNlcnRBc3N1
    # cmVkSURDQS0xLmNybDB3BggrBgEFBQcBAQRrMGkwJAYIKwYBBQUHMAGGGGh0dHA6
    # Ly9vY3NwLmRpZ2ljZXJ0LmNvbTBBBggrBgEFBQcwAoY1aHR0cDovL2NhY2VydHMu
    # ZGlnaWNlcnQuY29tL0RpZ2lDZXJ0QXNzdXJlZElEQ0EtMS5jcnQwDQYJKoZIhvcN
    # AQEFBQADggEBAJ0lfhszTbImgVybhs4jIA+Ah+WI//+x1GosMe06FxlxF82pG7xa
    # FjkAneNshORaQPveBgGMN/qbsZ0kfv4gpFetW7easGAm6mlXIV00Lx9xsIOUGQVr
    # NZAQoHuXx/Y/5+IRQaa9YtnwJz04HShvOlIJ8OxwYtN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# 8Nzb21jgxnp+Z1ubDDwkMTzsyyUHLL6Ukm7+jN/b38yARcu21xCScSfXY81aIvXB
    # oLmx4caz9SLQLkDRa85D/GjtU6Zg+Bh6KQvyygndLhbItXjs9PjInZei0SJp1CRO
    # 8U9Y8+XX8KL2+umuGQ3yDiDtEqtT23VvGIj5FZomEu5K6XSRyGHAfLSSZKBrj4Jn
    # BExqaOT0Z6thnLVmQ3hZ+dFCTxY8lLoExay9FXRRpK4GYSqy+2Mb2KGCAg8wggIL
    # BgkqhkiG9w0BCQYxggH8MIIB+AIBATB2MGIxCzAJBgNVBAYTAlVTMRUwEwYDVQQK
    # EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xITAfBgNV
    # BAMTGERpZ2lDZXJ0IEFzc3VyZWQgSUQgQ0EtMQIQAwGaAjr/WLFr1tXq5hfwZjAJ
    # BgUrDgMCGgUAoF0wGAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAcBgkqhkiG9w0B
    # CQUxDxcNMTcwODA3MDAwNDUzWjAjBgkqhkiG9w0BCQQxFgQUBarbrpfPDJRTSsE4
    # B2fVgqEdCkcwDQYJKoZIhvcNAQEBBQAEggEAe6jAavuD3jHUQQEjtG/wILS/rE/5
    # GoRMqcxVkU5uZ7XFSz7wZYfeLvR4lFUgf6Xn6A/qplp37M7MXCn0pYExJqbaiHWR
    # D2abneTLJ7Pdl7IxNLMmYkhG9Eb8m1NVhe1SLLkgM46Cm/+jeTahWmABrOC5INAw
    # +PptRO3uEdttzSgFYKEh9+rpc1tVn8DPAs1rz6Mwh1R9LyRPJdepIONM76TqtEKx
    # WisedWNZzHI0zj2a0uovM+j1a0DTGmadSNERgScSi+wjxnEPl7sO9GOkKieTwV1K
    # XeSzrYZ8SuWdLf/V1K2dXgnEGRfOcmxkOHUbhF0Zu90O/8BqerrjiMNdRg==
    # SIG # End signature block
    
  • tools\chocolateyInstall\helpers\functions\Install-ChocolateyPinnedTaskBarItem.ps1 Show
    # Copyright © 2017 Chocolatey Software, Inc.
    # Copyright © 2015 - 2017 RealDimensions Software, LLC
    # Copyright © 2011 - 2015 RealDimensions Software, LLC & original authors/contributors from https://github.com/chocolatey/chocolatey
    #
    # Licensed under the Apache License, Version 2.0 (the "License");
    # you may not use this file except in compliance with the License.
    # You may obtain a copy of the License at
    #
    #     http://www.apache.org/licenses/LICENSE-2.0
    #
    # Unless required by applicable law or agreed to in writing, software
    # distributed under the License is distributed on an "AS IS" BASIS,
    # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    # See the License for the specific language governing permissions and
    # limitations under the License.
    
    function Install-ChocolateyPinnedTaskBarItem {
    <#
    .SYNOPSIS
    Creates an item in the task bar linking to the provided path.
    
    .NOTES
    Does not work with SYSTEM, but does not error. It warns with the error
    message.
    
    .INPUTS
    None
    
    .OUTPUTS
    None
    
    .PARAMETER TargetFilePath
    The path to the application that should be launched when clicking on the
    task bar icon.
    
    .PARAMETER IgnoredArguments
    Allows splatting with arguments that do not apply. Do not use directly.
    
    .EXAMPLE
    >
    # This will create a Visual Studio task bar icon.
    Install-ChocolateyPinnedTaskBarItem -TargetFilePath "${env:ProgramFiles(x86)}\Microsoft Visual Studio 11.0\Common7\IDE\devenv.exe"
    
    .LINK
    Install-ChocolateyShortcut
    
    .LINK
    Install-ChocolateyExplorerMenuItem
    #>
    param(
      [parameter(Mandatory=$true, Position=0)][string] $targetFilePath,
      [parameter(ValueFromRemainingArguments = $true)][Object[]]$ignoredArguments
    )
    
      Write-FunctionCallLogMessage -Invocation $MyInvocation -Parameters $PSBoundParameters
     
      try{
    	if (test-path($targetFilePath)) {
    		$verb = "Pin To Taskbar"
    		$path= split-path $targetFilePath
    		$shell=new-object -com "Shell.Application"
    		$folder=$shell.Namespace($path)
    		$item = $folder.Parsename((split-path $targetFilePath -leaf))
    		$itemVerb = $item.Verbs() | ? {$_.Name.Replace("&","") -eq $verb}
    		if($itemVerb -eq $null){
    			Write-Host "TaskBar verb not found for $item. It may have already been pinned"
    		} else {
    			$itemVerb.DoIt()
    		}
    		Write-Host "`'$targetFilePath`' has been pinned to the task bar on your desktop"
    	} else {
    		$errorMessage = "`'$targetFilePath`' does not exist, not able to pin to task bar"
    	}
    
    	if ($errorMessage) {
    		Write-Warning $errorMessage
    	}
      } catch {
    	 Write-Warning "Unable to create pin. Error captured was $($_.Exception.Message)."
      }
    }
    
    # SIG # Begin signature block
    # MIIcpwYJKoZIhvcNAQcCoIIcmDCCHJQCAQExDzANBglghkgBZQMEAgEFADB5Bgor
    # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
    # KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCAluQ1Yfrvw+vBy
    # ACkFx/mycYvk9y5pMEcPW0SLiPOpm6CCF7EwggUwMIIEGKADAgECAhAECRgbX9W7
    # ZnVTQ7VvlVAIMA0GCSqGSIb3DQEBCwUAMGUxCzAJBgNVBAYTAlVTMRUwEwYDVQQK
    # EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xJDAiBgNV
    # BAMTG0RpZ2lDZXJ0IEFzc3VyZWQgSUQgUm9vdCBDQTAeFw0xMzEwMjIxMjAwMDBa
    # Fw0yODEwMjIxMjAwMDBaMHIxCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2Vy
    # dCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xMTAvBgNVBAMTKERpZ2lD
    # ZXJ0IFNIQTIgQXNzdXJlZCBJRCBDb2RlIFNpZ25pbmcgQ0EwggEiMA0GCSqGSIb3
    # DQEBAQUAA4IBDwAwggEKAoIBAQD407Mcfw4Rr2d3B9MLMUkZz9D7RZmxOttE9X/l
    # qJ3bMtdx6nadBS63j/qSQ8Cl+YnUNxnXtqrwnIal2CWsDnkoOn7p0WfTxvspJ8fT
    # eyOU5JEjlpB3gvmhhCNmElQzUHSxKCa7JGnCwlLyFGeKiUXULaGj6YgsIJWuHEqH
    # CN8M9eJNYBi+qsSyrnAxZjNxPqxwoqvOf+l8y5Kh5TsxHM/q8grkV7tKtel05iv+
    # bMt+dDk2DZDv5LVOpKnqagqrhPOsZ061xPeM0SAlI+sIZD5SlsHyDxL0xY4PwaLo
    # LFH3c7y9hbFig3NBggfkOItqcyDQD2RzPJ6fpjOp/RnfJZPRAgMBAAGjggHNMIIB
    # yTASBgNVHRMBAf8ECDAGAQH/AgEAMA4GA1UdDwEB/wQEAwIBhjATBgNVHSUEDDAK
    # BggrBgEFBQcDAzB5BggrBgEFBQcBAQRtMGswJAYIKwYBBQUHMAGGGGh0dHA6Ly9v
    # Y3NwLmRpZ2ljZXJ0LmNvbTBDBggrBgEFBQcwAoY3aHR0cDovL2NhY2VydHMuZGln
    # aWNlcnQuY29tL0RpZ2lDZXJ0QXNzdXJlZElEUm9vdENBLmNydDCBgQYDVR0fBHow
    # eDA6oDigNoY0aHR0cDovL2NybDQuZGlnaWNlcnQuY29tL0RpZ2lDZXJ0QXNzdXJl
    # ZElEUm9vdENBLmNybDA6oDigNoY0aHR0cDovL2NybDMuZGlnaWNlcnQuY29tL0Rp
    # Z2lDZXJ0QXNzdXJlZElEUm9vdENBLmNybDBPBgNVHSAESDBGMDgGCmCGSAGG/WwA
    # AgQwKjAoBggrBgEFBQcCARYcaHR0cHM6Ly93d3cuZGlnaWNlcnQuY29tL0NQUzAK
    # BghghkgBhv1sAzAdBgNVHQ4EFgQUWsS5eyoKo6XqcQPAYPkt9mV1DlgwHwYDVR0j
    # BBgwFoAUReuir/SSy4IxLVGLp6chnfNtyA8wDQYJKoZIhvcNAQELBQADggEBAD7s
    # DVoks/Mi0RXILHwlKXaoHV0cLToaxO8wYdd+C2D9wz0PxK+L/e8q3yBVN7Dh9tGS
    # dQ9RtG6ljlriXiSBThCk7j9xjmMOE0ut119EefM2FAaK95xGTlz/kLEbBw6RFfu6
    #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AG8AbgBzAHQAaQB0AHUAdABlAHMAIABhAGMAYwBlAHAAdABhAG4A
    # YwBlACAAbwBmACAAdABoAGUAIABEAGkAZwBpAEMAZQByAHQAIABDAFAALwBDAFAA
    # UwAgAGEAbgBkACAAdABoAGUAIABSAGUAbAB5AGkAbgBnACAAUABhAHIAdAB5ACAA
    # QQBnAHIAZQBlAG0AZQBuAHQAIAB3AGgAaQBjAGgAIABsAGkAbQBpAHQAIABsAGkA
    # YQBiAGkAbABpAHQAeQAgAGEAbgBkACAAYQByAGUAIABpAG4AYwBvAHIAcABvAHIA
    # YQB0AGUAZAAgAGgAZQByAGUAaQBuACAAYgB5ACAAcgBlAGYAZQByAGUAbgBjAGUA
    # LjALBglghkgBhv1sAxUwHwYDVR0jBBgwFoAUFQASKxOYspkH7R7for5XDStnAs0w
    # HQYDVR0OBBYEFGFaTSS2STKdSip5GoNL9B6Jwcp9MH0GA1UdHwR2MHQwOKA2oDSG
    # Mmh0dHA6Ly9jcmwzLmRpZ2ljZXJ0LmNvbS9EaWdpQ2VydEFzc3VyZWRJRENBLTEu
    # Y3JsMDigNqA0hjJodHRwOi8vY3JsNC5kaWdpY2VydC5jb20vRGlnaUNlcnRBc3N1
    # cmVkSURDQS0xLmNybDB3BggrBgEFBQcBAQRrMGkwJAYIKwYBBQUHMAGGGGh0dHA6
    # Ly9vY3NwLmRpZ2ljZXJ0LmNvbTBBBggrBgEFBQcwAoY1aHR0cDovL2NhY2VydHMu
    # ZGlnaWNlcnQuY29tL0RpZ2lDZXJ0QXNzdXJlZElEQ0EtMS5jcnQwDQYJKoZIhvcN
    # AQEFBQADggEBAJ0lfhszTbImgVybhs4jIA+Ah+WI//+x1GosMe06FxlxF82pG7xa
    # FjkAneNshORaQPveBgGMN/qbsZ0kfv4gpFetW7easGAm6mlXIV00Lx9xsIOUGQVr
    # NZAQoHuXx/Y/5+IRQaa9YtnwJz04HShvOlIJ8OxwYtNiS7Dgc6aSwNOOMdgv420X
    # Ewbu5AO2FKvz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O3WOclFdZn74kZraHQ7os6DFyCki
    # IV2X6vKnXfUVL+ExekRI6MsmRT6RvvuTkO3d0x6zv75yWCuYhEtqRiRpB3Hi+Jvf
    # NCgjABVjJeT5e0JnpBhmVPK2QgNITeaHiIfR3ivQjH4cCLltKBSnmsnO/dkK0KHc
    # LhqLMguMXTrO4yh7wOCqO18MTJWK3cpryBFsy/qS3+P2WzihuyTWY6GCAg8wggIL
    # BgkqhkiG9w0BCQYxggH8MIIB+AIBATB2MGIxCzAJBgNVBAYTAlVTMRUwEwYDVQQK
    # EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xITAfBgNV
    # BAMTGERpZ2lDZXJ0IEFzc3VyZWQgSUQgQ0EtMQIQAwGaAjr/WLFr1tXq5hfwZjAJ
    # BgUrDgMCGgUAoF0wGAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAcBgkqhkiG9w0B
    # CQUxDxcNMTcwODA3MDAwNDUzWjAjBgkqhkiG9w0BCQQxFgQU0gjn3bAeWf0m5H4N
    # 1b3hWYg9GIowDQYJKoZIhvcNAQEBBQAEggEAiY1xUJIpLO3amOhDI2Um/up9BHn9
    # ZFnc3tGVEJQkgkRlJXnnwP4JIuxIhhEkOKGDilAabzeahu5G5CA8q5cud++w8Dbn
    # JpnZhCjCWep8FhGjlpYBH3IZnbygtXD72KbHKuwjmOvbGUIayP+CWDDxBkoqU1f4
    # ZNLfW5fWiWBkvoXQ+8cytEJVD1vUFQEm4KbpNn9qxc5yHp/5qvxzIDe+aHB/s5H5
    # pDNg0Mb5GpimWNUlDwGo6SETBfw9Q1Fub7r7+jEQ5+pOv5DxggnkVENbNQuYJwEg
    # HOHqyDfen02TPC8r66Z5tOjdSBsFUn9SvrF3wWgWiJM7HdvpZw9nZYDq2w==
    # SIG # End signature block
    
  • tools\chocolateyInstall\helpers\functions\Install-ChocolateyPowershellCommand.ps1 Show
    # Copyright © 2017 Chocolatey Software, Inc.
    # Copyright © 2015 - 2017 RealDimensions Software, LLC
    # Copyright © 2011 - 2015 RealDimensions Software, LLC & original authors/contributors from https://github.com/chocolatey/chocolatey
    #
    # Licensed under the Apache License, Version 2.0 (the "License");
    # you may not use this file except in compliance with the License.
    # You may obtain a copy of the License at
    #
    #     http://www.apache.org/licenses/LICENSE-2.0
    #
    # Unless required by applicable law or agreed to in writing, software
    # distributed under the License is distributed on an "AS IS" BASIS,
    # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    # See the License for the specific language governing permissions and
    # limitations under the License.
    
    function Install-ChocolateyPowershellCommand {
    <#
    .SYNOPSIS
    Installs a PowerShell Script as a command
    
    .DESCRIPTION
    This will install a PowerShell script as a command on your system. Like
    an executable can be run from a batch redirect, this will do the same,
    calling PowerShell with this command and passing your arguments to it.
    If you include a url, it will first download the PowerShell file.
    
    .NOTES
    Chocolatey works best when the packages contain the software it is
    managing and doesn't require downloads. However most software in the
    Windows world requires redistribution rights and when sharing packages
    publicly (like on the community feed), maintainers may not have those
    aforementioned rights. Chocolatey understands how to work with that,
    hence this function. You are not subject to this limitation with
    internal packages.
    
    .INPUTS
    None
    
    .OUTPUTS
    None
    
    .PARAMETER PackageName
    The name of the package - while this is an arbitrary value, it's
    recommended that it matches the package id.
    
    .PARAMETER PsFileFullPath
    Full file path to PowerShell file to turn into a command. If embedding
    it in the package next to the install script, the path will be like
    `"$(Split-Path -parent $MyInvocation.MyCommand.Definition)\\Script.ps1"`
    
    In 0.10.6+, `File` and `FileFullPath` are aliases for PsFileFullPath.
    
    .PARAMETER Url
    This is the 32 bit url to download the resource from. This resource can
    be used on 64 bit systems when a package has both a Url and Url64bit
    specified if a user passes `--forceX86`. If there is only a 64 bit url
    available, please remove do not use this parameter (only use Url64bit).
    Will fail on 32bit systems if missing or if a user attempts to force
    a 32 bit installation on a 64 bit system.
    
    Prefer HTTPS when available. Can be HTTP, FTP, or File URIs.
    
    .PARAMETER Url64bit
    OPTIONAL - If there is a 64 bit resource available, use this
    parameter. Chocolatey will automatically determine if the user is
    running a 64 bit OS or not and adjust accordingly. Please note that
    the 32 bit url will be used in the absence of this. This parameter
    should only be used for 64 bit native software. If the original Url
    contains both (which is quite rare), set this to '$url' Otherwise remove
    this parameter.
    
    Prefer HTTPS when available. Can be HTTP, FTP, or File URIs.
    
    .PARAMETER Checksum
    The checksum hash value of the Url resource. This allows a checksum to
    be validated for files that are not local. The checksum type is covered
    by ChecksumType.
    
    **NOTE:** Checksums in packages are meant as a measure to validate the
    originally intended file that was used in the creation of a package is
    the same file that is received at a future date. Since this is used for
    other steps in the process related to the community repository, it
    ensures that the file a user receives is the same file a maintainer
    and a moderator (if applicable), plus any moderation review has
    intended for you to receive with this package. If you are looking at a
    remote source that uses the same url for updates, you will need to
    ensure the package also stays updated in line with those remote
    resource updates. You should look into [automatic packaging](https://chocolatey.org/docs/automatic-packages)
    to help provide that functionality.
    
    .PARAMETER ChecksumType
    The type of checkum that the file is validated with - valid
    values are 'md5', 'sha1', 'sha256' or 'sha512' - defaults to 'md5'.
    
    MD5 is not recommended as certain organizations need to use FIPS
    compliant algorithms for hashing - see
    https://support.microsoft.com/en-us/kb/811833 for more details.
    
    The recommendation is to use at least SHA256.
    
    .PARAMETER Checksum64
    OPTIONAL if no Url64bit - The checksum hash value of the Url64bit
    resource. This allows a checksum to be validated for files that are not
    local. The checksum type is covered by ChecksumType64.
    
    **NOTE:** Checksums in packages are meant as a measure to validate the
    originally intended file that was used in the creation of a package is
    the same file that is received at a future date. Since this is used for
    other steps in the process related to the community repository, it
    ensures that the file a user receives is the same file a maintainer
    and a moderator (if applicable), plus any moderation review has
    intended for you to receive with this package. If you are looking at a
    remote source that uses the same url for updates, you will need to
    ensure the package also stays updated in line with those remote
    resource updates. You should look into [automatic packaging](https://chocolatey.org/docs/automatic-packages)
    to help provide that functionality.
    
    **NOTE:** To determine checksums, you can get that from the original
    site if provided. You can also use the [checksum tool available on
    the community feed](https://chocolatey.org/packages/checksum) (`choco install checksum`)
    and use it e.g. `checksum -t sha256 -f path\to\file`. Ensure you
    provide checksums for all remote resources used.
    
    .PARAMETER ChecksumType64
    OPTIONAL - The type of checkum that the file is validated with - valid
    values are 'md5', 'sha1', 'sha256' or 'sha512' - defaults to
    ChecksumType parameter value.
    
    MD5 is not recommended as certain organizations need to use FIPS
    compliant algorithms for hashing - see
    https://support.microsoft.com/en-us/kb/811833 for more details.
    
    The recommendation is to use at least SHA256.
    
    .PARAMETER Options
    OPTIONAL - Specify custom headers. Available in 0.9.10+.
    
    .PARAMETER IgnoredArguments
    Allows splatting with arguments that do not apply. Do not use directly.
    
    .EXAMPLE
    >
    $psFile = Join-Path $(Split-Path -Parent $MyInvocation.MyCommand.Definition) "Install-WindowsImage.ps1"
    Install-ChocolateyPowershellCommand -PackageName 'installwindowsimage.powershell' -PSFileFullPath $psFile
    
    .EXAMPLE
    >
    $psFile = Join-Path $(Split-Path -Parent $MyInvocation.MyCommand.Definition) `
     "Install-WindowsImage.ps1"
    Install-ChocolateyPowershellCommand `
     -PackageName 'installwindowsimage.powershell' `
     -PSFileFullPath $psFile `
     -PSFileFullPath $psFile `
     -Url 'http://somewhere.com/downloads/Install-WindowsImage.ps1'
    
    .EXAMPLE
    >
    $psFile = Join-Path $(Split-Path -Parent $MyInvocation.MyCommand.Definition) `
     "Install-WindowsImage.ps1"
    Install-ChocolateyPowershellCommand `
     -PackageName 'installwindowsimage.powershell' `
     -PSFileFullPath $psFile `
     -Url 'http://somewhere.com/downloads/Install-WindowsImage.ps1' `
     -Url64 'http://somewhere.com/downloads/Install-WindowsImagex64.ps1'
    
    .LINK
    Get-ChocolateyWebFile
    
    .LINK
    Install-ChocolateyInstallPackage
    
    .LINK
    Install-ChocolateyPackage
    
    .LINK
    Install-ChocolateyZipPackage
    #>
    param(
      [parameter(Mandatory=$false, Position=0)][string] $packageName,
      [alias("file","fileFullPath")][parameter(Mandatory=$true, Position=1)][string] $psFileFullPath,
      [parameter(Mandatory=$false, Position=2)][string] $url ='',
      [parameter(Mandatory=$false, Position=3)]
      [alias("url64")][string] $url64bit = '',
      [parameter(Mandatory=$false)][string] $checksum = '',
      [parameter(Mandatory=$false)][string] $checksumType = '',
      [parameter(Mandatory=$false)][string] $checksum64 = '',
      [parameter(Mandatory=$false)][string] $checksumType64 = '',
      [parameter(Mandatory=$false)][hashtable] $options = @{Headers=@{}},
      [parameter(ValueFromRemainingArguments = $true)][Object[]] $ignoredArguments
    )
    
      Write-FunctionCallLogMessage -Invocation $MyInvocation -Parameters $PSBoundParameters
    
      if ($url -ne '') {
        Get-ChocolateyWebFile $packageName $psFileFullPath $url $url64bit -checksum $checksum -checksumType $checksumType -checksum64 $checksum64 -checksumType64 $checksumType64 -Options $options
      }
    
      if ($env:chocolateyPackageName -ne $null -and $env:chocolateyPackageName -eq $env:ChocolateyInstallDirectoryPackage) {
        Write-Warning "Install Directory override not available for PowerShell command packages."
      }
    
      $nugetPath = $(Split-Path -parent $helpersPath)
      $nugetExePath = Join-Path $nuGetPath 'bin'
    
      $cmdName = [System.IO.Path]::GetFileNameWithoutExtension($psFileFullPath)
      $packageBatchFileName = Join-Path $nugetExePath "$($cmdName).bat"
    
      Write-Host "Adding $packageBatchFileName and pointing it to powershell command $psFileFullPath"
    "@echo off
    powershell -NoProfile -ExecutionPolicy unrestricted -Command ""& `'$psFileFullPath`'  %*"""| Out-File $packageBatchFileName -encoding ASCII
    
    }
    
    # SIG # Begin signature block
    # MIIcpwYJKoZIhvcNAQcCoIIcmDCCHJQCAQExDzANBglghkgBZQMEAgEFADB5Bgor
    # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
    # KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCC9KcgX+eZZLU8W
    # /LaWoZwaNMs2L1G8yJsruP7peTY5EaCCF7EwggUwMIIEGKADAgECAhAECRgbX9W7
    # ZnVTQ7VvlVAIMA0GCSqGSIb3DQEBCwUAMGUxCzAJ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9RSOOhkRVfRiGBYxVh3lIRvfKDo2n3k5f
    # 4qi2LVkCYYhhchhoubh87ubnNC8xd4EwH7s2AY3vJ+P3mvBMMWSN4+v6GYeofs/s
    # jAw2W3rBerh4x8kGLkYQyI3oBGDbvHN0+k7Y/qpA8bLOcEaD6dpAoVk62RUJV5lW
    # MJPzyWHM0AjMa+xiQpGsAsDvpPCJEY93AgMBAAGjggM1MIIDMTAOBgNVHQ8BAf8E
    # BAMCB4AwDAYDVR0TAQH/BAIwADAWBgNVHSUBAf8EDDAKBggrBgEFBQcDCDCCAb8G
    # A1UdIASCAbYwggGyMIIBoQYJYIZIAYb9bAcBMIIBkjAoBggrBgEFBQcCARYcaHR0
    # cHM6Ly93d3cuZGlnaWNlcnQuY29tL0NQUzCCAWQGCCsGAQUFBwICMIIBVh6CAVIA
    # QQBuAHkAIAB1AHMAZQAgAG8AZgAgAHQAaABpAHMAIABDAGUAcgB0AGkAZgBpAGMA
    # YQB0AGUAIABjAG8AbgBzAHQAaQB0AHUAdABlAHMAIABhAGMAYwBlAHAAdABhAG4A
    # YwBlACAAbwBmACAAdABoAGUAIABEAGkAZwBpAEMAZQByAHQAIABDAFAALwBDAFAA
    # UwAgAGEAbgBkACAAdABoAGUAIABSAGUAbAB5AGkAbgBnACAAUABhAHIAdAB5ACAA
    # QQBnAHIAZQBlAG0AZQBuAHQAIAB3AGgAaQBjAGgAIABsAGkAbQBpAHQAIABsAGkA
    # YQBiAGkAbABpAHQAeQAgAGEAbgBkACAAYQByAGUAIABpAG4AYwBvAHIAcABvAHIA
    # YQB0AGUAZAAgAGgAZQByAGUAaQBuACAAYgB5ACAAcgBlAGYAZQByAGUAbgBjAGUA
    # LjALBglghkgBhv1sAxUwHwYDVR0jBBgwFoAUFQASKxOYspkH7R7for5XDStnAs0w
    # HQYDVR0OBBYEFGFaTSS2STKdSip5GoNL9B6Jwcp9MH0GA1UdHwR2MHQwOKA2oDSG
    # Mmh0dHA6Ly9jcmwzLmRpZ2ljZXJ0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CQQxFgQU8nRzZwzu+EjoS6Mx
    # jcu62j0CmGMwDQYJKoZIhvcNAQEBBQAEggEAcEikT4eY0haHXNTruVgPWKpEMKYq
    # gnRc0HOY+Qhnx6JflX4OhgqPqbvyAb06jMdWK9LegKJEVGQxlIG+tkpoUzzrs8pJ
    # wGWi0KwudfDF4gEFlkyANYDZ1V5Y2eTcpk41HHUEKJf9lPVjAnNYiNKhm6wVAwD/
    # mJXWgR25VE+syHJu+JHGSZGuE8KNAGfGif61MAGMfUcse8jiaIacV5VM6rwue3ZU
    # JQtxgo3Fp7ZOGW4fO2jXcX3csisFnfxuzbyw/Qv4Am+YqEuPkXS5haOPr9aDFVIa
    # UGwjE8Uz0kpGfb+VmFZos705AB95bQUdYN5asgNFGaFahoJ4I0fV+ih2kQ==
    # SIG # End signature block
    
  • tools\chocolateyInstall\helpers\functions\Install-ChocolateyShortcut.ps1 Show
    # Copyright © 2017 Chocolatey Software, Inc.
    # Copyright © 2015 - 2017 RealDimensions Software, LLC
    # Copyright © 2011 - 2015 RealDimensions Software, LLC & original authors/contributors from https://github.com/chocolatey/chocolatey
    #
    # Licensed under the Apache License, Version 2.0 (the "License");
    # you may not use this file except in compliance with the License.
    # You may obtain a copy of the License at
    #
    #     http://www.apache.org/licenses/LICENSE-2.0
    #
    # Unless required by applicable law or agreed to in writing, software
    # distributed under the License is distributed on an "AS IS" BASIS,
    # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    # See the License for the specific language governing permissions and
    # limitations under the License.
    
    function Install-ChocolateyShortcut {
    <#
    .SYNOPSIS
    Creates a shortcut
    
    .DESCRIPTION
    This adds a shortcut, at the specified location, with the option to specify
    a number of additional properties for the shortcut, such as Working Directory,
    Arguments, Icon Location, and Description.
    
    .NOTES
    If this errors, as it may if being run under the local SYSTEM account with
    particular folder that SYSTEM doesn't have, it will display a warning instead
    of failing a package installation.
    
    .INPUTS
    None
    
    .OUTPUTS
    None
    
    .PARAMETER ShortcutFilePath
    The full absolute path to where the shortcut should be created.
    
    .PARAMETER TargetPath
    The full absolute path to the target for new shortcut.
    
    .PARAMETER WorkingDirectory
    OPTIONAL - The full absolute path of the Working Directory that will be
    used by the new shortcut.
    
    .PARAMETER Arguments
    OPTIONAL - Additonal arguments that should be passed along to the new
    shortcut.
    
    .PARAMETER IconLocation
    OPTIONAL- The full absolute path to an icon file to be used for the new
    shortcut.
    
    .PARAMETER Description
    OPTIONAL - A text description to be associated with the new description.
    
    .PARAMETER WindowStyle
    OPTIONAL - Type of windows target application should open with. 
    Available in 0.9.10+.
    0 = Hidden, 1 = Normal Size, 3 = Maximized, 7 - Minimized.
    Full list table 3.9 here: https://technet.microsoft.com/en-us/library/ee156605.aspx
    
    .PARAMETER RunAsAdmin
    OPTIONAL - Set "Run As Administrator" checkbox for the created the
    shortcut. Available in 0.9.10+.
    
    .PARAMETER PinToTaskbar
    OPTIONAL - Pin the new shortcut to the taskbar. Available in 0.9.10+.
    
    .PARAMETER IgnoredArguments
    Allows splatting with arguments that do not apply. Do not use directly.
    
    .EXAMPLE
    >
    # This will create a new shortcut at the location of "C:\test.lnk" and
    # link to the file located at "C:\text.exe"
    
    Install-ChocolateyShortcut -ShortcutFilePath "C:\test.lnk" -TargetPath "C:\test.exe"
    
    .EXAMPLE
    >
    # This will create a new shortcut at the location of "C:\notepad.lnk"
    # and link to the Notepad application.  In addition, other properties
    # are being set to specify the working directory, an icon to be used for
    # the shortcut, along with a description and arguments.
    
    Install-ChocolateyShortcut `
      -ShortcutFilePath "C:\notepad.lnk" `
      -TargetPath "C:\Windows\System32\notepad.exe" `
      -WorkDirectory "C:\" `
      -Arguments "C:\test.txt" `
      -IconLocation "C:\test.ico" `
      -Description "This is the description"
    
    .EXAMPLE
    >
    # Creates a new notepad shortcut on the root of c: that starts
    # notepad.exe as Administrator. Shortcut is also pinned to taskbar.
    # These parameters are available in 0.9.10+.
    
    Install-ChocolateyShortcut `
      -ShortcutFilePath "C:\notepad.lnk" `
      -TargetPath "C:\Windows\System32\notepad.exe" `
      -WindowStyle 3 `
      -RunAsAdmin `
      -PinToTaskbar
    
    .LINK
    Install-ChocolateyDesktopLink
    
    .LINK
    Install-ChocolateyExplorerMenuItem
    
    .LINK
    Install-ChocolateyPinnedTaskBarItem
    #>
    	param(
        [parameter(Mandatory=$true, Position=0)][string] $shortcutFilePath,
        [parameter(Mandatory=$true, Position=1)][string] $targetPath,
        [parameter(Mandatory=$false, Position=2)][string] $workingDirectory,
        [parameter(Mandatory=$false, Position=3)][string] $arguments,
        [parameter(Mandatory=$false, Position=4)][string] $iconLocation,
        [parameter(Mandatory=$false, Position=5)][string] $description,
        [parameter(Mandatory=$false, Position=6)][int] $windowStyle,
        [parameter(Mandatory=$false)][switch] $runAsAdmin,
        [parameter(Mandatory=$false)][switch] $pinToTaskbar,
        [parameter(ValueFromRemainingArguments = $true)][Object[]]$ignoredArguments
    	)
    
      Write-FunctionCallLogMessage -Invocation $MyInvocation -Parameters $PSBoundParameters
    
    	# http://powershell.com/cs/blogs/tips/archive/2009/02/05/validating-a-url.aspx
    	function isURIWeb($address) {
    	  $uri = $address -as [System.URI]
    	  $uri.AbsoluteURI -ne $null -and $uri.Scheme -match '[http|https]'
    	}
    
      if (!$shortcutFilePath) {
        # shortcut file path could be null if someone is trying to get special
        # paths for LocalSystem (SYSTEM).
        Write-Warning "Unable to create shortcut. `$shortcutFilePath can not be null."
        return
      }
    
    	$shortcutDirectory = $([System.IO.Path]::GetDirectoryName($shortcutFilePath))
      if (!(Test-Path($shortcutDirectory))) {
        [System.IO.Directory]::CreateDirectory($shortcutDirectory) | Out-Null
      }
    
    	if (!$targetPath) {
    	  throw "Install-ChocolateyShortcut - `$targetPath can not be null."
    	}
    
    	if(!(Test-Path($targetPath)) -and !(IsURIWeb($targetPath))) {
    	  Write-Warning "'$targetPath' does not exist. If it is not created the shortcut will not be valid."
    	}
    
    	if($iconLocation) {
    		if(!(Test-Path($iconLocation))) {
    		  Write-Warning "'$iconLocation' does not exist. A default icon will be used."
    		}
    	}
    
      if ($workingDirectory) {
        if (!(Test-Path($workingDirectory))) {
          [System.IO.Directory]::CreateDirectory($workingDirectory) | Out-Null
        }
    	}
    
    	Write-Debug "Creating Shortcut..."
    	try {
    		$global:WshShell = New-Object -com "WScript.Shell"
    	    $lnk = $global:WshShell.CreateShortcut($shortcutFilePath)
    	    $lnk.TargetPath = $targetPath
    		$lnk.WorkingDirectory = $workingDirectory
    	    $lnk.Arguments = $arguments
    	    if($iconLocation) {
    	      $lnk.IconLocation = $iconLocation
    	    }
    		if ($description) {
    		  $lnk.Description = $description
    		}
    
        if ($windowStyle) {
          $lnk.WindowStyle = $windowStyle
        }
    
        $lnk.Save()
    
    		Write-Debug "Shortcut created."
    
        [System.IO.FileInfo]$Path = $shortcutFilePath
        If ($runAsAdmin) {
          #In order to enable the "Run as Admin" checkbox, this code reads the .LNK as a stream
          #  and flips a specific bit while writing a new copy.  It then replaces the original
          #  .LNK with the copy, similar to this example: http://poshcode.org/2513
          $TempFileName = [IO.Path]::GetRandomFileName()
          $TempFile = [IO.FileInfo][IO.Path]::Combine($Path.Directory, $TempFileName)
          $Writer = New-Object System.IO.FileStream $TempFile, ([System.IO.FileMode]::Create)
          $Reader = $Path.OpenRead()
          While ($Reader.Position -lt $Reader.Length) {
            $Byte = $Reader.ReadByte()
            If ($Reader.Position -eq 22) {$Byte = 34}
            $Writer.WriteByte($Byte)
            }
          $Reader.Close()
          $Writer.Close()
          $Path.Delete()
          Rename-Item -Path $TempFile -NewName $Path.Name | Out-Null
        }
    
        If ($pinToTaskbar) {
          $scfilename = $Path.FullName
          $pinverb = (new-object -com "shell.application").namespace($(split-path -parent $Path.FullName)).Parsename($(split-path -leaf $Path.FullName)).verbs() | ?{$_.Name -eq 'Pin to Tas&kbar'}
          If ($pinverb) {$pinverb.doit()}
        }
    	}
    	catch {
    		Write-Warning "Unable to create shortcut. Error captured was $($_.Exception.Message)."
    	}
    }
    
    # SIG # Begin signature block
    # MIIcpwYJKoZIhvcNAQc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MIIB
    # yTASBgNVHRMBAf8ECDAGAQH/AgEAMA4GA1UdDwEB/wQEAwIBhjATBgNVHSUEDDAK
    # BggrBgEFBQcDAzB5BggrBgEFBQcBAQRtMGswJAYIKwYBBQUHMAGGGGh0dHA6Ly9v
    # Y3NwLmRpZ2ljZXJ0LmNvbTBDBggrBgEFBQcwAoY3aHR0cDovL2NhY2VydHMuZGln
    # aWNlcnQuY29tL0RpZ2lDZXJ0QXNzdXJlZElEUm9vdENBLmNydDCBgQYDVR0fBHow
    # eDA6oDigNoY0aHR0cDovL2NybDQuZGlnaWNlcnQuY29tL0RpZ2lDZXJ0QXNzdXJl
    # ZElEUm9vdENBLmNybDA6oDigNoY0aHR0cDovL2NybDMuZGlnaWNlcnQuY29tL0Rp
    # Z2lDZXJ0QXNzdXJlZElEUm9vdENBLmNybDBPBgNVHSAESDBGMDgGCmCGSAGG/WwA
    # AgQwKjAoBggrBgEFBQcCARYcaHR0cHM6Ly93d3cuZGlnaWNlcnQuY29tL0NQUzAK
    # BghghkgBhv1sAzAdBgNVHQ4EFgQUWsS5eyoKo6XqcQPAYPkt9mV1DlgwHwYDVR0j
    # BBgwFoAUReuir/SSy4IxLVGLp6chnfNtyA8wDQYJKoZIhvcNAQELBQADggEBAD7s
    # DVoks/Mi0RXILHwlKXaoHV0cLToaxO8wYdd+C2D9wz0PxK+L/e8q3yBVN7Dh9tGS
    # dQ9RtG6ljlriXiSBThCk7j9xjmMOE0ut119EefM2FAaK95xGTlz/kLEbBw6RFfu6
    # r7VRwo0kriTGxycqoSkoGjpxKAI8LpGjwCUR4pwUR6F6aGivm6dcIFzZcbEMj7uo
    # +MUSaJ/PQMtARKUT8OZkDCUIQjKyNookAv4vcn4c10lFluhZHen6dGRrsutmQ9qz
    # sIzV6Q3d9gEgzpkxYz0IGhizgZtPxpMQBvwHgfqL2vmCSfdibqFT+hKUGIUukpHq
    # aGxEMrJmoecYpJpkUe8wggU6MIIEIqADAgECAhAGsBFbtfCQ0/DaDmIsYn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VyZWQtY3MtZzEuY3JsMDWgM6Axhi9odHRwOi8vY3Js
    # NC5kaWdpY2VydC5jb20vc2hhMi1hc3N1cmVkLWNzLWcxLmNybDBMBgNVHSAERTBD
    # MDcGCWCGSAGG/WwDATAqMCgGCCsGAQUFBwIBFhxodHRwczovL3d3dy5kaWdpY2Vy
    # dC5jb20vQ1BTMAgGBmeBDAEEATCBhAYIKwYBBQUHAQEEeDB2MCQGCCsGAQUFBzAB
    # hhhodHRwOi8vb2NzcC5kaWdpY2VydC5jb20wTgYIKwYBBQUHMAKGQmh0dHA6Ly9j
    # YWNlcnRzLmRpZ2ljZXJ0LmNvbS9EaWdpQ2VydFNIQTJBc3N1cmVkSURDb2RlU2ln
    # bmluZ0NBLmNydDAMBgNVHRMBAf8EAjAAMA0GCSqGSIb3DQEBCwUAA4IBAQCLBAE/
    # 2x4amEecDEoy9g+WmWMROiB4GnkPqj+IbiwftmwC5/7yL3/592HOFMJr0qOgUt51
    # moE8SuuLuOGw63c5+/48LJS4jP2XzbVNByRPIxPWorm4t/OzTJNziTowHQ+wLwwI
    # 8U97+8DaHCNL7iLZNEiqbVlpF3j7SMWGgf2BVYADJyxluNzf0ZUO+lXN4gOkM8tl
    # VDc7SjZEKvu6ckAaxXf7NPbCXVL/3+LvdmoLbT3vJlfzeXqduO3oieB10ic3ug5T
    # XtoYmyEk/P3yR3x/TqUlg1x/xaolBxy5TyMeSLcBlYn42fnQL154bvMGwFiCsHWQ
    # wY09I0xpEysOMiy8MIIGajCCBVKgAwIBAgIQAwGaAjr/WLFr1tXq5hfwZjANBgkq
    # hkiG9w0BAQUFADBiMQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5j
    # MRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSEwHwYDVQQDExhEaWdpQ2VydCBB
    # c3N1cmVkIElEIENBLTEwHhcNMTQxMDIyMDAwMDAwWhcNMjQxMDIyMDAwMDAwWjBH
    # MQswCQYDVQQGEwJVU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AbABpAHQAeQAgAGEAbgBkACAAYQByAGUAIABpAG4AYwBvAHIAcABvAHIA
    # YQB0AGUAZAAgAGgAZQByAGUAaQBuACAAYgB5ACAAcgBlAGYAZQByAGUAbgBjAGUA
    # LjALBglghkgBhv1sAxUwHwYDVR0jBBgwFoAUFQASKxOYspkH7R7for5XDStnAs0w
    # HQYDVR0OBBYEFGFaTSS2STKdSip5GoNL9B6Jwcp9MH0GA1UdHwR2MHQwOKA2oDSG
    # Mmh0dHA6Ly9jcmwzLmRpZ2ljZXJ0LmNvbS9EaWdpQ2VydEFzc3VyZWRJRENBLTEu
    # Y3JsMDigNqA0hjJodHRwOi8vY3JsNC5kaWdpY2VydC5jb20vRGlnaUNlcnRBc3N1
    # cmVkSURDQS0xLmNybDB3BggrBgEFBQcBAQRrMGkwJAYIKwYBBQUHMAGGGGh0dHA6
    # Ly9vY3NwLmRpZ2ljZXJ0LmNvbTBBBggrBgEFBQcwAoY1aHR0cDovL2NhY2VydHMu
    # ZGlnaWNlcnQuY29tL0RpZ2lDZXJ0QXNzdXJlZElEQ0EtMS5jcnQwDQYJKoZIhvcN
    # AQEFBQADggEBAJ0lfhszTbImgVybhs4jIA+Ah+WI//+x1GosMe06FxlxF82pG7xa
    # FjkAneNshORaQPveBgGMN/qbsZ0kfv4gpFetW7easGAm6mlXIV00Lx9xsIOUGQVr
    # NZAQoHuXx/Y/5+IRQaa9YtnwJz04HShvOlIJ8OxwYtNiS7Dgc6aSwNOOMdgv420X
    # Ewbu5AO2FKvzj0OncZ0h3RTKFV2SQdr5D4HRmXQNJsQOfxu19aDxxncGKBXp2JPl
    # VRbwuwqrHNtcSCdmyKOLChzlldquxC5ZoGHd2vNtomHpigtt7BIYvfdVVEADkitr
    # wlHCCkivsNRu4PQUCjob4489yq9qjXvc2EQwggbNMIIFtaADAgECAhAG/fkDlgOt
    # 6gAK6z8nu7obMA0GCSqGSIb3DQEBBQUAMGUxCzAJBgNVBAYTAlVTMRUwEwYDVQQK
    # EwxEa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AHQAZQAgAGMA
    # bwBuAHMAdABpAHQAdQB0AGUAcwAgAGEAYwBjAGUAcAB0AGEAbgBjAGUAIABvAGYA
    # IAB0AGgAZQAgAEQAaQBnAGkAQwBlAHIAdAAgAEMAUAAvAEMAUABTACAAYQBuAGQA
    # IAB0AGgAZQAgAFIAZQBsAHkAaQBuAGcAIABQAGEAcgB0AHkAIABBAGcAcgBlAGUA
    # bQBlAG4AdAAgAHcAaABpAGMAaAAgAGwAaQBtAGkAdAAgAGwAaQBhAGIAaQBsAGkA
    # dAB5ACAAYQBuAGQAIABhAHIAZQAgAGkAbgBjAG8AcgBwAG8AcgBhAHQAZQBkACAA
    # aABlAHIAZQBpAG4AIABiAHkAIAByAGUAZgBlAHIAZQBuAGMAZQAuMAsGCWCGSAGG
    # /WwDFTASBgNVHRMBAf8ECDAGAQH/AgEAMHkGCCsGAQUFBwEBBG0wazAkBggrBgEF
    # BQcwAYYYaHR0cDovL29jc3AuZGlnaWNlcnQuY29tMEMGCCsGAQUFBzAChjdodHRw
    # Oi8vY2FjZXJ0cy5kaWdpY2VydC5jb20vRGlnaUNlcnRBc3N1cmVkSURSb290Q0Eu
    # Y3J0MIGBBgNVHR8EejB4MDqgOKA2hjRodHRwOi8vY3JsMy5kaWdpY2VydC5jb20v
    # RGlnaUNlcnRBc3N1cmVkSURSb290Q0EuY3JsMDqgOKA2hjRodHRwOi8vY3JsNC5k
    # aWdpY2VydC5jb20vRGlnaUNlcnRBc3N1cmVkSURSb290Q0EuY3JsMB0GA1UdDgQW
    # BBQVABIrE5iymQftHt+ivlcNK2cCzTAfBgNVHSMEGDAWgBRF66Kv9JLLgjEtUYun
    # pyGd823IDzANBgkqhkiG9w0BAQUFAAOCAQEARlA+ybcoJKc4HbZbKa9Sz1LpMUer
    # Vlx71Q0LQbPv7HUfdDjyslxhopyVw1Dkgrkj0bo6hnKtOHisdV0XFzRyR4WUVtHr
    # uzaEd8wkpfMEGVWp5+Pnq2LN+4stkMLA0rWUvV5PsQXS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B+AIBATB2MGIxCzAJBgNVBAYTAlVTMRUwEwYDVQQK
    # EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xITAfBgNV
    # BAMTGERpZ2lDZXJ0IEFzc3VyZWQgSUQgQ0EtMQIQAwGaAjr/WLFr1tXq5hfwZjAJ
    # BgUrDgMCGgUAoF0wGAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAcBgkqhkiG9w0B
    # CQUxDxcNMTcwODA3MDAwNDUzWjAjBgkqhkiG9w0BCQQxFgQUqU2C527nx8GO9HCr
    # WwiSScR/n7swDQYJKoZIhvcNAQEBBQAEggEAQ2BaLHEmmK4i7+3XTtEg1r5ts1/5
    # Ld85+qjAMq8qilUXjFE4ahlY6iRoiWJEACwfgsTEstK2mtG+POi32XIRGw96gtwx
    # bS2/DCd8eST2P/wJdW8Dos70rSxJ8MGqMfcv5HY2gRLLj0blOwo5wLtlXgyFP5eB
    # rHTGNz10c+1SN81r6jnL7qPlefBdpPTXtjm79BlgT/mlerSSEqvCuBZy9FKrMRSV
    # Qvb20UOm1yOwBfkhVCpB2aYzeOLiilYSun14OQY6dAAriauftUMhXc5CgQrvwosX
    # u3voCGdYhiOB4heffYZx2RmewL+/1+OEhHDtwECpKiVnJxN2q01DLp8DbQ==
    # SIG # End signature block
    
  • tools\chocolateyInstall\helpers\functions\Install-ChocolateyVsixPackage.ps1 Show
    # Copyright © 2017 Chocolatey Software, Inc.
    # Copyright © 2015 - 2017 RealDimensions Software, LLC
    # Copyright © 2011 - 2015 RealDimensions Software, LLC & original authors/contributors from https://github.com/chocolatey/chocolatey
    #
    # Licensed under the Apache License, Version 2.0 (the "License");
    # you may not use this file except in compliance with the License.
    # You may obtain a copy of the License at
    #
    #     http://www.apache.org/licenses/LICENSE-2.0
    #
    # Unless required by applicable law or agreed to in writing, software
    # distributed under the License is distributed on an "AS IS" BASIS,
    # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    # See the License for the specific language governing permissions and
    # limitations under the License.
    
    function Install-ChocolateyVsixPackage {
    <#
    .SYNOPSIS
    Downloads and installs a VSIX package for Visual Studio
    
    .DESCRIPTION
    VSIX packages are Extensions for the Visual Studio IDE. The Visual
    Studio Gallery at  http://visualstudiogallery.msdn.microsoft.com/ is the
    public extension feed and hosts thousands of extensions. You can locate
    a VSIX Url by finding the download link of Visual Studio extensions on
    the Visual Studio Gallery.
    
    .NOTES
    Chocolatey works best when the packages contain the software it is
    managing and doesn't require downloads. However most software in the
    Windows world requires redistribution rights and when sharing packages
    publicly (like on the community feed), maintainers may not have those
    aforementioned rights. Chocolatey understands how to work with that,
    hence this function. You are not subject to this limitation with
    internal packages.
    
    .INPUTS
    None
    
    .OUTPUTS
    None
    
    .PARAMETER PackageName
    The name of the package - while this is an arbitrary value, it's
    recommended that it matches the package id.
    
    In 0.10.4+, `Name` is an alias for PackageName.
    
    .PARAMETER VsixUrl
    The URL of the package to be installed.
    
    Prefer HTTPS when available. Can be HTTP, FTP, or File URIs.
    
    In 0.10.4+, `Url` is an alias for VsixUrl.
    
    .PARAMETER VsVersion
    The major version number of Visual Studio where the
    package should be installed. This is optional. If not
    specified, the most recent Visual Studio installation
    will be targetted.
    
    NOTE: For Visual Studio 2015, the VsVersion is 14. It can be determined
    by looking at the folders under Program Files / Program Files (x86).
    
    In 0.10.4+, `VisualStudioVersion` is an alias for VsVersion.
    
    .PARAMETER Checksum
    The checksum hash value of the Url resource. This allows a checksum to 
    be validated for files that are not local. The checksum type is covered
    by ChecksumType. 
    
    **NOTE:** Checksums in packages are meant as a measure to validate the 
    originally intended file that was used in the creation of a package is
    the same file that is received at a future date. Since this is used for
    other steps in the process related to the community repository, it 
    ensures that the file a user receives is the same file a maintainer
    and a moderator (if applicable), plus any moderation review has 
    intended for you to receive with this package. If you are looking at a 
    remote source that uses the same url for updates, you will need to 
    ensure the package also stays updated in line with those remote 
    resource updates. You should look into [automatic packaging](https://chocolatey.org/docs/automatic-packages) 
    to help provide that functionality.
    
    **NOTE:** To determine checksums, you can get that from the original 
    site if provided. You can also use the [checksum tool available on 
    the community feed](https://chocolatey.org/packages/checksum) (`choco install checksum`) 
    and use it e.g. `checksum -t sha256 -f path\to\file`. Ensure you 
    provide checksums for all remote resources used.
    
    .PARAMETER ChecksumType
    The type of checkum that the file is validated with - valid
    values are 'md5', 'sha1', 'sha256' or 'sha512' - defaults to 'md5'.
    
    MD5 is not recommended as certain organizations need to use FIPS
    compliant algorithms for hashing - see
    https://support.microsoft.com/en-us/kb/811833 for more details.
    
    The recommendation is to use at least SHA256.
    
    .PARAMETER Options
    OPTIONAL - Specify custom headers. Available in 0.9.10+.
    
    .PARAMETER File
    Will be used for VsixUrl if VsixUrl is empty. Available in 0.10.7+.
    
    This parameter provides compatibility, but should not be used directly
    and not with the community package repository until January 2018.
    
    .PARAMETER IgnoredArguments
    Allows splatting with arguments that do not apply. Do not use directly.
    
    .EXAMPLE
    >
    # This downloads the AutoWrockTestable VSIX from the Visual Studio
    # Gallery and installs it to the latest version of VS.
    
    Install-ChocolateyVsixPackage -PackageName "MyPackage" `
      -VsixUrl http://visualstudiogallery.msdn.microsoft.com/ea3a37c9-1c76-4628-803e-b10a109e7943/file/73131/1/AutoWrockTestable.vsix
    
    .EXAMPLE
    >
    # This downloads the AutoWrockTestable VSIX from the Visual Studio
    # Gallery and installs it to Visual Studio 2012 (v11.0).
    
    Install-ChocolateyVsixPackage -PackageName "MyPackage" `
      -VsixUrl http://visualstudiogallery.msdn.microsoft.com/ea3a37c9-1c76-4628-803e-b10a109e7943/file/73131/1/AutoWrockTestable.vsix `
      -VsVersion 11
    
    .LINK
    Install-ChocolateyPackage
    
    .LINK
    Install-ChocolateyInstallPackage
    
    .LINK
    Install-ChocolateyZipPackage
    #>
    param(
      [alias("name")][parameter(Mandatory=$true, Position=0)][string] $packageName,
      [alias("url")][parameter(Mandatory=$false, Position=1)][string] $vsixUrl,
      [alias("visualStudioVersion")][parameter(Mandatory=$false, Position=2)][int] $vsVersion = 0,
      [parameter(Mandatory=$false)][string] $checksum = '',
      [parameter(Mandatory=$false)][string] $checksumType = '',
      [parameter(Mandatory=$false)][hashtable] $options = @{Headers=@{}},
      [alias("fileFullPath")][parameter(Mandatory=$false)][string] $file = '',
      [parameter(ValueFromRemainingArguments = $true)][Object[]] $ignoredArguments
    )
    
        Write-FunctionCallLogMessage -Invocation $MyInvocation -Parameters $PSBoundParameters
    
        if ($vsixUrl -eq '' -or $vsixUrl -eq $null) {
            $vsixUrl = $file
        }
    
        if($vsVersion -eq 0) {
            if ([System.IntPtr]::Size -eq 4)
            {
                <# 32bits system case #>
                $versions=(get-ChildItem HKLM:SOFTWARE\Microsoft\VisualStudio -ErrorAction SilentlyContinue | ? { ($_.PSChildName -match "^[0-9\.]+$") } | ? {$_.property -contains "InstallDir"} | sort {[int]($_.PSChildName)} -descending)
            }
            else
            {
                $versions=(get-ChildItem HKLM:SOFTWARE\Wow6432Node\Microsoft\VisualStudio -ErrorAction SilentlyContinue | ? { ($_.PSChildName -match "^[0-9\.]+$") } | ? {$_.property -contains "InstallDir"} | sort {[int]($_.PSChildName)} -descending)
            }
            if($versions -and $versions.Length){
                $version = $versions[0]
            }elseif($versions){
                $version = $versions
            }
        }
        else {
            if ([System.IntPtr]::Size -eq 4)
            {
                <# 32bits system case #>
                $versions=(get-ChildItem HKLM:SOFTWARE\Microsoft\VisualStudio -ErrorAction SilentlyContinue | ? { ($_.PSChildName.EndsWith("$vsVersion.0")) } | ? {$_.property -contains "InstallDir"})
            }
            else
            {
                $version=(get-ChildItem HKLM:SOFTWARE\Wow6432Node\Microsoft\VisualStudio -ErrorAction SilentlyContinue | ? { ($_.PSChildName.EndsWith("$vsVersion.0")) } | ? {$_.property -contains "InstallDir"})
            }
        }
    
        if ($version) {
            $vnum=$version.PSPath.Substring($version.PSPath.LastIndexOf('\')+1)
            if($vnum -as [int] -lt 10) {
                throw "This installed VS version, $vnum, does not support installing VSIX packages. Version 10 is the minimum acceptable version."
            }
            $dir=(get-itemProperty $version.PSPath "InstallDir").InstallDir
            $installer = Join-Path $dir "VsixInstaller.exe"
        }
    
        if ($installer) {
            $download="$env:TEMP\$($packageName.Replace(' ','')).vsix"
            try{
                Get-ChocolateyWebFile $packageName $download $vsixUrl -checksum $checksum -checksumType $checksumType -Options $options
            }
            catch {
                throw "There were errors attempting to retrieve the vsix from $vsixUrl. The error message was '$_'."
            }
    
            Write-Debug "Installing VSIX using $installer"
            $exitCode = Install-Vsix "$installer" "$download"
            if($exitCode -gt 0 -and $exitCode -ne 1001) { #1001: Already installed
               throw "There was an error installing '$packageName'. The exit code returned was $exitCode."
            }
        }
        else {
            throw "Visual Studio is not installed or the specified version is not present."
        }
    }
    
    # SIG # Begin signature block
    # MIIcpwYJKoZIhvcNAQcCoIIcmDCCHJQCAQExDzANBglghkgBZQMEAgEFADB5Bgor
    # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
    # KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCAwvbwbcXwGHARv
    # s0aL6zHGEwZUxYCbjjh5ZcXDMGFCc6CCF7EwggUwMIIEGKADAgECAhAECRgbX9W7
    # ZnVTQ7VvlVAIMA0GCSqGSIb3DQEBCwUAMGUxCzAJBgNVBAYTAlVTMRUwEwYDVQQK
    # EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xJDAiBgNV
    # BAMTG0RpZ2lDZXJ0IEFzc3VyZWQgSUQgUm9vdCBDQTAeFw0xMzEwMjIxMjAwMDBa
    # Fw0yODEwMjIxMjAwMDBaMHIxCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2Vy
    # dCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xMTAvBgNVBAMTKERpZ2lD
    # ZXJ0IFNIQTIgQXNzdXJlZCBJRCBDb2RlIFNpZ25pbmcgQ0E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wDQYJKoZIhvcNAQELBQADggEBAD7s
    # DVoks/Mi0RXILHwlKXaoHV0cLToaxO8wYdd+C2D9wz0PxK+L/e8q3yBVN7Dh9tGS
    # dQ9RtG6ljlriXiSBThCk7j9xjmMOE0ut119EefM2FAaK95xGTlz/kLEbBw6RFfu6
    # r7VRwo0kriTGxycqoSkoGjpxKAI8LpGjwCUR4pwUR6F6aGivm6dcIFzZcbEMj7uo
    # +MUSaJ/PQMtARKUT8OZkDCUIQjKyNookAv4vcn4c10lFluhZHen6dGRrsutmQ9qz
    # sIzV6Q3d9gEgzpkxYz0IGhizgZtPxpMQBvwHgfqL2vmCSfdibqFT+hKUGIUukpHq
    # aGxEMrJmoecYpJpkUe8wggU6MIIEIqADAgECAhAGsBFbtfCQ0/DaDmIsYn1YMA0G
    # CSqGSIb3DQEBCwUAMHIxCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2VydCBJ
    # bmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xMTAvBgNVBAMTKERpZ2lDZXJ0
    # IFNIQTIgQXNzdXJlZCBJRCBDb2RlIFNpZ25pbmcgQ0EwHhcNMTcwMzI4MDAwMDAw
    # WhcNMTgwNDAzMTIwMDAwWjB3MQswCQYDVQQGEwJVUzEPMA0GA1UECBMGS2Fuc2Fz
    # MQ8wDQYDVQQHEwZUb3Bla2ExIjAgBgNVBAoTGUNob2NvbGF0ZXkgU29mdHdhcmUs
    # IEluYy4xIjAgBgNVBAMTGUNob2NvbGF0ZXkgU29mdHdhcmUsIEluYy4wggEiMA0G
    # CSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDLIWIaEiqkPbIMZi6jD6J8F3YIYPxG
    # 3Vw2I8AsM5c63WUmV+bYZQGxY5AHHVFphy9mU6spXgAqVpzkcALjo1oArVscUU34
    # 8S4mokGbZVvHlO8ny1b1HzfR4ZPHpUL71btSqpcOElYOOL0wUnf5As/39VN+Wxef
    # //D5KTDD17AA2DVvIaXMT+utER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EFBQcCARYcaHR0
    # cHM6Ly93d3cuZGlnaWNlcnQuY29tL0NQUzCCAWQGCCsGAQUFBwICMIIBVh6CAVIA
    # QQBuAHkAIAB1AHMAZQAgAG8AZgAgAHQAaABpAHMAIABDAGUAcgB0AGkAZgBpAGMA
    # YQB0AGUAIABjAG8AbgBzAHQAaQB0AHUAdABlAHMAIABhAGMAYwBlAHAAdABhAG4A
    # YwBlACAAbwBmACAAdABoAGUAIABEAGkAZwBpAEMAZQByAHQAIABDAFAALwBDAFAA
    # UwAgAGEAbgBkACAAdABoAGUAIABSAGUAbAB5AGkAbgBnACAAUABhAHIAdAB5ACAA
    # QQBnAHIAZQBlAG0AZQBuAHQAIAB3AGgAaQBjAGgAIABsAGkAbQBpAHQAIABsAGkA
    # YQBiAGkAbABpAHQAeQAgAGEAbgBkACAAYQByAGUAIABpAG4AYwBvAHIAcABvAHIA
    # YQB0AGUAZAAgAGgAZQByAGUAaQBuACAAYgB5ACAAcgBlAGYAZQByAGUAbgBjAGUA
    # LjALBglghkgBhv1sAxUwHwYDVR0jBBgwFoAUFQASKxOYspkH7R7for5XDStnAs0w
    # HQYDVR0OBBYEFGFaTSS2STKdSip5GoNL9B6Jwcp9MH0GA1UdHwR2MHQwOKA2oDSG
    # Mmh0dHA6Ly9jcmwzLmRpZ2ljZXJ0LmNvbS9EaWdpQ2VydEFzc3VyZWRJRENBLTEu
    # Y3JsMDigNqA0hjJodHRwOi8vY3JsNC5kaWdpY2VydC5jb20vRGlnaUNlcnRBc3N1
    # cmVkSURDQS0xLmNybDB3BggrBgEFBQcBAQRrMGkwJAYIKwYBBQUHMAGGGGh0dHA6
    # Ly9vY3NwLmRpZ2ljZXJ0LmNvbTBBBggrBgEFBQcwAoY1aHR0cDovL2NhY2VydHMu
    # ZGlnaWNlcnQuY29tL0RpZ2lDZXJ0QXNzdXJlZElEQ0EtMS5jcnQwDQYJKoZIhvcN
    # AQEFBQADggEBAJ0lfhszTbImgVybhs4jIA+Ah+WI//+x1GosMe06FxlxF82pG7xa
    # FjkAneNshORaQPveBgGMN/qbsZ0kfv4gpFetW7easGAm6mlXIV00Lx9xsIOUGQVr
    # NZAQoHuXx/Y/5+IRQaa9YtnwJz04HShvOlIJ8OxwYtNiS7Dgc6aSwNOOMdgv420X
    # Ewbu5AO2FKvzj0OncZ0h3RTKFV2SQdr5D4HRmXQNJsQOfxu19aDxxncGKBXp2JPl
    # VRbwuwqrHNtcSCdmyKOLChzlldquxC5ZoGHd2vNtomHpigtt7BIYvfdVVEADkitr
    # wlHCCkivsNRu4PQUCjob4489yq9qjXvc2EQwggbNMIIFtaADAgECAhAG/fkDlgOt
    # 6gAK6z8nu7obMA0GCSqGSIb3DQEBBQUAMGUxCzAJBgNVBAYTAlVTMRUwEwYDVQQK
    # EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xJDAiBgNV
    # BAMTG0RpZ2lDZXJ0IEFzc3VyZWQgSUQgUm9vdCBDQTAeFw0wNjExMTAwMDAwMDBa
    # Fw0yMTExMTAwMDAwMDBaMGIxCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2Vy
    # dCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xITAfBgNVBAMTGERpZ2lD
    # ZXJ0IEFzc3VyZWQgSUQgQ0EtMTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC
    # ggEBAOiCLZn5ysJClaWAc0Bw0p5WVFypxNJBBo/JM/xNRZFcgZ/tLJz4FlnfnrUk
    # FcKYubR3SdyJxArar8tea+2tsHEx6886QAxGTZPsi3o2CAOrDDT+GEmC/sfHMUiA
    # fB6iD5IOUMnGh+s2P9gww/+m9/uizW9zI/6sVgWQ8DIhFonGcIj5BZd9o8dD3QLo
    # Oz3tsUGj7T++25VIxO4es/K8DCuZ0MZdEkKB4YNugnM/JksUkK5ZZgrEjb7Szgau
    # rYRvSISbT0C58Uzyr5j79s5AXVz2qPEvr+yJIvJ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16PIY
    # 2BFw6JeLzQSIwCCF3V7k5Ff9SW89gCAbR3/8Ueo/aP411IDpAj1mx2Ehcw==
    # SIG # End signature block
    
  • tools\chocolateyInstall\helpers\functions\Install-ChocolateyZipPackage.ps1 Show
    # Copyright © 2017 Chocolatey Software, Inc.
    # Copyright © 2015 - 2017 RealDimensions Software, LLC
    # Copyright © 2011 - 2015 RealDimensions Software, LLC & original authors/contributors from https://github.com/chocolatey/chocolatey
    #
    # Licensed under the Apache License, Version 2.0 (the "License");
    # you may not use this file except in compliance with the License.
    # You may obtain a copy of the License at
    #
    #     http://www.apache.org/licenses/LICENSE-2.0
    #
    # Unless required by applicable law or agreed to in writing, software
    # distributed under the License is distributed on an "AS IS" BASIS,
    # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    # See the License for the specific language governing permissions and
    # limitations under the License.
    
    function Install-ChocolateyZipPackage {
    <#
    .SYNOPSIS
    Downloads file from a url and unzips it on your machine. Use
    Get-ChocolateyUnzip when local or embedded file.
    
    .DESCRIPTION
    This will download a file from a url and unzip it on your machine.
    If you are embedding the file(s) directly in the package (or do not need
    to download a file first), use Get-ChocolateyUnzip instead.
    
    .NOTES
    Chocolatey works best when the packages contain the software it is
    managing and doesn't require downloads. However most software in the
    Windows world requires redistribution rights and when sharing packages
    publicly (like on the community feed), maintainers may not have those
    aforementioned rights. Chocolatey understands how to work with that,
    hence this function. You are not subject to this limitation with
    internal packages.
    
    .INPUTS
    None
    
    .OUTPUTS
    None
    
    .PARAMETER PackageName
    The name of the package - while this is an arbitrary value, it's
    recommended that it matches the package id.
    
    .PARAMETER Url
    This is the 32 bit url to download the resource from. This resource can
    be used on 64 bit systems when a package has both a Url and Url64bit
    specified if a user passes `--forceX86`. If there is only a 64 bit url
    available, please remove do not use the paramter (only use Url64bit).
    Will fail on 32bit systems if missing or if a user attempts to force
    a 32 bit installation on a 64 bit system.
    
    Prefer HTTPS when available. Can be HTTP, FTP, or File URIs.
    
    .PARAMETER Url64bit
    OPTIONAL - If there is a 64 bit resource available, use this
    parameter. Chocolatey will automatically determine if the user is
    running a 64 bit OS or not and adjust accordingly. Please note that
    the 32 bit url will be used in the absence of this. This parameter
    should only be used for 64 bit native software. If the original Url
    contains both (which is quite rare), set this to '$url' Otherwise remove
    this parameter.
    
    Prefer HTTPS when available. Can be HTTP, FTP, or File URIs.
    
    .PARAMETER UnzipLocation
    This is the full path to a location to unzip the contents to, most
    likely your script folder. If unzipping to your package folder, the path
    will be like
    `"$(Split-Path -Parent $MyInvocation.MyCommand.Definition)\\file.exe"`
    
    .PARAMETER Checksum
    The checksum hash value of the Url resource. This allows a checksum to
    be validated for files that are not local. The checksum type is covered
    by ChecksumType.
    
    **NOTE:** Checksums in packages are meant as a measure to validate the
    originally intended file that was used in the creation of a package is
    the same file that is received at a future date. Since this is used for
    other steps in the process related to the community repository, it
    ensures that the file a user receives is the same file a maintainer
    and a moderator (if applicable), plus any moderation review has
    intended for you to receive with this package. If you are looking at a
    remote source that uses the same url for updates, you will need to
    ensure the package also stays updated in line with those remote
    resource updates. You should look into [automatic packaging](https://chocolatey.org/docs/automatic-packages)
    to help provide that functionality.
    
    **NOTE:** To determine checksums, you can get that from the original
    site if provided. You can also use the [checksum tool available on
    the community feed](https://chocolatey.org/packages/checksum) (`choco install checksum`)
    and use it e.g. `checksum -t sha256 -f path\to\file`. Ensure you
    provide checksums for all remote resources used.
    
    .PARAMETER ChecksumType
    The type of checkum that the file is validated with - valid
    values are 'md5', 'sha1', 'sha256' or 'sha512' - defaults to 'md5'.
    
    MD5 is not recommended as certain organizations need to use FIPS
    compliant algorithms for hashing - see
    https://support.microsoft.com/en-us/kb/811833 for more details.
    
    The recommendation is to use at least SHA256.
    
    .PARAMETER Checksum64
    OPTIONAL if no Url64bit - The checksum hash value of the Url64bit
    resource. This allows a checksum to be validated for files that are not
    local. The checksum type is covered by ChecksumType64.
    
    **NOTE:** Checksums in packages are meant as a measure to validate the
    originally intended file that was used in the creation of a package is
    the same file that is received at a future date. Since this is used for
    other steps in the process related to the community repository, it
    ensures that the file a user receives is the same file a maintainer
    and a moderator (if applicable), plus any moderation review has
    intended for you to receive with this package. If you are looking at a
    remote source that uses the same url for updates, you will need to
    ensure the package also stays updated in line with those remote
    resource updates. You should look into [automatic packaging](https://chocolatey.org/docs/automatic-packages)
    to help provide that functionality.
    
    .PARAMETER ChecksumType64
    OPTIONAL - The type of checkum that the file is validated with - valid
    values are 'md5', 'sha1', 'sha256' or 'sha512' - defaults to
    ChecksumType parameter value.
    
    MD5 is not recommended as certain organizations need to use FIPS
    compliant algorithms for hashing - see
    https://support.microsoft.com/en-us/kb/811833 for more details.
    
    The recommendation is to use at least SHA256.
    
    .PARAMETER Options
    OPTIONAL - Specify custom headers. Available in 0.9.10+.
    
    .PARAMETER File
    Will be used for Url if Url is empty. Available in 0.10.7+.
    
    This parameter provides compatibility, but should not be used directly
    and not with the community package repository until January 2018.
    
    .PARAMETER File64
    Will be used for Url64bit if Url64bit is empty. Available in 0.10.7+.
    
    This parameter provides compatibility, but should not be used directly
    and not with the community package repository until January 2018.
    
    .PARAMETER IgnoredArguments
    Allows splatting with arguments that do not apply. Do not use directly.
    
    .EXAMPLE
    Install-ChocolateyZipPackage -PackageName 'gittfs' -Url 'https://github.com/downloads/spraints/git-tfs/GitTfs-0.11.0.zip' -UnzipLocation $gittfsPath
    
    .EXAMPLE
    >
    Install-ChocolateyZipPackage -PackageName 'sysinternals' `
     -Url 'http://download.sysinternals.com/Files/SysinternalsSuite.zip' `
     -UnzipLocation "$(Split-Path -Parent $MyInvocation.MyCommand.Definition)"
    
    .EXAMPLE
    >
    Install-ChocolateyZipPackage -PackageName 'sysinternals' `
     -Url 'http://download.sysinternals.com/Files/SysinternalsSuite.zip' `
     -UnzipLocation "$(Split-Path -Parent $MyInvocation.MyCommand.Definition)" `
     -Url64 'http://download.sysinternals.com/Files/SysinternalsSuitex64.zip'
    
    .LINK
    Get-ChocolateyWebFile
    
    .LINK
    Get-ChocolateyUnzip
    #>
    param(
      [parameter(Mandatory=$true, Position=0)][string] $packageName,
      [parameter(Mandatory=$false, Position=1)][string] $url = '',
      [parameter(Mandatory=$true, Position=2)]
      [alias("destination")][string] $unzipLocation,
      [parameter(Mandatory=$false, Position=3)]
      [alias("url64")][string] $url64bit = '',
      [parameter(Mandatory=$false)][string] $specificFolder ='',
      [parameter(Mandatory=$false)][string] $checksum = '',
      [parameter(Mandatory=$false)][string] $checksumType = '',
      [parameter(Mandatory=$false)][string] $checksum64 = '',
      [parameter(Mandatory=$false)][string] $checksumType64 = '',
      [parameter(Mandatory=$false)][hashtable] $options = @{Headers=@{}},
      [alias("fileFullPath")][parameter(Mandatory=$false)][string] $file = '',
      [alias("fileFullPath64")][parameter(Mandatory=$false)][string] $file64 = '',
      [parameter(ValueFromRemainingArguments = $true)][Object[]] $ignoredArguments
    )
    
      Write-FunctionCallLogMessage -Invocation $MyInvocation -Parameters $PSBoundParameters
    
      $fileType = 'zip'
    
      $chocTempDir = $env:TEMP
      $tempDir = Join-Path $chocTempDir "$($env:chocolateyPackageName)"
      if ($env:chocolateyPackageVersion -ne $null) { $tempDir = Join-Path $tempDir "$($env:chocolateyPackageVersion)"; }
      $tempDir = $tempDir -replace '\\chocolatey\\chocolatey\\', '\chocolatey\'
      if (![System.IO.Directory]::Exists($tempDir)) { [System.IO.Directory]::CreateDirectory($tempDir) | Out-Null }
      $downloadFilePath = Join-Path $tempDir "$($packageName)Install.$fileType"
    
      if ($url -eq '' -or $url -eq $null) {
        $url = $file
      } 
      if ($url64bit -eq '' -or $url64bit -eq $null) {
        $url64bit = $file64
      }
    
      $filePath = Get-ChocolateyWebFile $packageName $downloadFilePath $url $url64bit -checkSum $checkSum -checksumType $checksumType -checkSum64 $checkSum64 -checksumType64 $checksumType64 -options $options -getOriginalFileName
      Get-ChocolateyUnzip "$filePath" $unzipLocation $specificFolder $packageName
    }
    
    # SIG # Begin signature block
    # MIIcpwYJKoZIhvcNAQcCoIIcmDCCHJQCAQExDzANBglghk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DAGAQH/AgEAMA4GA1UdDwEB/wQEAwIBhjATBgNVHSUEDDAK
    # BggrBgEFBQcDAzB5BggrBgEFBQcBAQRtMGswJAYIKwYBBQUHMAGGGGh0dHA6Ly9v
    # Y3NwLmRpZ2ljZXJ0LmNvbTBDBggrBgEFBQcwAoY3aHR0cDovL2NhY2VydHMuZGln
    # aWNlcnQuY29tL0RpZ2lDZXJ0QXNzdXJlZElEUm9vdENBLmNydDCBgQYDVR0fBHow
    # eDA6oDigNoY0aHR0cDovL2NybDQuZGlnaWNlcnQuY29tL0RpZ2lDZXJ0QXNzdXJl
    # ZElEUm9vdENBLmNybDA6oDigNoY0aHR0cDovL2NybDMuZGlnaWNlcnQuY29tL0Rp
    # Z2lDZXJ0QXNzdXJlZElEUm9vdENBLmNybDBPBgNVHSAESDBGMDgGCmCGSAGG/WwA
    # AgQwKjAoBggrBgEFBQcCARYcaHR0cHM6Ly93d3cuZGlnaWNlcnQuY29tL0NQUzAK
    # BghghkgBhv1sAzAdBgNVHQ4EFgQUWsS5eyoKo6XqcQPAYPkt9mV1DlgwHwYDVR0j
    # BBgwFoAUReuir/SSy4IxLVGLp6chnfNtyA8wDQYJKoZIhvcNAQELBQADggEBAD7s
    # DVoks/Mi0RXILHwlKXaoHV0cLToaxO8wYdd+C2D9wz0PxK+L/e8q3yBVN7Dh9tGS
    # dQ9RtG6ljlriXiSBThCk7j9xjmMOE0ut119EefM2FAaK95xGTlz/kLEbBw6RFfu6
    # r7VRwo0kriTGxycqoSkoGjpxKAI8LpGjwCUR4pwUR6F6aGivm6dcIFzZcbEMj7uo
    # +MUSaJ/PQMtARKUT8OZkDCUIQjKyNookAv4vcn4c10lFluhZHen6dGRrsutmQ9qz
    # sIzV6Q3d9gEgzpkxYz0IGhizgZtPxpMQBvwHgfqL2vmCSfdibqFT+hKUGIUukpHq
    # aGxEMrJmoecYpJpkUe8wggU6MIIEIqADAgECAhAGsBFbtfCQ0/DaDmIsYn1YMA0G
    # CSqGSIb3DQEBCw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6Axhi9odHRwOi8vY3Js
    # NC5kaWdpY2VydC5jb20vc2hhMi1hc3N1cmVkLWNzLWcxLmNybDBMBgNVHSAERTBD
    # MDcGCWCGSAGG/WwDATAqMCgGCCsGAQUFBwIBFhxodHRwczovL3d3dy5kaWdpY2Vy
    # dC5jb20vQ1BTMAgGBmeBDAEEATCBhAYIKwYBBQUHAQEEeDB2MCQGCCsGAQUFBzAB
    # hhhodHRwOi8vb2NzcC5kaWdpY2VydC5jb20wTgYIKwYBBQUHMAKGQmh0dHA6Ly9j
    # YWNlcnRzLmRpZ2ljZXJ0LmNvbS9EaWdpQ2VydFNIQTJBc3N1cmVkSURDb2RlU2ln
    # bmluZ0NBLmNydDAMBgNVHRMBAf8EAjAAMA0GCSqGSIb3DQEBCwUAA4IBAQCLBAE/
    # 2x4amEecDEoy9g+WmWMROiB4GnkPqj+IbiwftmwC5/7yL3/592HOFMJr0qOgUt51
    # moE8SuuLuOGw63c5+/48LJS4jP2XzbVNByRPIxPWorm4t/OzTJNziTowHQ+wLwwI
    # 8U97+8DaHCNL7iLZNEiqbVlpF3j7SMWGgf2BVYADJyxluNzf0ZUO+lXN4gOkM8tl
    # VDc7SjZEKvu6ckAaxXf7NPbCXVL/3+LvdmoLbT3vJlfzeXqduO3oieB10ic3ug5T
    # XtoYmyEk/P3yR3x/TqUlg1x/xaolBxy5TyMeSLcBlYn42fnQL154bvMGwFiCsHWQ
    # wY09I0xpEysOMiy8MIIGajCCBVKgAwIBAgIQAwGaAjr/WLFr1tXq5hfwZjANBgkq
    # hkiG9w0BAQUFADBiMQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5j
    # MRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSEwHwYDVQQDExhEaWdpQ2VydCBB
    # c3N1cmVkIElEIENBLTEwHhcNMTQxMDIyMDAwMDAwWhcNMjQxMDIyMDAwMDAwWjBH
    # MQswCQYDVQQGEwJVUzERMA8GA1UEChMIRGlnaUNlcn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YQByAGUAIABpAG4AYwBvAHIAcABvAHIA
    # YQB0AGUAZAAgAGgAZQByAGUAaQBuACAAYgB5ACAAcgBlAGYAZQByAGUAbgBjAGUA
    # LjALBglghkgBhv1sAxUwHwYDVR0jBBgwFoAUFQASKxOYspkH7R7for5XDStnAs0w
    # HQYDVR0OBBYEFGFaTSS2STKdSip5GoNL9B6Jwcp9MH0GA1UdHwR2MHQwOKA2oDSG
    # Mmh0dHA6Ly9jcmwzLmRpZ2ljZXJ0LmNvbS9EaWdpQ2VydEFzc3VyZWRJRENBLTEu
    # Y3JsMDigNqA0hjJodHRwOi8vY3JsNC5kaWdpY2VydC5jb20vRGlnaUNlcnRBc3N1
    # cmVkSURDQS0xLmNybDB3BggrBgEFBQcBAQRrMGkwJAYIKwYBBQUHMAGGGGh0dHA6
    # Ly9vY3NwLmRpZ2ljZXJ0LmNvbTBBBggrBgEFBQcwAoY1aHR0cDovL2NhY2VydHMu
    # ZGlnaWNlcnQuY29tL0RpZ2lDZXJ0QXNzdXJlZElEQ0EtMS5jcnQwDQYJKoZIhvcN
    # AQEFBQADggEBAJ0lfhszTbImgVybhs4jIA+Ah+WI//+x1GosMe06FxlxF82pG7xa
    # FjkAneNshORaQPveBgGMN/qbsZ0kfv4gpFetW7easGAm6mlXIV00Lx9xsIOUGQVr
    # NZAQoHuXx/Y/5+IRQaa9YtnwJz04HShvOlIJ8OxwYtNiS7Dgc6aSwNOOMdgv420X
    # Ewbu5AO2FKvzj0OncZ0h3RTKFV2SQdr5D4HRmXQNJsQOfxu19aDxxncGKBXp2JPl
    # VRbwuwqrHNtcSCdmyKOLChzlldquxC5ZoGHd2vNtomHpigtt7BIYvfdVVEADkitr
    # wlHCCkivsNRu4PQUCjob4489yq9qjXvc2EQwggbNMIIFtaADAgECAhAG/fkDlgOt
    # 6gAK6z8nu7obMA0GCSqGSIb3DQEBBQUAMGUxCzAJBgNVBAYTAlVTMRUwEwYDVQQK
    # EwxEaWdpQ2VydCBJbmMxGTAXBgNV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dABpAHQAdQB0AGUAcwAgAGEAYwBjAGUAcAB0AGEAbgBjAGUAIABvAGYA
    # IAB0AGgAZQAgAEQAaQBnAGkAQwBlAHIAdAAgAEMAUAAvAEMAUABTACAAYQBuAGQA
    # IAB0AGgAZQAgAFIAZQBsAHkAaQBuAGcAIABQAGEAcgB0AHkAIABBAGcAcgBlAGUA
    # bQBlAG4AdAAgAHcAaABpAGMAaAAgAGwAaQBtAGkAdAAgAGwAaQBhAGIAaQBsAGkA
    # dAB5ACAAYQBuAGQAIABhAHIAZQAgAGkAbgBjAG8AcgBwAG8AcgBhAHQAZQBkACAA
    # aABlAHIAZQBpAG4AIABiAHkAIAByAGUAZgBlAHIAZQBuAGMAZQAuMAsGCWCGSAGG
    # /WwDFTASBgNVHRMBAf8ECDAGAQH/AgEAMHkGCCsGAQUFBwEBBG0wazAkBggrBgEF
    # BQcwAYYYaHR0cDovL29jc3AuZGlnaWNlcnQuY29tMEMGCCsGAQUFBzAChjdodHRw
    # Oi8vY2FjZXJ0cy5kaWdpY2VydC5jb20vRGlnaUNlcnRBc3N1cmVkSURSb290Q0Eu
    # Y3J0MIGBBgNVHR8EejB4MDqgOKA2hjRodHRwOi8vY3JsMy5kaWdpY2VydC5jb20v
    # RGlnaUNlcnRBc3N1cmVkSURSb290Q0EuY3JsMDqgOKA2hjRodHRwOi8vY3JsNC5k
    # aWdpY2VydC5jb20vRGlnaUNlcnRBc3N1cmVkSURSb290Q0EuY3JsMB0GA1UdDgQW
    # BBQVABIrE5iymQftHt+ivlcNK2cCzTAfBgNVHSMEGDAWgBRF66Kv9JLLgjEtUYun
    # pyGd823IDzANBgkqhkiG9w0BAQUFAAOCAQEARlA+ybcoJKc4HbZbKa9Sz1LpMUer
    # Vlx71Q0LQbPv7HUfdDjyslxhopyVw1Dkgrkj0bo6hnKtOHisdV0XFzRyR4WUVtHr
    # uzaEd8wkpfMEGVWp5+Pnq2LN+4stkMLA0rWUvV5PsQXSDj0aqRRbpoYxYqioM+Sb
    #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YDVQQK
    # EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xITAfBgNV
    # BAMTGERpZ2lDZXJ0IEFzc3VyZWQgSUQgQ0EtMQIQAwGaAjr/WLFr1tXq5hfwZjAJ
    # BgUrDgMCGgUAoF0wGAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAcBgkqhkiG9w0B
    # CQUxDxcNMTcwODA3MDAwNDU0WjAjBgkqhkiG9w0BCQQxFgQUW/gpb35FS4bdmGz9
    # sfnPLL6MbjswDQYJKoZIhvcNAQEBBQAEggEARC0n80wLb2iZhTowHF3IUxABJCyM
    # aMimi3ccYW6VUAGPvQZq9JfOKb0Qp9JhGgq9qKmMTjoZ5lH6fcnBruGlV2mFnKMO
    # Rq/a1KztZ/awJ9PqxDv48W2CGPOnG0lGpjDw0MRj9mr95zCLgTJ0E7CutfQFlLgP
    # zQjw7OQvwAOmoXkPilxbF///LP4qlHe025hOwyRkeHGYKXADHZLFuCwiD33nKLe1
    # kLAqCLjJWv1Se/CTVvGhxzwQVZqKP2HEK7o/8I0+PXuaRh9Ej7jjikWfi/UGmTy+
    # t+mi8fv3CvJxmrGHEWcdZYuDcHXMt37AZnKbldyZMp+RX65zhGH7Sik7Mg==
    # SIG # End signature block
    
  • tools\chocolateyInstall\helpers\functions\Install-Vsix.ps1 Show
    # Copyright © 2017 Chocolatey Software, Inc.
    # Copyright © 2015 - 2017 RealDimensions Software, LLC
    # Copyright © 2011 - 2015 RealDimensions Software, LLC & original authors/contributors from https://github.com/chocolatey/chocolatey
    #
    # Licensed under the Apache License, Version 2.0 (the "License");
    # you may not use this file except in compliance with the License.
    # You may obtain a copy of the License at
    #
    #     http://www.apache.org/licenses/LICENSE-2.0
    #
    # Unless required by applicable law or agreed to in writing, software
    # distributed under the License is distributed on an "AS IS" BASIS,
    # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    # See the License for the specific language governing permissions and
    # limitations under the License.
    
    function Install-Vsix {
    <#
    .SYNOPSIS
    DO NOT USE. Not part of the public API.
    
    .DESCRIPTION
    Installs a VSIX package into a particular version of Visual Studio.
    
    .NOTES
    This is not part of the public API. Please use
    Install-ChocolateyVsixPackage instead.
    
    .INPUTS
    None
    
    .OUTPUTS
    None
    
    .PARAMETER Installer
    The path to the VSIX installer
    
    .PARAMETER InstallFile
    The VSIX file that is being installed.
    
    .PARAMETER IgnoredArguments
    Allows splatting with arguments that do not apply. Do not use directly.
    
    .LINK
    Install-ChocolateyVsixPackage
    #>
    param (
      [parameter(Mandatory=$true, Position=0)][string] $installer,
      [parameter(Mandatory=$true, Position=1)][string] $installFile,
      [parameter(ValueFromRemainingArguments = $true)][Object[]] $ignoredArguments
    )
    
      Write-FunctionCallLogMessage -Invocation $MyInvocation -Parameters $PSBoundParameters
    
      if ($env:chocolateyPackageName -ne $null -and $env:chocolateyPackageName -eq $env:ChocolateyInstallDirectoryPackage) {
        Write-Warning "Install Directory override not available for VSIX packages."
      }
    
      Write-Host "Installing $installFile using $installer"
      $psi = New-Object System.Diagnostics.ProcessStartInfo
      $psi.FileName=$installer
      $psi.Arguments="/q $installFile"
      $s = [System.Diagnostics.Process]::Start($psi)
      $s.WaitForExit()
    
      return $s.ExitCode
    }
    
    # SIG # Begin signature block
    # MIIcpwYJKoZIhvcNAQcCoIIcmDCCHJQCAQExDzANBglghkgBZQMEAgEFADB5Bgor
    # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
    # KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCDJrKHaCJ8GP289
    # DJQ4kXlB8ihdRU8en4q/CDpcNkuRhaCCF7EwggUwMIIEGKADAgECAhAECRgbX9W7
    # ZnVTQ7VvlVAIMA0GCSqGSIb3DQEBCwUAMGUxCzAJBgNVBAYTAlVTMRUwEwYDVQQK
    # EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3d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ydFNIQTJBc3N1cmVkSURDb2RlU2ln
    # bmluZ0NBLmNydDAMBgNVHRMBAf8EAjAAMA0GCSqGSIb3DQEBCwUAA4IBAQCLBAE/
    # 2x4amEecDEoy9g+WmWMROiB4GnkPqj+IbiwftmwC5/7yL3/592HOFMJr0qOgUt51
    # moE8SuuLuOGw63c5+/48LJS4jP2XzbVNByRPIxPWorm4t/OzTJNziTowHQ+wLwwI
    # 8U97+8DaHCNL7iLZNEiqbVlpF3j7SMWGgf2BVYADJyxluNzf0ZUO+lXN4gOkM8tl
    # VDc7SjZEKvu6ckAaxXf7NPbCXVL/3+LvdmoLbT3vJlfzeXqduO3oieB10ic3ug5T
    # XtoYmyEk/P3yR3x/TqUlg1x/xaolBxy5TyMeSLcBlYn42fnQL154bvMGwFiCsHWQ
    # wY09I0xpEysOMiy8MIIGajCCBVKgAwIBAgIQAwGaAjr/WLFr1tXq5hfwZjANBgkq
    # hkiG9w0BAQUFADBiMQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5j
    # MRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSEwHwYDVQQDExhEaWdpQ2VydCBB
    # c3N1cmVkIElEIENBLTEwHhcNMTQxMDIyMDAwMDAwWhcNMjQxMDIyMDAwMDAwWjBH
    # MQswCQYDVQQGEwJVUzERMA8GA1UEChMIRGlnaUNlcnQxJTAjBgNVBAMTHERpZ2lD
    # ZXJ0IFRpbWVzdGFtcCBSZXNwb25kZXIwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAw
    # ggEKAoIBAQCjZF38fLPggjXg4PbGKuZJdTvMbuBTqZ8fZFnmfGt/a4ydVfiS457V
    # WmNbAklQ2YPOb2bu3cuF6V+l+dSHdIhEOxnJ5fWRn8YUOawk6qhLLJGJzF4o9GS2
    # ULf1ErNzlgpno75hn67z/RJ4dQ6mWxT9RSOOhkRVfRiGBYxVh3lIRvfKDo2n3k5f
    # 4qi2LVkCYYhhchhoubh87ubnNC8xd4EwH7s2AY3vJ+P3mvBMMWSN4+v6GYeofs/s
    # jAw2W3rBerh4x8kGLkYQyI3oBGDbvHN0+k7Y/qpA8bLOcEaD6dpAoVk62RUJV5lW
    # MJPzyWHM0AjMa+xiQpGsAsDvpPCJEY93AgMBAAGjggM1MIIDMTAOBgNVHQ8BAf8E
    # BAMCB4AwDAYDVR0TAQH/BAIwADAWBgNVHSUBAf8EDDAKBggrBgEFBQcDCDCCAb8G
    # A1UdIASCAbYwggGyMIIBoQYJYIZIAYb9bAcBMIIBkjAoBggrBgEFBQcCARYcaHR0
    # cHM6Ly93d3cuZGlnaWNlcnQuY29tL0NQUzCCAWQGCCsGAQUFBwICMIIBVh6CAVIA
    # QQBuAHkAIAB1AHMAZQAgAG8AZgAgAHQAaABpAHMAIABDAGUAcgB0AGkAZgBpAGMA
    # YQB0AGUAIABjAG8AbgBzAHQAaQB0AHUAdABlAHMAIABhAGMAYwBlAHAAdABhAG4A
    # YwBlACAAbwBmACAAdABoAGUAIABEAGkAZwBpAEMAZQByAHQAIABDAFAALwBDAFAA
    # UwAgAGEAbgBkACAAdABoAGUAIABSAGUAbAB5AGkAbgBnACAAUABhAHIAdAB5ACAA
    # QQBnAHIAZQBlAG0AZQBuAHQAIAB3AGgAaQBjAGgAIABsAGkAbQBpAHQAIABsAGkA
    # YQBiAGkAbABpAHQAeQAgAGEAbgBkACAAYQByAGUAIABpAG4AYwBvAHIAcABvAHIA
    # YQB0AGUAZAAgAGgAZQByAGUAaQBuACAAYgB5ACAAcgBlAGYAZQByAGUAbgBjAGUA
    # LjALBglghkgBhv1sAxUwHwYDVR0jBBgwFoAUFQASKxOYspkH7R7for5XDStnAs0w
    # HQYDVR0OBBYEFGFaTSS2STKdSip5GoNL9B6Jwcp9MH0GA1UdHwR2MHQwOKA2oDSG
    # Mmh0dHA6Ly9jcmwzLmRpZ2ljZXJ0LmNvbS9EaWdpQ2VydEFzc3VyZWRJRENBLTEu
    # Y3JsMDigNqA0hjJodHRwOi8vY3J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LFHafwtXZd7DNI0UGDoT7O1Hx
    # 3aAYC7/STtghkQ2I5OohuWEGWiAYyq8PVWnwXiNFBTMvtxpN1gIvtsAO7QSIfscX
    # ziLua2vOg9mufcikMnWTLMPqtwUUXc2y4ZPJssZ2mY6n7lkeYUBngl/nhtXBLtjO
    # YSYAAtT6IzOwdUIMmvfWiuAD5LbvEXW2Bhd4ZDKvIUlbuFh7fcMvUtIiqhWyoGzG
    # x0E7O58/55Xt3JT5RTNO9QS0hdiJ+PzB3WO5d8ebfgk484Ms7IRAoqQXshEX30jX
    # rFfM/7sUKLzPTGd8cC0KkbFZKRIzgn8Rjdl8IDgYQG5vX6cFoDQQaJ8lDw==
    # SIG # End signature block
    
  • tools\chocolateyInstall\helpers\functions\Set-EnvironmentVariable.ps1 Show
    # Copyright © 2017 Chocolatey Software, Inc.
    # Copyright © 2015 - 2017 RealDimensions Software, LLC
    # Copyright © 2011 - 2015 RealDimensions Software, LLC & original authors/contributors from https://github.com/chocolatey/chocolatey
    #
    # Licensed under the Apache License, Version 2.0 (the "License");
    # you may not use this file except in compliance with the License.
    # You may obtain a copy of the License at
    #
    #     http://www.apache.org/licenses/LICENSE-2.0
    #
    # Unless required by applicable law or agreed to in writing, software
    # distributed under the License is distributed on an "AS IS" BASIS,
    # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    # See the License for the specific language governing permissions and
    # limitations under the License.
    
    function Set-EnvironmentVariable {
    <#
    .SYNOPSIS
    **NOTE:** Administrative Access Required when `-Scope 'Machine'.`
    
    DO NOT USE. Not part of the public API. Use
    `Install-ChocolateyEnvironmentVariable` instead.
    
    
    .DESCRIPTION
    Saves an environment variable.
    
    .NOTES
    This command will assert UAC/Admin privileges on the machine if
    `-Scope 'Machine'`.
    
    .INPUTS
    None
    
    .OUTPUTS
    None
    
    .PARAMETER Name
    
    .PARAMETER Value
    
    .PARAMETER IgnoredArguments
    Allows splatting with arguments that do not apply. Do not use directly.
    
    .LINK
    Install-ChocolateyEnvironmentVariable
    
    .LINK
    Uninstall-ChocolateyEnvironmentVariable
    
    .LINK
    Install-ChocolateyPath
    
    .LINK
    Get-EnvironmentVariable
    #>
    param (
      [parameter(Mandatory=$true, Position=0)][string] $Name,
      [parameter(Mandatory=$false, Position=1)][string] $Value,
      [parameter(Mandatory=$false, Position=2)]
      [System.EnvironmentVariableTarget] $Scope,
      [parameter(ValueFromRemainingArguments = $true)][Object[]] $ignoredArguments
    )
    
      Write-FunctionCallLogMessage -Invocation $MyInvocation -Parameters $PSBoundParameters
    
      if ($Scope -eq [System.EnvironmentVariableTarget]::Process -or $Value -eq $null -or $Value -eq '') {
        return [Environment]::SetEnvironmentVariable($Name, $Value, $Scope)
      }
    
      [string]$keyHive = 'HKEY_LOCAL_MACHINE'
      [string]$registryKey = "SYSTEM\CurrentControlSet\Control\Session Manager\Environment\"
      [Microsoft.Win32.RegistryKey] $win32RegistryKey = [Microsoft.Win32.Registry]::LocalMachine.OpenSubKey($registryKey)
      if ($Scope -eq [System.EnvironmentVariableTarget]::User) {
        $keyHive = 'HKEY_CURRENT_USER'
        $registryKey = "Environment"
        [Microsoft.Win32.RegistryKey] $win32RegistryKey = [Microsoft.Win32.Registry]::CurrentUser.OpenSubKey($registryKey)
      }
    
      [Microsoft.Win32.RegistryValueKind]$registryType = [Microsoft.Win32.RegistryValueKind]::String
      try {
        if ($win32RegistryKey.GetValueNames() -contains $Name)
        {
          $registryType = $win32RegistryKey.GetValueKind($Name)
        }
      } catch {
        # the value doesn't yet exist
        # move along, nothing to see here
      }
      Write-Debug "Registry type for $Name is/will be $registryType"
    
      if ($Name -eq 'PATH') {
        $registryType = [Microsoft.Win32.RegistryValueKind]::ExpandString
      }
    
      [Microsoft.Win32.Registry]::SetValue($keyHive + "\" + $registryKey, $Name, $Value, $registryType)
    
      try {
        # make everything refresh
        # because sometimes explorer.exe just doesn't get the message that things were updated.
        if (-not ("win32.nativemethods" -as [type])) {
            # import sendmessagetimeout from win32
            add-type -Namespace Win32 -Name NativeMethods -MemberDefinition @"
    [DllImport("user32.dll", SetLastError = true, CharSet = CharSet.Auto)]
    public static extern IntPtr SendMessageTimeout(
        IntPtr hWnd, uint Msg, UIntPtr wParam, string lParam,
        uint fuFlags, uint uTimeout, out UIntPtr lpdwResult);
    "@
        }
    
        $HWND_BROADCAST = [intptr]0xffff;
        $WM_SETTINGCHANGE = 0x1a;
        $result = [uintptr]::zero
    
        # notify all windows of environment block change
        [win32.nativemethods]::SendMessageTimeout($HWND_BROADCAST, $WM_SETTINGCHANGE,  [uintptr]::Zero, "Environment", 2, 5000, [ref]$result) | Out-Null
    
        # Set a user environment variable making the system refresh
        $setx = "$($env:SystemRoot)\System32\setx.exe"
        & "$setx" ChocolateyLastPathUpdate `"$(Get-Date -UFormat %c)`" | Out-Null
      } catch {
        Write-Warning "Failure attempting to let Explorer know about updated environment settings.`n  $($_.Exception.Message)"
      }
    
      Update-SessionEnvironment
    }
    
    # SIG # Begin signature block
    # MIIcpwYJKoZIhvcNAQcCoIIcmDCCHJQCAQExDzANBglghkgBZQMEAgEFADB5Bgor
    # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
    # KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCBH23Z11PFz0HSi
    # Wop08SgJ3iDIoginQvD/Q9zspJN7IqCCF7EwggUwMIIEGKADAgECAhAECRgbX9W7
    # ZnVTQ7VvlVAIMA0GCSqGSIb3DQEBCwUAMGUxCzAJBgNVBAYTAlVTMRUwEwYDVQQK
    # EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xJDAiBgNV
    # BAMTG0RpZ2lDZXJ0IEFzc3VyZWQgSUQgUm9vdCBDQTAeFw0xMzEwMjIxMjAwMDBa
    # Fw0yODEwMjIxMjAwMDBaMHIxCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2Vy
    # dCBJbm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CB4AwDAYDVR0TAQH/BAIwADAWBgNVHSUBAf8EDDAKBggrBgEFBQcDCDCCAb8G
    # A1UdIASCAbYwggGyMIIBoQYJYIZIAYb9bAcBMIIBkjAoBggrBgEFBQcCARYcaHR0
    # cHM6Ly93d3cuZGlnaWNlcnQuY29tL0NQUzCCAWQGCCsGAQUFBwICMIIBVh6CAVIA
    # QQBuAHkAIAB1AHMAZQAgAG8AZgAgAHQAaABpAHMAIABDAGUAcgB0AGkAZgBpAGMA
    # YQB0AGUAIABjAG8AbgBzAHQAaQB0AHUAdABlAHMAIABhAGMAYwBlAHAAdABhAG4A
    # YwBlACAAbwBmACAAdABoAGUAIABEAGkAZwBpAEMAZQByAHQAIABDAFAALwBDAFAA
    # UwAgAGEAbgBkACAAdABoAGUAIABSAGUAbAB5AGkAbgBnACAAUABhAHIAdAB5ACAA
    # QQBnAHIAZQBlAG0AZQBuAHQAIAB3AGgAaQBjAGgAIABsAGkAbQBpAHQAIABsAGkA
    # YQBiAGkAbABpAHQAeQAgAGEAbgBkACAAYQByAGUAIABpAG4AYwBvAHIAcABvAHIA
    # YQB0AGUAZAAgAGgAZQByAGUAaQBuACAAYgB5ACAAcgBlAGYAZQByAGUAbgBjAGUA
    # LjALBglghkgBhv1sAxUwHwYDVR0jBBgwFoAUFQASKxOYspkH7R7for5XDStnAs0w
    # HQYDVR0OBBYEFGFaTSS2STKdSip5GoNL9B6Jwcp9MH0GA1UdHwR2MHQwOKA2oDSG
    # Mmh0dHA6Ly9jcmwzLmRpZ2ljZXJ0LmNvbS9EaWdpQ2VydEFzc3VyZWRJRENBLTEu
    # Y3JsMDigNqA0hjJodHRwOi8vY3JsNC5kaWdpY2VydC5jb20vRGlnaUNlcnRBc3N1
    # cmVkSURDQS0xLmNybDB3BggrBgEFBQcBAQRrMGkwJAYIKwYBBQUHMAGGGGh0dHA6
    # Ly9vY3NwLmRpZ2ljZXJ0LmNvbTBBBggrBgEFBQcwAoY1aHR0cDovL2NhY2VydHMu
    # ZG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iYJqTnVabEZ3HxLwtQuRaFnW0tdqrEcXvrweGetea93yizH0PzGKxAzDVf
    # utSp3wUy08hmawwK6sIPmVQ0xquJ/plTJExdUxCelu3K194d1zMObSTM9RMfvEpF
    # AMZceOaTkZsGYjH4V4uu8+VxEe5W1MNEJvxVYzJKANbx2kj5rOuIZqFgxQ==
    # SIG # End signature block
    
  • tools\chocolateyInstall\helpers\functions\Set-PowerShellExitCode.ps1 Show
    # Copyright © 2017 Chocolatey Software, Inc.
    # Copyright © 2011 - 2017 RealDimensions Software, LLC
    #
    # Licensed under the Apache License, Version 2.0 (the "License");
    # you may not use this file except in compliance with the License.
    #
    # You may obtain a copy of the License at
    #
    #   http://www.apache.org/licenses/LICENSE-2.0
    #
    # Unless required by applicable law or agreed to in writing, software
    # distributed under the License is distributed on an "AS IS" BASIS,
    # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    # See the License for the specific language governing permissions and
    # limitations under the License.
    
    Function Set-PowerShellExitCode {
    <#
    .SYNOPSIS
    Sets the exit code for the PowerShell scripts.
    
    .DESCRIPTION
    Sets the exit code as an environment variable that is checked and used
    as the exit code for the package at the end of the package script.
    
    .NOTES
    This tells PowerShell that it should prepare to shut down.
    
    .INPUTS
    None
    
    .OUTPUTS
    None
    
    .PARAMETER ExitCode
    The exit code to set.
    
    .PARAMETER IgnoredArguments
    Allows splatting with arguments that do not apply. Do not use directly.
    
    .EXAMPLE
    Set-PowerShellExitCode 3010
    #>
    param (
      [parameter(Mandatory=$false, Position=0)][int] $exitCode,
      [parameter(ValueFromRemainingArguments = $true)][Object[]] $ignoredArguments
    )
    
      # Do not log function call - can mess things up
    
      if ($exitCode -eq $null -or $exitCode -eq '') {
        Write-Debug '$exitCode was passed null'
        return
      }
    
      try {
        $host.SetShouldExit($exitCode);
      } catch {
        Write-Warning "Unable to set host exit code"
      }
    
      $env:ChocolateyExitCode = $exitCode;
    }
    
    # SIG # Begin signature block
    # MIIcpwYJKoZIhvcNAQcCoII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IB
    # yTASBgNVHRMBAf8ECDAGAQH/AgEAMA4GA1UdDwEB/wQEAwIBhjATBgNVHSUEDDAK
    # BggrBgEFBQcDAzB5BggrBgEFBQcBAQRtMGswJAYIKwYBBQUHMAGGGGh0dHA6Ly9v
    # Y3NwLmRpZ2ljZXJ0LmNvbTBDBggrBgEFBQcwAoY3aHR0cDovL2NhY2VydHMuZGln
    # aWNlcnQuY29tL0RpZ2lDZXJ0QXNzdXJlZElEUm9vdENBLmNydDCBgQYDVR0fBHow
    # eDA6oDigNoY0aHR0cDovL2NybDQuZGlnaWNlcnQuY29tL0RpZ2lDZXJ0QXNzdXJl
    # ZElEUm9vdENBLmNybDA6oDigNoY0aHR0cDovL2NybDMuZGlnaWNlcnQuY29tL0Rp
    # Z2lDZXJ0QXNzdXJlZElEUm9vdENBLmNybDBPBgNVHSAESDBGMDgGCmCGSAGG/WwA
    # AgQwKjAoBggrBgEFBQcCARYcaHR0cHM6Ly93d3cuZGlnaWNlcnQuY29tL0NQUzAK
    # BghghkgBhv1sAzAdBgNVHQ4EFgQUWsS5eyoKo6XqcQPAYPkt9mV1DlgwHwYDVR0j
    # BBgwFoAUReuir/SSy4IxLVGLp6chnfNtyA8wDQYJKoZIhvcNAQELBQADggEBAD7s
    # DVoks/Mi0RXILHwlKXaoHV0cLToaxO8wYdd+C2D9wz0PxK+L/e8q3yBVN7Dh9tGS
    # dQ9RtG6ljlriXiSBThCk7j9xjmMOE0ut119EefM2FAaK95xGTlz/kLEbBw6RFfu6
    # r7VRwo0kriTGxycqoSkoGjpxKAI8LpGjwCUR4pwUR6F6aGivm6dcIFzZcbEMj7uo
    # +MUSaJ/PQMtARKUT8OZkDCUIQjKyNookAv4vcn4c10lFluhZHen6dGRrsutmQ9qz
    # sIzV6Q3d9gEgzpkxYz0IGhizgZtPxpMQBvwHgfqL2vmCSfdibqFT+hKUGIUukpHq
    # aGxEMrJmoecYpJpkUe8wggU6MIIEIqADAgECAhAGsBFbtfCQ0/DaDmIsYn1Y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ZWQtY3MtZzEuY3JsMDWgM6Axhi9odHRwOi8vY3Js
    # NC5kaWdpY2VydC5jb20vc2hhMi1hc3N1cmVkLWNzLWcxLmNybDBMBgNVHSAERTBD
    # MDcGCWCGSAGG/WwDATAqMCgGCCsGAQUFBwIBFhxodHRwczovL3d3dy5kaWdpY2Vy
    # dC5jb20vQ1BTMAgGBmeBDAEEATCBhAYIKwYBBQUHAQEEeDB2MCQGCCsGAQUFBzAB
    # hhhodHRwOi8vb2NzcC5kaWdpY2VydC5jb20wTgYIKwYBBQUHMAKGQmh0dHA6Ly9j
    # YWNlcnRzLmRpZ2ljZXJ0LmNvbS9EaWdpQ2VydFNIQTJBc3N1cmVkSURDb2RlU2ln
    # bmluZ0NBLmNydDAMBgNVHRMBAf8EAjAAMA0GCSqGSIb3DQEBCwUAA4IBAQCLBAE/
    # 2x4amEecDEoy9g+WmWMROiB4GnkPqj+IbiwftmwC5/7yL3/592HOFMJr0qOgUt51
    # moE8SuuLuOGw63c5+/48LJS4jP2XzbVNByRPIxPWorm4t/OzTJNziTowHQ+wLwwI
    # 8U97+8DaHCNL7iLZNEiqbVlpF3j7SMWGgf2BVYADJyxluNzf0ZUO+lXN4gOkM8tl
    # VDc7SjZEKvu6ckAaxXf7NPbCXVL/3+LvdmoLbT3vJlfzeXqduO3oieB10ic3ug5T
    # XtoYmyEk/P3yR3x/TqUlg1x/xaolBxy5TyMeSLcBlYn42fnQL154bvMGwFiCsHWQ
    # wY09I0xpEysOMiy8MIIGajCCBVKgAwIBAgIQAwGaAjr/WLFr1tXq5hfwZjANBgkq
    # hkiG9w0BAQUFADBiMQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5j
    # MRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSEwHwYDVQQDExhEaWdpQ2VydCBB
    # c3N1cmVkIElEIENBLTEwHhcNMTQxMDIyMDAwMDAwWhcNMjQxMDIyMDAwMDAwWjBH
    # MQswCQYDVQQGEwJVUzER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ABpAHQAeQAgAGEAbgBkACAAYQByAGUAIABpAG4AYwBvAHIAcABvAHIA
    # YQB0AGUAZAAgAGgAZQByAGUAaQBuACAAYgB5ACAAcgBlAGYAZQByAGUAbgBjAGUA
    # LjALBglghkgBhv1sAxUwHwYDVR0jBBgwFoAUFQASKxOYspkH7R7for5XDStnAs0w
    # HQYDVR0OBBYEFGFaTSS2STKdSip5GoNL9B6Jwcp9MH0GA1UdHwR2MHQwOKA2oDSG
    # Mmh0dHA6Ly9jcmwzLmRpZ2ljZXJ0LmNvbS9EaWdpQ2VydEFzc3VyZWRJRENBLTEu
    # Y3JsMDigNqA0hjJodHRwOi8vY3JsNC5kaWdpY2VydC5jb20vRGlnaUNlcnRBc3N1
    # cmVkSURDQS0xLmNybDB3BggrBgEFBQcBAQRrMGkwJAYIKwYBBQUHMAGGGGh0dHA6
    # Ly9vY3NwLmRpZ2ljZXJ0LmNvbTBBBggrBgEFBQcwAoY1aHR0cDovL2NhY2VydHMu
    # ZGlnaWNlcnQuY29tL0RpZ2lDZXJ0QXNzdXJlZElEQ0EtMS5jcnQwDQYJKoZIhvcN
    # AQEFBQADggEBAJ0lfhszTbImgVybhs4jIA+Ah+WI//+x1GosMe06FxlxF82pG7xa
    # FjkAneNshORaQPveBgGMN/qbsZ0kfv4gpFetW7easGAm6mlXIV00Lx9xsIOUGQVr
    # NZAQoHuXx/Y/5+IRQaa9YtnwJz04HShvOlIJ8OxwYtNiS7Dgc6aSwNOOMdgv420X
    # Ewbu5AO2FKvzj0OncZ0h3RTKFV2SQdr5D4HRmXQNJsQOfxu19aDxxncGKBXp2JPl
    # VRbwuwqrHNtcSCdmyKOLChzlldquxC5ZoGHd2vNtomHpigtt7BIYvfdVVEADkitr
    # wlHCCkivsNRu4PQUCjob4489yq9qjXvc2EQwggbNMIIFtaADAgECAhAG/fkDlgOt
    # 6gAK6z8nu7obMA0GCSqGSIb3DQEBBQUAMGUxCzAJBgNVBAYTAlVTMRUwEwYDVQQK
    # EwxEaWd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QAZQAgAGMA
    # bwBuAHMAdABpAHQAdQB0AGUAcwAgAGEAYwBjAGUAcAB0AGEAbgBjAGUAIABvAGYA
    # IAB0AGgAZQAgAEQAaQBnAGkAQwBlAHIAdAAgAEMAUAAvAEMAUABTACAAYQBuAGQA
    # IAB0AGgAZQAgAFIAZQBsAHkAaQBuAGcAIABQAGEAcgB0AHkAIABBAGcAcgBlAGUA
    # bQBlAG4AdAAgAHcAaABpAGMAaAAgAGwAaQBtAGkAdAAgAGwAaQBhAGIAaQBsAGkA
    # dAB5ACAAYQBuAGQAIABhAHIAZQAgAGkAbgBjAG8AcgBwAG8AcgBhAHQAZQBkACAA
    # aABlAHIAZQBpAG4AIABiAHkAIAByAGUAZgBlAHIAZQBuAGMAZQAuMAsGCWCGSAGG
    # /WwDFTASBgNVHRMBAf8ECDAGAQH/AgEAMHkGCCsGAQUFBwEBBG0wazAkBggrBgEF
    # BQcwAYYYaHR0cDovL29jc3AuZGlnaWNlcnQuY29tMEMGCCsGAQUFBzAChjdodHRw
    # Oi8vY2FjZXJ0cy5kaWdpY2VydC5jb20vRGlnaUNlcnRBc3N1cmVkSURSb290Q0Eu
    # Y3J0MIGBBgNVHR8EejB4MDqgOKA2hjRodHRwOi8vY3JsMy5kaWdpY2VydC5jb20v
    # RGlnaUNlcnRBc3N1cmVkSURSb290Q0EuY3JsMDqgOKA2hjRodHRwOi8vY3JsNC5k
    # aWdpY2VydC5jb20vRGlnaUNlcnRBc3N1cmVkSURSb290Q0EuY3JsMB0GA1UdDgQW
    # BBQVABIrE5iymQftHt+ivlcNK2cCzTAfBgNVHSMEGDAWgBRF66Kv9JLLgjEtUYun
    # pyGd823IDzANBgkqhkiG9w0BAQUFAAOCAQEARlA+ybcoJKc4HbZbKa9Sz1LpMUer
    # Vlx71Q0LQbPv7HUfdDjyslxhopyVw1Dkgrkj0bo6hnKtOHisdV0XFzRyR4WUVtHr
    # uzaEd8wkpfMEGVWp5+Pnq2LN+4stkMLA0rWUvV5PsQXSDj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BATB2MGIxCzAJBgNVBAYTAlVTMRUwEwYDVQQK
    # EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xITAfBgNV
    # BAMTGERpZ2lDZXJ0IEFzc3VyZWQgSUQgQ0EtMQIQAwGaAjr/WLFr1tXq5hfwZjAJ
    # BgUrDgMCGgUAoF0wGAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAcBgkqhkiG9w0B
    # CQUxDxcNMTcwODA3MDAwNDU1WjAjBgkqhkiG9w0BCQQxFgQUgqM3KR+Zoj2a1XZr
    # F3aGT+MFOrwwDQYJKoZIhvcNAQEBBQAEggEAXVsHxK17faSP8ACRt+cYD6FS7ah+
    # FEkj8cJkGi3eWVe4tJ4RCCa8pI3IhNdYItRQcKPc347Pw2CfXxMp2BFH5/ZaO7gr
    # M8cbtosjVnIFHHwIo+15ayZozuheM3URvkHMlkSQZFOOS3k4PsUT2MxrX1TLrSri
    # Fnc5iRh6l5voMv+PKqOq++vfQu6dvkUpcnwTkMolNQ/W3kVacAHrm+emtsSnC63n
    # kY1I2Pn5gyiGMRs1+Z/pq8GDocXxKsuu0JOwKMr9y1xcx6VncO5ojl8jhxDquOWO
    # xbLXZsOX+uxuUlh/YeKnuVVi9mblgVlPzZz2EuqeKDpZdLX864hyLqmyDw==
    # SIG # End signature block
    
  • tools\chocolateyInstall\helpers\functions\Start-ChocolateyProcessAsAdmin.ps1 Show
    # Copyright © 2017 Chocolatey Software, Inc.
    # Copyright © 2015 - 2017 RealDimensions Software, LLC
    # Copyright © 2011 - 2015 RealDimensions Software, LLC & original authors/contributors from https://github.com/chocolatey/chocolatey
    #
    # Licensed under the Apache License, Version 2.0 (the "License");
    # you may not use this file except in compliance with the License.
    # You may obtain a copy of the License at
    #
    #     http://www.apache.org/licenses/LICENSE-2.0
    #
    # Unless required by applicable law or agreed to in writing, software
    # distributed under the License is distributed on an "AS IS" BASIS,
    # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    # See the License for the specific language governing permissions and
    # limitations under the License.
    
    function Start-ChocolateyProcessAsAdmin {
    <#
    .SYNOPSIS
    **NOTE:** Administrative Access Required.
    
    Runs a process with administrative privileges. If `-ExeToRun` is not
    specified, it is run with PowerShell.
    
    .NOTES
    This command will assert UAC/Admin privileges on the machine.
    
    Starting in 0.9.10, will automatically call Set-PowerShellExitCode to
    set the package exit code in the following ways:
    
    - 4 if the binary turns out to be a text file.
    - The same exit code returned from the process that is run. If a 3010 is returned, it will set 3010 for the package.
    
    Aliases `Start-ChocolateyProcess` and `Invoke-ChocolateyProcess`
    available in 0.10.2+.
    
    .INPUTS
    None
    
    .OUTPUTS
    None
    
    .PARAMETER Statements
    Arguments to pass to `ExeToRun` or the PowerShell script block to be
    run.
    
    .PARAMETER ExeToRun
    The executable/application/installer to run. Defaults to `'powershell'`.
    
    .PARAMETER Elevated
    Indicate whether the process should run elevated.
    
    Available in 0.10.2+.
    
    .PARAMETER Minimized
    Switch indicating if a Windows pops up (if not called with a silent
    argument) that it should be minimized.
    
    .PARAMETER NoSleep
    Used only when calling PowerShell - indicates the window that is opened
    should return instantly when it is complete.
    
    .PARAMETER ValidExitCodes
    Array of exit codes indicating success. Defaults to `@(0)`.
    
    .PARAMETER WorkingDirectory
    The working directory for the running process. Defaults to
    `Get-Location`.
    
    Available in 0.10.1+.
    
    .PARAMETER SensitiveStatements
    Arguments to pass to  `ExeToRun` that are not logged.
    
    Note that only licensed versions of Chocolatey provide a way to pass
    those values completely through without having them in the install
    script or on the system in some way.
    
    Available in 0.10.1+.
    
    .PARAMETER IgnoredArguments
    Allows splatting with arguments that do not apply. Do not use directly.
    
    .EXAMPLE
    Start-ChocolateyProcessAsAdmin -Statements "$msiArgs" -ExeToRun 'msiexec'
    
    .EXAMPLE
    Start-ChocolateyProcessAsAdmin -Statements "$silentArgs" -ExeToRun $file
    
    .EXAMPLE
    Start-ChocolateyProcessAsAdmin -Statements "$silentArgs" -ExeToRun $file -ValidExitCodes @(0,21)
    
    .EXAMPLE
    >
    # Run PowerShell statements
    $psFile = Join-Path "$(Split-Path -parent $MyInvocation.MyCommand.Definition)" 'someInstall.ps1'
    Start-ChocolateyProcessAsAdmin "& `'$psFile`'"
    
    .EXAMPLE
    # This also works for cmd and is required if you have any spaces in the paths within your command
    $appPath = "$env:ProgramFiles\myapp"
    $cmdBatch = "/c `"$appPath\bin\installmyappservice.bat`""
    Start-ChocolateyProcessAsAdmin $cmdBatch cmd 
    # or more explicitly
    Start-ChocolateyProcessAsAdmin -Statements $cmdBatch -ExeToRun "cmd.exe"
    
    .LINK
    Install-ChocolateyPackage
    
    .LINK
    Install-ChocolateyInstallPackage
    #>
    param(
      [parameter(Mandatory=$false, Position=0)][string[]] $statements,
      [parameter(Mandatory=$false, Position=1)][string] $exeToRun = 'powershell',
      [parameter(Mandatory=$false)][switch] $elevated = $true,
      [parameter(Mandatory=$false)][switch] $minimized,
      [parameter(Mandatory=$false)][switch] $noSleep,
      [parameter(Mandatory=$false)] $validExitCodes = @(0),
      [parameter(Mandatory=$false)][string] $workingDirectory = $(Get-Location),
      [parameter(Mandatory=$false)][string] $sensitiveStatements = '',
      [parameter(ValueFromRemainingArguments = $true)][Object[]] $ignoredArguments
    )
      [string]$statements = $statements -join ' '
    
      Write-FunctionCallLogMessage -Invocation $MyInvocation -Parameters $PSBoundParameters
    
      $alreadyElevated = $false
      if (Test-ProcessAdminRights) {
        $alreadyElevated = $true  
      }
    
      $dbMessagePrepend = "Elevating permissions and running"
      if (!$elevated) {
        $dbMessagePrepend = "Running"
      }
    
      try {
        if ($exeToRun -ne $null) { $exeToRun = $exeToRun -replace "`0", "" }
        if ($statements -ne $null) { $statements = $statements -replace "`0", "" }
      } catch {
        Write-Debug "Removing null characters resulted in an error - $($_.Exception.Message)"
      }
    
      if ($exeToRun -ne $null) {
        $exeToRun = $exeToRun.Trim().Trim("'").Trim('"')
      }
    
      $wrappedStatements = $statements
      if ($wrappedStatements -eq $null) { $wrappedStatements = ''}
    
      if ($exeToRun -eq 'powershell') {
        $exeToRun = "$($env:SystemRoot)\System32\WindowsPowerShell\v1.0\powershell.exe"
        $importChocolateyHelpers = "& import-module -name '$helpersPath\chocolateyInstaller.psm1' -Verbose:`$false | Out-Null;"
        $block = @"
          `$noSleep = `$$noSleep
          #`$env:ChocolateyEnvironmentDebug='false'
          #`$env:ChocolateyEnvironmentVerbose='false'
          $importChocolateyHelpers
          try{
            `$progressPreference="SilentlyContinue"
            $statements
            if(!`$noSleep){start-sleep 6}
          }
          catch{
            if(!`$noSleep){start-sleep 8}
            throw
          }
    "@
        $encoded = [Convert]::ToBase64String([System.Text.Encoding]::Unicode.GetBytes($block))
        $wrappedStatements = "-NoLogo -NonInteractive -NoProfile -ExecutionPolicy Bypass -InputFormat Text -OutputFormat Text -EncodedCommand $encoded"
        $dbgMessage = @"
    $dbMessagePrepend powershell block:
    $block
    This may take a while, depending on the statements.
    "@
    
      }
      else
      {
        $dbgMessage = @"
    $dbMessagePrepend [`"$exeToRun`" $wrappedStatements]. This may take a while, depending on the statements.
    "@
      }
    
      Write-Debug $dbgMessage
    
      $exeIsTextFile = [System.IO.Path]::GetFullPath($exeToRun) + ".istext"
      if ([System.IO.File]::Exists($exeIsTextFile)) {
        Set-PowerShellExitCode 4
        throw "The file was a text file but is attempting to be run as an executable - '$exeToRun'"
      }
    
      if ($exeToRun -eq 'msiexec' -or $exeToRun -eq 'msiexec.exe') {
        $exeToRun = "$($env:SystemRoot)\System32\msiexec.exe"
      }
    
      if (!([System.IO.File]::Exists($exeToRun)) -and $exeToRun -notmatch 'msiexec') {
        Write-Warning "May not be able to find '$exeToRun'. Please use full path for executables."
        # until we have search paths enabled, let's just pass a warning
        #Set-PowerShellExitCode 2
        #throw "Could not find '$exeToRun'"
      }
    
      # Redirecting output slows things down a bit.
      $writeOutput = {
        if ($EventArgs.Data -ne $null) {
          Write-Verbose "$($EventArgs.Data)"
        }
      }
    
      $writeError = {
        if ($EventArgs.Data -ne $null) {
          Write-Error "$($EventArgs.Data)"
        }
      }
    
      $process = New-Object System.Diagnostics.Process
      $process.EnableRaisingEvents = $true
      Register-ObjectEvent -InputObject $process -SourceIdentifier "LogOutput_ChocolateyProc" -EventName OutputDataReceived -Action $writeOutput | Out-Null
      Register-ObjectEvent -InputObject $process -SourceIdentifier "LogErrors_ChocolateyProc" -EventName ErrorDataReceived -Action  $writeError | Out-Null
    
      #$process.StartInfo = New-Object System.Diagnostics.ProcessStartInfo($exeToRun, $wrappedStatements)
      # in case empty args makes a difference, try to be compatible with the older
      # version
      $psi = New-Object System.Diagnostics.ProcessStartInfo
    
      $psi.FileName = $exeToRun
      if ($wrappedStatements -ne '') {
        $psi.Arguments = "$wrappedStatements"
      }
      if ($sensitiveStatements -ne $null -and $sensitiveStatements -ne '') {
        Write-Host "Sensitive arguments have been passed. Adding to arguments."
        $psi.Arguments += " $sensitiveStatements"
      }
      $process.StartInfo =  $psi
    
      # process start info
      $process.StartInfo.RedirectStandardOutput = $true
      $process.StartInfo.RedirectStandardError = $true
      $process.StartInfo.UseShellExecute = $false
      $process.StartInfo.WorkingDirectory = $workingDirectory
    
      if ($elevated -and -not $alreadyElevated -and [Environment]::OSVersion.Version -ge (New-Object 'Version' 6,0)){
        # this doesn't actually currently work - because we are not running under shell execute
        Write-Debug "Setting RunAs for elevation"
        $process.StartInfo.Verb = "RunAs"
      }
      if ($minimized) {
        $process.StartInfo.WindowStyle = [System.Diagnostics.ProcessWindowStyle]::Minimized
      }
    
      $process.Start() | Out-Null
      if ($process.StartInfo.RedirectStandardOutput) { $process.BeginOutputReadLine() }
      if ($process.StartInfo.RedirectStandardError) { $process.BeginErrorReadLine() }
      $process.WaitForExit()
    
      # For some reason this forces the jobs to finish and waits for
      # them to do so. Without this it never finishes.
      Unregister-Event -SourceIdentifier "LogOutput_ChocolateyProc"
      Unregister-Event -SourceIdentifier "LogErrors_ChocolateyProc"
    
      # sometimes the process hasn't fully exited yet.
      for ($loopCount=1; $loopCount -le 15; $loopCount++) {
        if ($process.HasExited) { break; }
        Write-Debug "Waiting for process to exit - $loopCount/15 seconds";
        Start-Sleep 1;
      }
    
      $exitCode = $process.ExitCode
      $process.Dispose()
    
      Write-Debug "Command [`"$exeToRun`" $wrappedStatements] exited with `'$exitCode`'."
      if ($validExitCodes -notcontains $exitCode) {
        Set-PowerShellExitCode $exitCode
        throw "Running [`"$exeToRun`" $wrappedStatements] was not successful. Exit code was '$exitCode'. See log for possible error messages."
      } else {
        $chocoSuccessCodes = @(0, 1605, 1614, 1641, 3010)
        if ($chocoSuccessCodes -notcontains $exitCode) {
          Write-Warning "Exit code '$exitCode' was considered valid by script, but not as a Chocolatey success code. Returning '0'."
          $exitCode = 0
        }
      }
    
      Write-Debug "Finishing '$($MyInvocation.InvocationName)'"
    
      return $exitCode
    }
    
    Set-Alias Start-ChocolateyProcess Start-ChocolateyProcessAsAdmin
    Set-Alias Invoke-ChocolateyProcess Start-ChocolateyProcessAsAdmin
    
    # SIG # Begin signature block
    # MIIcpwYJKoZIhvcNAQcCoIIcmDCCHJQCAQExDzANBglghkgBZQMEAgEFADB5Bgor
    # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
    # KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCBeJrjsyzloWo90
    # bPem/YeoKb2sdri31BYOUhEdfDX1maCCF7EwggUwMIIEGKADAgECAhAECRgbX9W7
    # ZnVTQ7VvlVAIMA0GCSqGSIb3DQEBCwUAMGUxCzAJBgNVBAYTAlVTMRUwEwYDVQQK
    # EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xJDAiBgNV
    # BAMTG0RpZ2lDZXJ0IEFzc3VyZWQgSUQgUm9vdCBDQTAeFw0xMzEwMjIxMjAwMDBa
    # Fw0yODEwMjIxMjAwMDBaMHIxCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2V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Af8E
    # BAMCB4AwDAYDVR0TAQH/BAIwADAWBgNVHSUBAf8EDDAKBggrBgEFBQcDCDCCAb8G
    # A1UdIASCAbYwggGyMIIBoQYJYIZIAYb9bAcBMIIBkjAoBggrBgEFBQcCARYcaHR0
    # cHM6Ly93d3cuZGlnaWNlcnQuY29tL0NQUzCCAWQGCCsGAQUFBwICMIIBVh6CAVIA
    # QQBuAHkAIAB1AHMAZQAgAG8AZgAgAHQAaABpAHMAIABDAGUAcgB0AGkAZgBpAGMA
    # YQB0AGUAIABjAG8AbgBzAHQAaQB0AHUAdABlAHMAIABhAGMAYwBlAHAAdABhAG4A
    # YwBlACAAbwBmACAAdABoAGUAIABEAGkAZwBpAEMAZQByAHQAIABDAFAALwBDAFAA
    # UwAgAGEAbgBkACAAdABoAGUAIABSAGUAbAB5AGkAbgBnACAAUABhAHIAdAB5ACAA
    # QQBnAHIAZQBlAG0AZQBuAHQAIAB3AGgAaQBjAGgAIABsAGkAbQBpAHQAIABsAGkA
    # YQBiAGkAbABpAHQAeQAgAGEAbgBkACAAYQByAGUAIABpAG4AYwBvAHIAcABvAHIA
    # YQB0AGUAZAAgAGgAZQByAGUAaQBuACAAYgB5ACAAcgBlAGYAZQByAGUAbgBjAGUA
    # LjALBglghkgBhv1sAxUwHwYDVR0jBBgwFoAUFQASKxOYspkH7R7for5XDStnAs0w
    # HQYDVR0OBBYEFGFaTSS2STKdSip5GoNL9B6Jwcp9MH0GA1UdHwR2MHQwOKA2oDSG
    # Mmh0dHA6Ly9jcmwzLmRpZ2ljZXJ0LmNvbS9EaWdpQ2VydEFzc3VyZWRJRENBLTEu
    # Y3JsMDigNqA0hjJodHRwOi8vY3JsNC5kaWdpY2VydC5jb20vRGlnaUNlcnRBc3N1
    # cmVkSURDQS0xLmNybDB3BggrBgEFBQcBAQRrMGkwJAYIKwYBBQUHMAGGGGh0dHA6
    # Ly9vY3NwLmRpZ2ljZXJ0LmNvbTBBBggrBgEFBQcwAoY1aHR0cDovL2NhY2V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zM997OLjENmXPWFmqsBOE5kS9tIQ48666cBNnDbQuIXquEpDYZqxVoIBP5DtE
    # R8JU54rw0qwgsuTxBtgVGwn/JdQgBn2MTjgRcK9DxQGahnxuOZfTmnZQ5at1gqZ/
    # WcgMeOmCXohbmasDNNBWuCAtnquJ0zR/9Ol/hhFjdenL0he/bko4xr/FHQ==
    # SIG # End signature block
    
  • tools\chocolateyInstall\helpers\functions\Test-ProcessAdminRights.ps1 Show
    # Copyright © 2017 Chocolatey Software, Inc.
    # Copyright © 2015 - 2017 RealDimensions Software, LLC
    # Copyright © 2011 - 2015 RealDimensions Software, LLC & original authors/contributors from https://github.com/chocolatey/chocolatey
    #
    # Licensed under the Apache License, Version 2.0 (the "License");
    # you may not use this file except in compliance with the License.
    # You may obtain a copy of the License at
    #
    #     http://www.apache.org/licenses/LICENSE-2.0
    #
    # Unless required by applicable law or agreed to in writing, software
    # distributed under the License is distributed on an "AS IS" BASIS,
    # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    # See the License for the specific language governing permissions and
    # limitations under the License.
    
    function Test-ProcessAdminRights {
    <#
    .SYNOPSIS
    Tests whether the current process is running with administrative rights.
    
    .DESCRIPTION
    This function checks whether the current process has administrative
    rights by checking if the current user identity is a member of the
    Administrators group. It returns `$true` if the current process is
    running with administrative rights, `$false` otherwise.
    
    On Windows Vista and later, with UAC enabled, the returned value
    represents the actual rights available to the process, e.g. if it
    returns `$true`, the process is running elevated.
    
    .INPUTS
    None
    
    .OUTPUTS
    System.Boolean
    #>
    
      # do not log function call
    
      $currentPrincipal = New-Object Security.Principal.WindowsPrincipal([Security.Principal.WindowsIdentity]::GetCurrent([Security.Principal.TokenAccessLevels]'Query,Duplicate'))
      $isAdmin = $currentPrincipal.IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)
      Write-Debug "Test-ProcessAdminRights: returning $isAdmin"
    
     return $isAdmin
    }
    
    # SIG # Begin signature block
    # MIIcpwYJKoZIhvcNAQcCoIIcmDC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NVHRMBAf8ECDAGAQH/AgEAMA4GA1UdDwEB/wQEAwIBhjATBgNVHSUEDDAK
    # BggrBgEFBQcDAzB5BggrBgEFBQcBAQRtMGswJAYIKwYBBQUHMAGGGGh0dHA6Ly9v
    # Y3NwLmRpZ2ljZXJ0LmNvbTBDBggrBgEFBQcwAoY3aHR0cDovL2NhY2VydHMuZGln
    # aWNlcnQuY29tL0RpZ2lDZXJ0QXNzdXJlZElEUm9vdENBLmNydDCBgQYDVR0fBHow
    # eDA6oDigNoY0aHR0cDovL2NybDQuZGlnaWNlcnQuY29tL0RpZ2lDZXJ0QXNzdXJl
    # ZElEUm9vdENBLmNybDA6oDigNoY0aHR0cDovL2NybDMuZGlnaWNlcnQuY29tL0Rp
    # Z2lDZXJ0QXNzdXJlZElEUm9vdENBLmNybDBPBgNVHSAESDBGMDgGCmCGSAGG/WwA
    # AgQwKjAoBggrBgEFBQcCARYcaHR0cHM6Ly93d3cuZGlnaWNlcnQuY29tL0NQUzAK
    # BghghkgBhv1sAzAdBgNVHQ4EFgQUWsS5eyoKo6XqcQPAYPkt9mV1DlgwHwYDVR0j
    # BBgwFoAUReuir/SSy4IxLVGLp6chnfNtyA8wDQYJKoZIhvcNAQELBQADggEBAD7s
    # DVoks/Mi0RXILHwlKXaoHV0cLToaxO8wYdd+C2D9wz0PxK+L/e8q3yBVN7Dh9tGS
    # dQ9RtG6ljlriXiSBThCk7j9xjmMOE0ut119EefM2FAaK95xGTlz/kLEbBw6RFfu6
    # r7VRwo0kriTGxycqoSkoGjpxKAI8LpGjwCUR4pwUR6F6aGivm6dcIFzZcbEMj7uo
    # +MUSaJ/PQMtARKUT8OZkDCUIQjKyNookAv4vcn4c10lFluhZHen6dGRrsutmQ9qz
    # sIzV6Q3d9gEgzpkxYz0IGhizgZtPxpMQBvwHgfqL2vmCSfdibqFT+hKUGIUukpHq
    # aGxEMrJmoecYpJpkUe8wggU6MIIEIqADAgECAhAGsBFbtfCQ0/DaDmIsYn1YMA0G
    # CSq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EuY3JsMDWgM6Axhi9odHRwOi8vY3Js
    # NC5kaWdpY2VydC5jb20vc2hhMi1hc3N1cmVkLWNzLWcxLmNybDBMBgNVHSAERTBD
    # MDcGCWCGSAGG/WwDATAqMCgGCCsGAQUFBwIBFhxodHRwczovL3d3dy5kaWdpY2Vy
    # dC5jb20vQ1BTMAgGBmeBDAEEATCBhAYIKwYBBQUHAQEEeDB2MCQGCCsGAQUFBzAB
    # hhhodHRwOi8vb2NzcC5kaWdpY2VydC5jb20wTgYIKwYBBQUHMAKGQmh0dHA6Ly9j
    # YWNlcnRzLmRpZ2ljZXJ0LmNvbS9EaWdpQ2VydFNIQTJBc3N1cmVkSURDb2RlU2ln
    # bmluZ0NBLmNydDAMBgNVHRMBAf8EAjAAMA0GCSqGSIb3DQEBCwUAA4IBAQCLBAE/
    # 2x4amEecDEoy9g+WmWMROiB4GnkPqj+IbiwftmwC5/7yL3/592HOFMJr0qOgUt51
    # moE8SuuLuOGw63c5+/48LJS4jP2XzbVNByRPIxPWorm4t/OzTJNziTowHQ+wLwwI
    # 8U97+8DaHCNL7iLZNEiqbVlpF3j7SMWGgf2BVYADJyxluNzf0ZUO+lXN4gOkM8tl
    # VDc7SjZEKvu6ckAaxXf7NPbCXVL/3+LvdmoLbT3vJlfzeXqduO3oieB10ic3ug5T
    # XtoYmyEk/P3yR3x/TqUlg1x/xaolBxy5TyMeSLcBlYn42fnQL154bvMGwFiCsHWQ
    # wY09I0xpEysOMiy8MIIGajCCBVKgAwIBAgIQAwGaAjr/WLFr1tXq5hfwZjANBgkq
    # hkiG9w0BAQUFADBiMQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5j
    # MRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSEwHwYDVQQDExhEaWdpQ2VydCBB
    # c3N1cmVkIElEIENBLTEwHhcNMTQxMDIyMDAwMDAwWhcNMjQxMDIyMDAwMDAwWjBH
    # MQswCQYDVQQGEwJVUzERMA8GA1UEChM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AGEAbgBkACAAYQByAGUAIABpAG4AYwBvAHIAcABvAHIA
    # YQB0AGUAZAAgAGgAZQByAGUAaQBuACAAYgB5ACAAcgBlAGYAZQByAGUAbgBjAGUA
    # LjALBglghkgBhv1sAxUwHwYDVR0jBBgwFoAUFQASKxOYspkH7R7for5XDStnAs0w
    # HQYDVR0OBBYEFGFaTSS2STKdSip5GoNL9B6Jwcp9MH0GA1UdHwR2MHQwOKA2oDSG
    # Mmh0dHA6Ly9jcmwzLmRpZ2ljZXJ0LmNvbS9EaWdpQ2VydEFzc3VyZWRJRENBLTEu
    # Y3JsMDigNqA0hjJodHRwOi8vY3JsNC5kaWdpY2VydC5jb20vRGlnaUNlcnRBc3N1
    # cmVkSURDQS0xLmNybDB3BggrBgEFBQcBAQRrMGkwJAYIKwYBBQUHMAGGGGh0dHA6
    # Ly9vY3NwLmRpZ2ljZXJ0LmNvbTBBBggrBgEFBQcwAoY1aHR0cDovL2NhY2VydHMu
    # ZGlnaWNlcnQuY29tL0RpZ2lDZXJ0QXNzdXJlZElEQ0EtMS5jcnQwDQYJKoZIhvcN
    # AQEFBQADggEBAJ0lfhszTbImgVybhs4jIA+Ah+WI//+x1GosMe06FxlxF82pG7xa
    # FjkAneNshORaQPveBgGMN/qbsZ0kfv4gpFetW7easGAm6mlXIV00Lx9xsIOUGQVr
    # NZAQoHuXx/Y/5+IRQaa9YtnwJz04HShvOlIJ8OxwYtNiS7Dgc6aSwNOOMdgv420X
    # Ewbu5AO2FKvzj0OncZ0h3RTKFV2SQdr5D4HRmXQNJsQOfxu19aDxxncGKBXp2JPl
    # VRbwuwqrHNtcSCdmyKOLChzlldquxC5ZoGHd2vNtomHpigtt7BIYvfdVVEADkitr
    # wlHCCkivsNRu4PQUCjob4489yq9qjXvc2EQwggbNMIIFtaADAgECAhAG/fkDlgOt
    # 6gAK6z8nu7obMA0GCSqGSIb3DQEBBQUAMGUxCzAJBgNVBAYTAlVTMRUwEwYDVQQK
    # EwxEaWdpQ2VydCBJb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
    # bwBuAHMAdABpAHQAdQB0AGUAcwAgAGEAYwBjAGUAcAB0AGEAbgBjAGUAIABvAGYA
    # IAB0AGgAZQAgAEQAaQBnAGkAQwBlAHIAdAAgAEMAUAAvAEMAUABTACAAYQBuAGQA
    # IAB0AGgAZQAgAFIAZQBsAHkAaQBuAGcAIABQAGEAcgB0AHkAIABBAGcAcgBlAGUA
    # bQBlAG4AdAAgAHcAaABpAGMAaAAgAGwAaQBtAGkAdAAgAGwAaQBhAGIAaQBsAGkA
    # dAB5ACAAYQBuAGQAIABhAHIAZQAgAGkAbgBjAG8AcgBwAG8AcgBhAHQAZQBkACAA
    # aABlAHIAZQBpAG4AIABiAHkAIAByAGUAZgBlAHIAZQBuAGMAZQAuMAsGCWCGSAGG
    # /WwDFTASBgNVHRMBAf8ECDAGAQH/AgEAMHkGCCsGAQUFBwEBBG0wazAkBggrBgEF
    # BQcwAYYYaHR0cDovL29jc3AuZGlnaWNlcnQuY29tMEMGCCsGAQUFBzAChjdodHRw
    # Oi8vY2FjZXJ0cy5kaWdpY2VydC5jb20vRGlnaUNlcnRBc3N1cmVkSURSb290Q0Eu
    # Y3J0MIGBBgNVHR8EejB4MDqgOKA2hjRodHRwOi8vY3JsMy5kaWdpY2VydC5jb20v
    # RGlnaUNlcnRBc3N1cmVkSURSb290Q0EuY3JsMDqgOKA2hjRodHRwOi8vY3JsNC5k
    # aWdpY2VydC5jb20vRGlnaUNlcnRBc3N1cmVkSURSb290Q0EuY3JsMB0GA1UdDgQW
    # BBQVABIrE5iymQftHt+ivlcNK2cCzTAfBgNVHSMEGDAWgBRF66Kv9JLLgjEtUYun
    # pyGd823IDzANBgkqhkiG9w0BAQUFAAOCAQEARlA+ybcoJKc4HbZbKa9Sz1LpMUer
    # Vlx71Q0LQbPv7HUfdDjyslxhopyVw1Dkgrkj0bo6hnKtOHisdV0XFzRyR4WUVtHr
    # uzaEd8wkpfMEGVWp5+Pnq2LN+4stkMLA0rWUvV5PsQXSDj0aqRRbpoYx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JBgNVBAYTAlVTMRUwEwYDVQQK
    # EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xITAfBgNV
    # BAMTGERpZ2lDZXJ0IEFzc3VyZWQgSUQgQ0EtMQIQAwGaAjr/WLFr1tXq5hfwZjAJ
    # BgUrDgMCGgUAoF0wGAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAcBgkqhkiG9w0B
    # CQUxDxcNMTcwODA3MDAwNDU1WjAjBgkqhkiG9w0BCQQxFgQUnw+w94Zzl5nouq42
    # 4FobyUsAKSUwDQYJKoZIhvcNAQEBBQAEggEAnBRD9+VUhcLe4RXmdYPP7IZ4xvE0
    # 5g7OhTLBIyTkSHKZD6bFD1q+i+5XaE/yvnpRi0+G0k28sW846vQz16WYJOqIzTZL
    # AJIwfZrmnszpZAmdajYswCTGHPi7rYb1NQcLSH/ms3NthegMpHok2Fe7TlLaosF7
    # KNftFHPeHmbZSb5RA8J2pk6vPhIfwiyrC507uueCc2xb5/9+6KHxafidFvVpPbfA
    # JB43aORgz0KN2gGDvuaOyLy/5sOqakCAIi1sS1ZrkXp00k9y/KT+cFa3DUxZx8JT
    # STcQ3vKHoBsOVn4vHJhb067tWnxp2G9D4sZltp8/ik6BVupqDhqZGypH2A==
    # SIG # End signature block
    
  • tools\chocolateyInstall\helpers\functions\Uninstall-BinFile.ps1 Show
    # Copyright © 2017 Chocolatey Software, Inc.
    # Copyright © 2015 - 2017 RealDimensions Software, LLC
    # Copyright © 2011 - 2015 RealDimensions Software, LLC & original authors/contributors from https://github.com/chocolatey/chocolatey
    #
    # Licensed under the Apache License, Version 2.0 (the "License");
    # you may not use this file except in compliance with the License.
    # You may obtain a copy of the License at
    #
    #     http://www.apache.org/licenses/LICENSE-2.0
    #
    # Unless required by applicable law or agreed to in writing, software
    # distributed under the License is distributed on an "AS IS" BASIS,
    # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    # See the License for the specific language governing permissions and
    # limitations under the License.
    
    function Uninstall-BinFile {
    <#
    .SYNOPSIS
    Removes a shim (or batch redirect) for a file.
    
    .DESCRIPTION
    Chocolatey installs have the folder `$($env:ChocolateyInstall)\bin`
    included in the PATH environment variable. Chocolatey automatically
    shims executables in package folders that are not explicitly ignored,
    putting them into the bin folder (and subsequently onto the PATH).
    
    When you have other files you have shimmed, you need to use this
    function to remove them from the bin folder.
    
    .NOTES
    Not normally needed for exe files in the package folder, those are
    automatically discovered and the shims removed.
    
    .INPUTS
    None
    
    .OUTPUTS
    None
    
    .PARAMETER Name
    The name of the redirect file without ".exe" appended to it.
    
    .PARAMETER Path
    The path to the original file. Can be relative from
    `$($env:ChocolateyInstall)\bin` back to your file or a full path to the
    file.
    
    .PARAMETER IgnoredArguments
    Allows splatting with arguments that do not apply. Do not use directly.
    
    .LINK
    Install-BinFile
    #>
    param(
      [parameter(Mandatory=$true, Position=0)][string] $name,
      [parameter(Mandatory=$false, Position=1)][string] $path,
      [parameter(ValueFromRemainingArguments = $true)][Object[]] $ignoredArguments
    )
    
      Write-FunctionCallLogMessage -Invocation $MyInvocation -Parameters $PSBoundParameters
    
      $nugetPath = [System.IO.Path]::GetFullPath((Join-Path "$helpersPath" '..\'))
      $nugetExePath = Join-Path "$nugetPath" 'bin'
      $packageBatchFileName = Join-Path $nugetExePath "$name.bat"
      $packageBashFileName = Join-Path $nugetExePath "$name"
      $packageShimFileName = Join-Path $nugetExePath "$name.exe"
      $path = $path.ToLower().Replace($nugetPath.ToLower(), "%DIR%..\").Replace("\\","\")
      $pathBash = $path.Replace("%DIR%..\","`$DIR/../").Replace("\","/")
    
      Write-Debug "Attempting to remove the batch and bash shortcuts: $packageBatchFileName and $packageBashFileName"
    
      if (Test-Path $packageBatchFileName) {
        Write-Host "Removing batch file $packageBatchFileName which pointed to `'$path`'."
        Remove-Item $packageBatchFileName
      }
      else {
        Write-Debug "Tried to remove batch file $packageBatchFileName but it was already removed."
      }
    
      if (Test-Path $packageBashFileName) {
        Write-Host "Removing bash file $packageBashFileName which pointed to `'$path`'."
        Remove-Item $packageBashFileName
      }
      else {
        Write-Debug "Tried to remove bash file $packageBashFileName but it was already removed."
      }
    
      Write-Debug "Attempting to remove the shim: $packageShimFileName"
      if (Test-Path $packageShimFileName) {
        Write-Host "Removing shim $packageShimFileName which pointed to `'$path`'."
        Remove-Item $packageShimFileName
      }
      else {
        Write-Debug "Tried to remove shim $packageShimFileName but it was already removed."
      }
    }
    
    Set-Alias Remove-BinFile Uninstall-BinFile
    
    # SIG # Begin signature block
    # MIIcpwYJKoZIhvcNAQcCoIIcmDCCHJQCAQExDzANBglghkgBZQMEAgEFADB5Bgor
    # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
    # KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCBxi4FKQtlaRtI/
    # ByhSS+Td1sx5hLEwyyR/6cl8nmoz1KCCF7EwggUwMIIEGKADAgECAhAECRgbX9W7
    # ZnVTQ7VvlVAIMA0GCSqGSIb3DQEBCwUAMGUxCzAJBgNVBAYTAlVTMRUwEwYDVQQK
    # EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xJDAiBgNV
    # BAMTG0RpZ2lDZXJ0IEFzc3VyZWQgSUQgUm9vdCBDQTAeFw0xMzEwMjIxMjAwMDBa
    # Fw0yODEwMjIxMjAwMDBaMHIxCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2Vy
    # dCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xMTAvBgNVBAMTKERpZ2lD
    # ZXJ0IFNIQTIgQXNzdXJlZCBJRCBDb2RlIFNpZ25pbmcgQ0EwggEiMA0GCSqGSIb3
    # DQEBAQUAA4IBDwAwggEKAoIBAQD407Mcfw4Rr2d3B9MLMUkZz9D7RZmxOttE9X/l
    # qJ3bMtdx6nadBS63j/qSQ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AZgAgAHQAaABpAHMAIABDAGUAcgB0AGkAZgBpAGMA
    # YQB0AGUAIABjAG8AbgBzAHQAaQB0AHUAdABlAHMAIABhAGMAYwBlAHAAdABhAG4A
    # YwBlACAAbwBmACAAdABoAGUAIABEAGkAZwBpAEMAZQByAHQAIABDAFAALwBDAFAA
    # UwAgAGEAbgBkACAAdABoAGUAIABSAGUAbAB5AGkAbgBnACAAUABhAHIAdAB5ACAA
    # QQBnAHIAZQBlAG0AZQBuAHQAIAB3AGgAaQBjAGgAIABsAGkAbQBpAHQAIABsAGkA
    # YQBiAGkAbABpAHQAeQAgAGEAbgBkACAAYQByAGUAIABpAG4AYwBvAHIAcABvAHIA
    # YQB0AGUAZAAgAGgAZQByAGUAaQBuACAAYgB5ACAAcgBlAGYAZQByAGUAbgBjAGUA
    # LjALBglghkgBhv1sAxUwHwYDVR0jBBgwFoAUFQASKxOYspkH7R7for5XDStnAs0w
    # HQYDVR0OBBYEFGFaTSS2STKdSip5GoNL9B6Jwcp9MH0GA1UdHwR2MHQwOKA2oDSG
    # Mmh0dHA6Ly9jcmwzLmRpZ2ljZXJ0LmNvbS9EaWdpQ2VydEFzc3VyZWRJRENBLTEu
    # Y3JsMDigNqA0hjJodHRwOi8vY3JsNC5kaWdpY2VydC5jb20vRGlnaUNlcnRBc3N1
    # cmVkSURDQS0xLmNybDB3BggrBgEFBQcBAQRrMGkwJAYIKwYBBQUHMAGGGGh0dHA6
    # Ly9vY3NwLmRpZ2ljZXJ0LmNvbTBBBggrBgEFBQcwAoY1aHR0cDovL2NhY2VydHMu
    # ZGlnaWNlcnQuY29tL0RpZ2lDZXJ0QXNzdXJlZElEQ0EtMS5jcnQwDQYJKoZIhvcN
    # AQEFBQADggEBAJ0lfhszTbImgVybhs4jIA+Ah+WI//+x1GosMe06FxlxF82pG7xa
    # FjkAneNshORaQPveBgGMN/qbsZ0kfv4gpFetW7easGAm6mlXIV00Lx9xsIOUGQVr
    # NZAQoHuXx/Y/5+IRQaa9YtnwJ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Yjb2Nn+J5V7h
    # COnsRdZJVNhsfRpZfzfAIS5lKN434T4AAnf08XbytzXmoirTg5+u9QqffbkJ5o8A
    # wyp0VD5d9AKFWmH2ZOvdHH3Jflf2Z8ZHJcl43r9ZeGuhuynB0e0R1gGVy86qGVYq
    # V8XjKiKRUVE1dKHX3vHOMmY1qil7kZVVCWp+qRjrNRZ1UnZxv3i+ZjIXZUra+JT+
    # 97atootTgN4XZxnZHf1JXLeHo1Rl3K1D/5klr9BkK+KElyNKoknDLKGCAg8wggIL
    # BgkqhkiG9w0BCQYxggH8MIIB+AIBATB2MGIxCzAJBgNVBAYTAlVTMRUwEwYDVQQK
    # EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xITAfBgNV
    # BAMTGERpZ2lDZXJ0IEFzc3VyZWQgSUQgQ0EtMQIQAwGaAjr/WLFr1tXq5hfwZjAJ
    # BgUrDgMCGgUAoF0wGAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAcBgkqhkiG9w0B
    # CQUxDxcNMTcwODA3MDAwNDU1WjAjBgkqhkiG9w0BCQQxFgQUlk+AH0M9/hr2bc5m
    # 8VjKFLksYs0wDQYJKoZIhvcNAQEBBQAEggEAhpImhWmyM9KCrZRI8P4z8j7PLPq7
    # APWH9BfAVVLIilFYHaIYciNtIuP11YBEM1j3QOZpLO5bZr2RjDh7eoCmR6clzZgF
    # /83Z6u5C0AF0K55MMCs33+I07t+GToCQ5oosNvZQ+rEzhWQSJe+aeHYT9wwNxkYm
    # WovSivUhMQvK0W4LajFibuAetcyUqq6gDVvDobErGc6rNhFe5YNjq9NH1+EzadOu
    # QIY5ltUlQZBPjZPNXY4TFzN45lxNjBwBgaAN7qZAeP1J2zbka1+Z3J1rVsVN9JY8
    # ewCRbTGbVy6fa+DkD+/Swc8S6Sj//iSAfodkf3VwVUkhccgc8HKwFkH5Ww==
    # SIG # End signature block
    
  • tools\chocolateyInstall\helpers\functions\Uninstall-ChocolateyEnvironmentVariable.ps1 Show
    # Copyright © 2017 Chocolatey Software, Inc.
    # Copyright © 2011 - 2017 RealDimensions Software, LLC
    #
    # Licensed under the Apache License, Version 2.0 (the "License");
    # you may not use this file except in compliance with the License.
    #
    # You may obtain a copy of the License at
    #
    #   http://www.apache.org/licenses/LICENSE-2.0
    #
    # Unless required by applicable law or agreed to in writing, software
    # distributed under the License is distributed on an "AS IS" BASIS,
    # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    # See the License for the specific language governing permissions and
    # limitations under the License.
    
    function Uninstall-ChocolateyEnvironmentVariable {
    <#
    .SYNOPSIS
    **NOTE:** Administrative Access Required when `-VariableType 'Machine'.`
    
    Removes a persistent environment variable.
    
    .DESCRIPTION
    Uninstall-ChocolateyEnvironmentVariable removes an environment variable
    with the specified name and value. The variable can be scoped either to
    the User or to the Machine. If Machine level scoping is specified, the
    command is elevated to an administrative session.
    
    .NOTES
    Available in 0.9.10+. If you need compatibility with older versions,
    use Install-ChocolateyEnvironmentVariable and set `-VariableValue $null`
    
    This command will assert UAC/Admin privileges on the machine when
    `-VariableType Machine`.
    
    This will remove the environment variable from the current session.
    
    .INPUTS
    None
    
    .OUTPUTS
    None
    
    .PARAMETER VariableName
    The name or key of the environment variable to remove.
    
    .PARAMETER VariableType
    Specifies whether this variable is at either the individual User level
    or at the Machine level.
    
    .PARAMETER IgnoredArguments
    Allows splatting with arguments that do not apply. Do not use directly.
    
    .EXAMPLE
    >
    # Remove an environment variable
    Uninstall-ChocolateyEnvironmentVariable -VariableName 'bob'
    
    .EXAMPLE
    >
    # Remove an environment variable from Machine
    Uninstall-ChocolateyEnvironmentVariable -VariableName 'bob' -VariableType 'Machine'
    
    .LINK
    Install-ChocolateyEnvironmentVariable
    
    .LINK
    Set-EnvironmentVariable
    
    .LINK
    Install-ChocolateyPath
    #>
    param(
      [parameter(Mandatory=$true, Position=0)][string] $variableName,
      [parameter(Mandatory=$false, Position=1)]
      [System.EnvironmentVariableTarget] $variableType = [System.EnvironmentVariableTarget]::User,
      [parameter(ValueFromRemainingArguments = $true)][Object[]] $ignoredArguments
    )
    
      Write-FunctionCallLogMessage -Invocation $MyInvocation -Parameters $PSBoundParameters
    
      if ($variableType -eq [System.EnvironmentVariableTarget]::Machine) {
        if (Test-ProcessAdminRights) {
          Set-EnvironmentVariable -Name $variableName -Value $null -Scope $variableType
        } else {
          $psArgs = "Install-ChocolateyEnvironmentVariable -variableName `'$variableName`' -variableValue $null -variableType `'$variableType`'"
          Start-ChocolateyProcessAsAdmin "$psArgs"
        }
      } else {
        Set-EnvironmentVariable -Name $variableName -Value $null -Scope $variableType
      }
    
      Set-Content env:\$variableName $null
    }
    
    # SIG # Begin signature block
    # MIIcpwYJKoZIhvcNAQcCoIIcmDCCHJQCAQExDzANBglghkgBZQMEAgEFADB5Bgor
    # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
    # KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCDNjny7BMzeJ1uB
    # 8j7qaro2ZoUNL0UkP4S8UuZl+Hsu3KCCF7EwggUwMIIEGKADAgECAhAECRgbX9W7
    # ZnVTQ7VvlVAIMA0GCSqGSIb3DQEBCwUAMGUxCzAJBgNVBAYTAlVTMRUwEwYDVQQK
    # EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xJDAiBgNV
    # BAMTG0RpZ2lDZXJ0IEFzc3VyZWQgSUQgUm9vdCBDQTAeFw0xMzEwMjIxMjAwMDBa
    # Fw0yODEwMjIxMjAwMDBaMHIxCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2Vy
    # dCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xMTAvBgNVBAMTKERpZ2lD
    # ZXJ0IFNIQTIgQXNzdXJlZCBJRCBDb2RlIFNpZ25pbmcgQ0EwggEiMA0GCSq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cNAQELBQADggEBAD7s
    # DVoks/Mi0RXILHwlKXaoHV0cLToaxO8wYdd+C2D9wz0PxK+L/e8q3yBVN7Dh9tGS
    # dQ9RtG6ljlriXiSBThCk7j9xjmMOE0ut119EefM2FAaK95xGTlz/kLEbBw6RFfu6
    # r7VRwo0kriTGxycqoSkoGjpxKAI8LpGjwCUR4pwUR6F6aGivm6dcIFzZcbEMj7uo
    # +MUSaJ/PQMtARKUT8OZkDCUIQjKyNookAv4vcn4c10lFluhZHen6dGRrsutmQ9qz
    # sIzV6Q3d9gEgzpkxYz0IGhizgZtPxpMQBvwHgfqL2vmCSfdibqFT+hKUGIUukpHq
    # aGxEMrJmoecYpJpkUe8wggU6MIIEIqADAgECAhAGsBFbtfCQ0/DaDmIsYn1YMA0G
    # CSqGSIb3DQEBCwUAMHIxCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2VydCBJ
    # bmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xMTAvBgNVBAMTKERpZ2lDZXJ0
    # IFNIQTIgQXNzdXJlZCBJRCBDb2RlIFNpZ25pbmcgQ0EwHhcNMTcwMzI4MDAwMDAw
    # WhcNMTgwNDAzMTIwMDAwWjB3MQswCQYDVQQGEwJVUzEPMA0GA1UECBMGS2Fuc2Fz
    # MQ8wDQYDVQQHEwZUb3Bla2ExIjAgBgNVBAoTGUNob2NvbGF0ZXkgU29mdHdhcmUs
    # IEluYy4xIjAgBgNVBAMTGUNob2NvbGF0ZXkgU29mdHdhcmUsIEluYy4wggEiMA0G
    # CSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDLIWIaEiqkPbIMZi6jD6J8F3YIYPxG
    # 3Vw2I8AsM5c63WUmV+bYZQGxY5AHHVFphy9mU6spXgAqVpzkcALjo1oArVscUU34
    # 8S4mokGbZVvHlO8ny1b1HzfR4ZPHpUL71btSqpcOElYOOL0wUnf5As/39VN+Wxef
    # //D5KTDD17AA2DVvIaXMT+utERbo+c+leaPS4f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R0
    # cHM6Ly93d3cuZGlnaWNlcnQuY29tL0NQUzCCAWQGCCsGAQUFBwICMIIBVh6CAVIA
    # QQBuAHkAIAB1AHMAZQAgAG8AZgAgAHQAaABpAHMAIABDAGUAcgB0AGkAZgBpAGMA
    # YQB0AGUAIABjAG8AbgBzAHQAaQB0AHUAdABlAHMAIABhAGMAYwBlAHAAdABhAG4A
    # YwBlACAAbwBmACAAdABoAGUAIABEAGkAZwBpAEMAZQByAHQAIABDAFAALwBDAFAA
    # UwAgAGEAbgBkACAAdABoAGUAIABSAGUAbAB5AGkAbgBnACAAUABhAHIAdAB5ACAA
    # QQBnAHIAZQBlAG0AZQBuAHQAIAB3AGgAaQBjAGgAIABsAGkAbQBpAHQAIABsAGkA
    # YQBiAGkAbABpAHQAeQAgAGEAbgBkACAAYQByAGUAIABpAG4AYwBvAHIAcABvAHIA
    # YQB0AGUAZAAgAGgAZQByAGUAaQBuACAAYgB5ACAAcgBlAGYAZQByAGUAbgBjAGUA
    # LjALBglghkgBhv1sAxUwHwYDVR0jBBgwFoAUFQASKxOYspkH7R7for5XDStnAs0w
    # HQYDVR0OBBYEFGFaTSS2STKdSip5GoNL9B6Jwcp9MH0GA1UdHwR2MHQwOKA2oDSG
    # Mmh0dHA6Ly9jcmwzLmRpZ2ljZXJ0LmNvbS9EaWdpQ2VydEFzc3VyZWRJRENBLTEu
    # Y3JsMDigNqA0hjJodHRwOi8vY3JsNC5kaWdpY2VydC5jb20vRGlnaUNlcnRBc3N1
    # cmVkSURDQS0xLmNybDB3BggrBgEFBQcBAQRrMGkwJAYIKwYBBQUHMAGGGGh0dHA6
    # Ly9vY3NwLmRpZ2ljZXJ0LmNvbTBBBggrBgEFBQcwAoY1aHR0cDovL2NhY2VydHMu
    # ZGlnaWNlcnQuY29tL0RpZ2lDZXJ0QXNzdXJlZElEQ0EtMS5jcnQwDQYJKoZIhvcN
    # AQEFBQADggEBAJ0lfhszTbImgVybhs4jIA+Ah+WI//+x1GosMe06FxlxF82pG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vcNAQEBBQAEggEAapRFpoYk15FHL/u+iAwHfN/xfVB0AzAR
    # G/kfyw6vT1iQVWZ/atFLY9JN6oe+h4VIfKnJfW6a9JrlyCG9Sw1wK7boakW2m916
    # KN7G/qKsWLlJZyg7I5V3JwB/qXBR2hws/ziLSbtwroAGV2ILtlpadPugh3ZwbPsW
    # vUHUgyiVxD6G2eVLnBRDXuxYsdecz22Idu60DAROMo0hHdto8AC2+pO3pJfsTfFR
    # nns/gr7pc3PVkiBVW2Mtaiyk4uoDLPtgpStxw5TaDl3CR3ISXwi5n/yfbCsxxP2r
    # MYCcVZpoAWoCZctVkIv2gZ3xAXL7QohWxzLmuATs/d3NNsux4L61uKGCAg8wggIL
    # BgkqhkiG9w0BCQYxggH8MIIB+AIBATB2MGIxCzAJBgNVBAYTAlVTMRUwEwYDVQQK
    # EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xITAfBgNV
    # BAMTGERpZ2lDZXJ0IEFzc3VyZWQgSUQgQ0EtMQIQAwGaAjr/WLFr1tXq5hfwZjAJ
    # BgUrDgMCGgUAoF0wGAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAcBgkqhkiG9w0B
    # CQUxDxcNMTcwODA3MDAwNDU2WjAjBgkqhkiG9w0BCQQxFgQULwTHWqZuo1oWrC2H
    # i9LDqNwwu7wwDQYJKoZIhvcNAQEBBQAEggEAogz1yNrLGeI1kvIpgkufaWTlTSR0
    # 29bko8BZEbNlMjTLo0NkkkkzvKi2oX/p7eVxVnch4oAca5JgsP7lSfe5ligFhnLv
    # LvghVOaq/hnN9G1b9kr/CwerlBqI9VRqGNcU1OD9aGM8p0CyzESp0+o+twe9s29J
    # JyzGJGoRr5M+E2CVLPCihTXi0bGd3PAVDDtckRFAwsXwVyKsHBaTSvueclcgqyrt
    # pa6ioEYFBjH0aGvjQajxLZosnHXQzxvtKHD7gExpectyWm0EAu8PMxEs+7xrfHMO
    # 26CMsRTsHQMpwVasuKvvAE8YPxwWKO2k6TfIyDOFF26iKU69+ZePau/Ilw==
    # SIG # End signature block
    
  • tools\chocolateyInstall\helpers\functions\Uninstall-ChocolateyPackage.ps1 Show
    # Copyright © 2017 Chocolatey Software, Inc.
    # Copyright © 2015 - 2017 RealDimensions Software, LLC
    # Copyright © 2011 - 2015 RealDimensions Software, LLC & original authors/contributors from https://github.com/chocolatey/chocolatey
    #
    # Licensed under the Apache License, Version 2.0 (the "License");
    # you may not use this file except in compliance with the License.
    # You may obtain a copy of the License at
    #
    #     http://www.apache.org/licenses/LICENSE-2.0
    #
    # Unless required by applicable law or agreed to in writing, software
    # distributed under the License is distributed on an "AS IS" BASIS,
    # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    # See the License for the specific language governing permissions and
    # limitations under the License.
    
    function Uninstall-ChocolateyPackage {
    <#
    .SYNOPSIS
    Uninstalls software from "Programs and Features".
    
    .DESCRIPTION
    This will uninstall software from your machine (in Programs and
    Features). This may not be necessary if Auto Uninstaller is turned on.
    
    Choco 0.9.9+ automatically tracks registry changes for "Programs and
    Features" of the underlying software's native installers when
    installing packages. The "Automatic Uninstaller" (auto uninstaller)
    service is a feature that can use that information to automatically
    determine how to uninstall these natively installed applications. This
    means that a package may not need an explicit chocolateyUninstall.ps1
    to reverse the installation done in the install script.
    
    With auto uninstaller turned off, a chocolateyUninstall.ps1 is required
    to perform uninstall from "Programs and Features". In the absence of
    chocolateyUninstall.ps1, choco uninstall only removes the package from
    Chocolatey but does not remove the sofware from your system without
    auto uninstaller.
    
    .NOTES
    May not be required. Starting in 0.9.10+, the Automatic Uninstaller
    (AutoUninstaller) is turned on by default.
    
    .INPUTS
    None
    
    .OUTPUTS
    None
    
    .PARAMETER PackageName
    The name of the package - while this is an arbitrary value, it's
    recommended that it matches the package id.
    
    .PARAMETER FileType
    This is the extension of the file. This should be either exe or msi.
    
    If what is provided is empty or null, Chocolatey will use 'exe'
    starting in 0.10.1.
    
    .PARAMETER SilentArgs
    OPTIONAL - These are the parameters to pass to the native uninstaller,
    including any arguments to make the uninstaller silent/unattended.
    Licensed editions of Chocolatey will automatically determine the
    installer type and merge the arguments with what is provided here.
    
    Try any of the to get the silent (unattended) uninstaller -
    `/s /S /q /Q /quiet /silent /SILENT /VERYSILENT`. With msi it is always
    `/quiet`. Please pass it in still but it will be overridden by
    Chocolatey to `/quiet`. If you don't pass anything it could invoke the
    installer with out any arguments. That means a nonsilent installer.
    
    Please include the `notSilent` tag in your Chocolatey package if you
    are not setting up a silent/unattended package. Please note that if you
    are submitting to the community repository, it is nearly a requirement
    for the package to be completely unattended.
    
    .PARAMETER File
    The full path to the native uninstaller to run.
    
    .PARAMETER ValidExitCodes
    Array of exit codes indicating success. Defaults to `@(0)`.
    
    .PARAMETER IgnoredArguments
    Allows splatting with arguments that do not apply. Do not use directly.
    
    .EXAMPLE
    Uninstall-ChocolateyPackage '__NAME__' 'EXE_OR_MSI' 'SILENT_ARGS' 'FilePath'
    
    .EXAMPLE
    >
        Uninstall-ChocolateyPackage -PackageName $packageName `
                                    -FileType $installerType `
                                    -SilentArgs "$silentArgs" `
                                    -ValidExitCodes $validExitCodes `
                                    -File "$file"
    
    .LINK
    Install-ChocolateyPackage
    
    .LINK
    Install-ChocolateyInstallPackage
    
    .LINK
    Uninstall-ChocolateyZipPackage
    
    .LINK
    Get-UninstallRegistryKey
    #>
    param(
      [parameter(Mandatory=$true, Position=0)][string] $packageName,
      [parameter(Mandatory=$false, Position=1)]
      [alias("installerType")][string] $fileType = 'exe',
      [parameter(Mandatory=$false, Position=2)][string[]] $silentArgs = '',
      [parameter(Mandatory=$false, Position=3)][string] $file,
      [parameter(Mandatory=$false)] $validExitCodes = @(0),
      [parameter(ValueFromRemainingArguments = $true)][Object[]] $ignoredArguments
    )
      [string]$silentArgs = $silentArgs -join ' '
    
      Write-FunctionCallLogMessage -Invocation $MyInvocation -Parameters $PSBoundParameters
    
      $installMessage = "Uninstalling $packageName..."
      write-host $installMessage
    
      $additionalInstallArgs = $env:chocolateyInstallArguments;
      if ($additionalInstallArgs -eq $null) { $additionalInstallArgs = ''; }
      $overrideArguments = $env:chocolateyInstallOverride;
    
      if ($fileType -eq $null) { $fileType = '' }
      $installerTypeLower = $fileType.ToLower()
      if ($installerTypeLower -ne 'msi' -and $installerTypeLower -ne 'exe') {
        Write-Warning "FileType '$fileType' is unrecognized, using 'exe' instead."
        $fileType = 'exe'
      }
    
      if ($fileType -like 'msi') {
        $msiArgs = "/x"
        if ($overrideArguments) {
          $msiArgs = "$msiArgs $additionalInstallArgs";
          write-host "Overriding package arguments with `'$additionalInstallArgs`'";
        } else {
          $msiArgs = "$msiArgs $silentArgs $additionalInstallArgs";
        }
    
        Start-ChocolateyProcessAsAdmin "$msiArgs" "$($env:SystemRoot)\System32\msiexec.exe" -validExitCodes $validExitCodes
      }
      if ($fileType -like 'exe') {
        if ($overrideArguments) {
          Write-Host "Overriding package arguments with `'$additionalInstallArgs`'";
          Start-ChocolateyProcessAsAdmin "$additionalInstallArgs" $file -validExitCodes $validExitCodes
        } else {
          Start-ChocolateyProcessAsAdmin "$silentArgs $additionalInstallArgs" $file -validExitCodes $validExitCodes
        }
      }
    
      Write-Host "$packageName has been uninstalled."
    }
    
    # SIG # Begin signature block
    # MIIcpwYJKoZIhvcNAQcCoIIcmDCCHJQCAQExDzANBglghkgBZQMEAgEFADB5Bgor
    # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
    # KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCAbZyQFA95OGRHB
    # cD9tP19AkE1qUrhGx5KAnPXf+jwEJ6CCF7EwggUwMIIEGKADAgECAhAECRgbX9W7
    # ZnVTQ7VvlVAIMA0GCSqGSIb3DQEBCwUAMGUxCzAJBgNVBAYTAlVTMRUwEwYDVQQK
    # EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xJD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b2RlU2ln
    # bmluZ0NBLmNydDAMBgNVHRMBAf8EAjAAMA0GCSqGSIb3DQEBCwUAA4IBAQCLBAE/
    # 2x4amEecDEoy9g+WmWMROiB4GnkPqj+IbiwftmwC5/7yL3/592HOFMJr0qOgUt51
    # moE8SuuLuOGw63c5+/48LJS4jP2XzbVNByRPIxPWorm4t/OzTJNziTowHQ+wLwwI
    # 8U97+8DaHCNL7iLZNEiqbVlpF3j7SMWGgf2BVYADJyxluNzf0ZUO+lXN4gOkM8tl
    # VDc7SjZEKvu6ckAaxXf7NPbCXVL/3+LvdmoLbT3vJlfzeXqduO3oieB10ic3ug5T
    # XtoYmyEk/P3yR3x/TqUlg1x/xaolBxy5TyMeSLcBlYn42fnQL154bvMGwFiCsHWQ
    # wY09I0xpEysOMiy8MIIGajCCBVKgAwIBAgIQAwGaAjr/WLFr1tXq5hfwZjANBgkq
    # hkiG9w0BAQUFADBiMQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5j
    # MRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSEwHwYDVQQDExhEaWdpQ2VydCBB
    # c3N1cmVkIElEIENBLTEwHhcNMTQxMDIyMDAwMDAwWhcNMjQxMDIyMDAwMDAwWjBH
    # MQswCQYDVQQGEwJVUzERMA8GA1UEChMIRGlnaUNlcnQxJTAjBgNVBAMTHERpZ2lD
    # ZXJ0IFRpbWVzdGFtcCBSZXNwb25kZXIwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAw
    # ggEKAoIBAQCjZF38fLPggjXg4PbGKuZJdTvMbuBTqZ8fZFnmfGt/a4ydVfiS457V
    # WmNbAklQ2YPOb2bu3cuF6V+l+dSHdIhEOxnJ5fWRn8YUOawk6qhLLJGJzF4o9GS2
    # ULf1ErNzlgpno75hn67z/RJ4dQ6mWxT9RSOOhkRVfRiGBYxVh3lIRvfKDo2n3k5f
    # 4qi2LVkCYYhhchhoubh87ubnNC8xd4EwH7s2AY3vJ+P3mvBMMWSN4+v6GYeofs/s
    # jAw2W3rBerh4x8kGLkYQyI3oBGDbvHN0+k7Y/qpA8bLOcEaD6dpAoVk62RUJV5lW
    # MJPzyWHM0AjMa+xiQpGsAsDvpPCJEY93AgMBAAGjggM1MIIDMTAOBgNVHQ8BAf8E
    # BAMCB4AwDAYDVR0TAQH/BAIwADAWBgNVHSUBAf8EDDAKBggrBgEFBQcDCDCCAb8G
    # A1UdIASCAbYwggGyMIIBoQYJYIZIAYb9bAcBMIIBkjAoBggrBgEFBQcCARYcaHR0
    # cHM6Ly93d3cuZGlnaWNlcnQuY29tL0NQUzCCAWQGCCsGAQUFBwICMIIBVh6CAVIA
    # QQBuAHkAIAB1AHMAZQAgAG8AZgAgAHQAaABpAHMAIABDAGUAcgB0AGkAZgBpAGMA
    # YQB0AGUAIABjAG8AbgBzAHQAaQB0AHUAdABlAHMAIABhAGMAYwBlAHAAdABhAG4A
    # YwBlACAAbwBmACAAdABoAGUAIABEAGkAZwBpAEMAZQByAHQAIABDAFAALwBDAFAA
    # UwAgAGEAbgBkACAAdABoAGUAIABSAGUAbAB5AGkAbgBnACAAUABhAHIAdAB5ACAA
    # QQBnAHIAZQBlAG0AZQBuAHQAIAB3AGgAaQBjAGgAIABsAGkAbQBpAHQAIABsAGkA
    # YQBiAGkAbABpAHQAeQAgAGEAbgBkACAAYQByAGUAIABpAG4AYwBvAHIAcABvAHIA
    # YQB0AGUAZAAgAGgAZQByAGUAaQBuACAAYgB5ACAAcgBlAGYAZQByAGUAbgBjAGUA
    # LjALBglghkgBhv1sAxUwHwYDVR0jBBgwFoAUFQASKxOYspkH7R7for5XDStnAs0w
    # HQYDVR0OBBYEFGFaTSS2STKdSip5GoNL9B6Jwcp9MH0GA1UdHwR2MHQwOKA2oDSG
    # Mmh0dHA6Ly9jcmwzLmRpZ2ljZXJ0LmNvbS9EaWdpQ2VydEFzc3VyZWRJRENBLTEu
    # Y3JsMDigNqA0hjJodHRwOi8vY3JsNC5kaWdpY2VydC5jb20v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KUYz
    # +iEa+UWYbT8CNohqx3jzzUUfG2eD1KihOSUqRf6KN55E6bnaPdGufRf10F1u6Bzd
    # osyyrJGvScPtjXscrYmuyUVvQmQCfdFFobmr8OnFC0gph61gDpX3upj8mLOAixha
    # o8aPY/gavp84QTsI2791Ulk27yPVCZg9PMD5UJdufb6KuGmeA78LOihd4uJb59ZE
    # 1dIiGNOXzkMB+wyyRbMC7vRZdhMkPr3xGtnK6KhUTRvATSPSIoIs8DaYZreVxnF+
    # d8gcPb40THPz9UGzHWAHMVkgov3Tk0PE8z9d6FRb75LRXE2XnwRUtOPmKQ==
    # SIG # End signature block
    
  • tools\chocolateyInstall\helpers\functions\UnInstall-ChocolateyZipPackage.ps1 Show
    # Copyright © 2017 Chocolatey Software, Inc.
    # Copyright © 2015 - 2017 RealDimensions Software, LLC
    # Copyright © 2011 - 2015 RealDimensions Software, LLC & original authors/contributors from https://github.com/chocolatey/chocolatey
    #
    # Licensed under the Apache License, Version 2.0 (the "License");
    # you may not use this file except in compliance with the License.
    # You may obtain a copy of the License at
    #
    #     http://www.apache.org/licenses/LICENSE-2.0
    #
    # Unless required by applicable law or agreed to in writing, software
    # distributed under the License is distributed on an "AS IS" BASIS,
    # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    # See the License for the specific language governing permissions and
    # limitations under the License.
    
    function Uninstall-ChocolateyZipPackage {
    <#
    .SYNOPSIS
    Uninstalls a previous installed zip package, may not be necessary.
    
    .DESCRIPTION
    This will uninstall a zip file if installed via Install-ChocolateyZipPackage.
    This is not necessary if the files are unzipped to the package directory.
    
    .NOTES
    Not necessary if files are unzippped to package directory.
    
    This helper reduces the number of lines one would have to remove the
    files extracted from a previously installed zip file.
    This method has error handling built into it.
    
    .INPUTS
    None
    
    .OUTPUTS
    None
    
    .PARAMETER PackageName
    The name of the package - while this is an arbitrary value, it's
    recommended that it matches the package id.
    
    .PARAMETER ZipFileName
    This is the zip filename originally installed.
    
    .PARAMETER IgnoredArguments
    Allows splatting with arguments that do not apply. Do not use directly.
    
    .EXAMPLE
    Uninstall-ChocolateyZipPackage '__NAME__' 'filename.zip'
    
    .LINK
    Install-ChocolateyZipPackage
    
    .LINK
    Uninstall-ChocolateyPackage
    #>
    param(
      [parameter(Mandatory=$true, Position=0)][string] $packageName,
      [parameter(Mandatory=$true, Position=1)][string] $zipFileName,
      [parameter(ValueFromRemainingArguments = $true)][Object[]] $ignoredArguments
    )
    
      Write-FunctionCallLogMessage -Invocation $MyInvocation -Parameters $PSBoundParameters
    
      $packagelibPath=$env:chocolateyPackageFolder
      $zipContentFile=(join-path $packagelibPath $zipFileName) + ".txt"
      if ((Test-Path -path $zipContentFile)) {
        $zipContentFile
        $zipContents=get-content $zipContentFile
        foreach ($fileInZip in $zipContents) {
          if ($fileInZip -ne $null -and $fileInZip.Trim() -ne '') {
            Remove-Item -Path "$fileInZip" -ErrorAction SilentlyContinue -Recurse -Force
          }
        }
      }
    }
    
    # SIG # Begin signature block
    # MIIcpwYJKoZIhvcNAQcCoIIcmDCCHJQCAQExDzANBglghkgBZQMEAgEFADB5Bgor
    # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
    # KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCAk6WW/GT/B7DPm
    # mdYeFsBLHrJbzvRl5OqZtt38MRIOlqCCF7EwggUwMIIEGKADAgECAhAECRgbX9W7
    # ZnVTQ7VvlVAIMA0GCSqGSIb3DQEBCwUAMGUxCzAJBgNVBAYTAlVTMRUwEwYDVQQK
    # EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xJDAiBgNV
    # BAMTG0RpZ2lDZXJ0IEFzc3VyZWQgSUQgUm9vdCBDQTAeFw0xMzEwMjIxMjAwMDBa
    # Fw0yODEwMjIxMjAwMDBaMHIxCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2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BAf8E
    # BAMCB4AwDAYDVR0TAQH/BAIwADAWBgNVHSUBAf8EDDAKBggrBgEFBQcDCDCCAb8G
    # A1UdIASCAbYwggGyMIIBoQYJYIZIAYb9bAcBMIIBkjAoBggrBgEFBQcCARYcaHR0
    # cHM6Ly93d3cuZGlnaWNlcnQuY29tL0NQUzCCAWQGCCsGAQUFBwICMIIBVh6CAVIA
    # QQBuAHkAIAB1AHMAZQAgAG8AZgAgAHQAaABpAHMAIABDAGUAcgB0AGkAZgBpAGMA
    # YQB0AGUAIABjAG8AbgBzAHQAaQB0AHUAdABlAHMAIABhAGMAYwBlAHAAdABhAG4A
    # YwBlACAAbwBmACAAdABoAGUAIABEAGkAZwBpAEMAZQByAHQAIABDAFAALwBDAFAA
    # UwAgAGEAbgBkACAAdABoAGUAIABSAGUAbAB5AGkAbgBnACAAUABhAHIAdAB5ACAA
    # QQBnAHIAZQBlAG0AZQBuAHQAIAB3AGgAaQBjAGgAIABsAGkAbQBpAHQAIABsAGkA
    # YQBiAGkAbABpAHQAeQAgAGEAbgBkACAAYQByAGUAIABpAG4AYwBvAHIAcABvAHIA
    # YQB0AGUAZAAgAGgAZQByAGUAaQBuACAAYgB5ACAAcgBlAGYAZQByAGUAbgBjAGUA
    # LjALBglghkgBhv1sAxUwHwYDVR0jBBgwFoAUFQASKxOYspkH7R7for5XDStnAs0w
    # HQYDVR0OBBYEFGFaTSS2STKdSip5GoNL9B6Jwcp9MH0GA1UdHwR2MHQwOKA2oDSG
    # Mmh0dHA6Ly9jcmwzLmRpZ2ljZXJ0LmNvbS9EaWdpQ2VydEFzc3VyZWRJRENBLTEu
    # Y3JsMDigNqA0hjJodHRwOi8vY3JsNC5kaWdpY2VydC5jb20vRGlnaUNlcnRBc3N1
    # cmVkSURDQS0xLmNybDB3BggrBgEFBQcBAQRrMGkwJAYIKwYBBQUHMAGGGGh0dHA6
    # Ly9vY3NwLmRpZ2ljZXJ0LmNvbTBBBggrBgEFBQcwAoY1aHR0cDovL2NhY2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YBBAGCNwIBBDAcBgorBgEEAYI3AgELMQ4wDAYKKwYBBAGC
    # NwIBFTAvBgkqhkiG9w0BCQQxIgQgC3dtgjrkXzv9LE59XKZLu+83weTxEFdjk49R
    # QEVxeaowDQYJKoZIhvcNAQEBBQAEggEACSfpcHq6GIf8G+Ucq67bZnTT9D4MFffm
    # Cbh3SyV2md9GfghHLD4cpURMVCWcnN2vOpydf4v3kpuxTtZIkd91S3A21cw5fh5K
    # 0k7hxXLanZKmiO65fnk1cQg1hybYv+f8uXqfxz+0o5O76UKQoEn3kukXlFw8nveG
    # tqGSyxtfUCGDRJTR+71Qrjn/kptKoTfgTLr452w3wVZtEZwnHauy7OjD3ihaYzvQ
    # t59SuUQlvBGi6OkPZrLv8FAtru1d0nHzi057VHQMiHlhHu2W7s/+kFyuP8QhL7/L
    # HrQZbc3BX2ctIogpAZtPnfir27qQwJJ1/wGpPbofJW59a8bHkR+vF6GCAg8wggIL
    # BgkqhkiG9w0BCQYxggH8MIIB+AIBATB2MGIxCzAJBgNVBAYTAlVTMRUwEwYDVQQK
    # EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xITAfBgNV
    # BAMTGERpZ2lDZXJ0IEFzc3VyZWQgSUQgQ0EtMQIQAwGaAjr/WLFr1tXq5hfwZjAJ
    # BgUrDgMCGgUAoF0wGAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAcBgkqhkiG9w0B
    # CQUxDxcNMTcwODA3MDAwNDU2WjAjBgkqhkiG9w0BCQQxFgQUvD605//NHuOX8jjv
    # NZyk+5/iXfYwDQYJKoZIhvcNAQEBBQAEggEANfdxwo+m36PoIJVTxuqbOnHvX2Xl
    # G8OoT7Hv97d9INm+xj4TnjAW806A4Su6UmEMP77e1z0Vxez5DTnzJJvXHuy94r4U
    # RFlLOvmvB19p3GrxuSf+5MVGcRFBU9//S54x5zLYoHhEdvl8W5M4RHmsia0dHb6J
    # IIz94h4Ff/smtkpcl0UnHbXEVdbOYyptzxkKSDYI+zLlT98y6JDpiGNNsUNAaLsG
    # rlCMXBTc29ANXbOqNkPE4VpPn3Wwjn5skECmwin0OoB0LTNJL1yXO7yZl5ddcled
    # r0hGQpHP2MENzMPN0Gz4lzM/vdkCgNxdBDx+HGsW0bLRh2OKPPDpEpuiFw==
    # SIG # End signature block
    
  • tools\chocolateyInstall\helpers\functions\Update-SessionEnvironment.ps1 Show
    # Copyright © 2017 Chocolatey Software, Inc.
    # Copyright © 2015 - 2017 RealDimensions Software, LLC
    # Copyright © 2011 - 2015 RealDimensions Software, LLC & original authors/contributors from https://github.com/chocolatey/chocolatey
    #
    # Licensed under the Apache License, Version 2.0 (the "License");
    # you may not use this file except in compliance with the License.
    # You may obtain a copy of the License at
    #
    #     http://www.apache.org/licenses/LICENSE-2.0
    #
    # Unless required by applicable law or agreed to in writing, software
    # distributed under the License is distributed on an "AS IS" BASIS,
    # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    # See the License for the specific language governing permissions and
    # limitations under the License.
    
    function Update-SessionEnvironment {
    <#
    .SYNOPSIS
    Updates the environment variables of the current powershell session with
    any environment variable changes that may have occured during a
    Chocolatey package install.
    
    .DESCRIPTION
    When Chocolatey installs a package, the package author may add or change
    certain environment variables that will affect how the application runs
    or how it is accessed. Often, these changes are not visible to the
    current PowerShell session. This means the user needs to open a new
    PowerShell session before these settings take effect which can render
    the installed application nonfunctional until that time.
    
    Use the Update-SessionEnvironment command to refresh the current
    PowerShell session with all environment settings possibly performed by
    Chocolatey package installs.
    
    .NOTES
    This method is also added to the user's PowerShell profile as
    `refreshenv`. When called as `refreshenv`, the method will provide
    additional output.
    
    Preserves `PSModulePath` as set by the process starting in 0.9.10.
    
    .INPUTS
    None
    
    .OUTPUTS
    None
    #>
    
      Write-FunctionCallLogMessage -Invocation $MyInvocation -Parameters $PSBoundParameters
    
      $refreshEnv = $false
      $invocation = $MyInvocation
      if ($invocation.InvocationName -eq 'refreshenv') {
        $refreshEnv = $true
      }
    
      if ($refreshEnv) {
        Write-Output "Refreshing environment variables from the registry for powershell.exe. Please wait..."
      } else {
        Write-Verbose "Refreshing environment variables from the registry."
      }
    
      $userName = $env:USERNAME
      $architecture = $env:PROCESSOR_ARCHITECTURE
      $psModulePath = $env:PSModulePath
    
      #ordering is important here, $user comes after so we can override $machine
      'Process', 'Machine', 'User' |
        % {
          $scope = $_
          Get-EnvironmentVariableNames -Scope $scope |
            % {
              Set-Item "Env:$($_)" -Value (Get-EnvironmentVariable -Scope $scope -Name $_)
            }
        }
    
      #Path gets special treatment b/c it munges the two together
      $paths = 'Machine', 'User' |
        % {
          (Get-EnvironmentVariable -Name 'PATH' -Scope $_) -split ';'
        } |
        Select -Unique
      $Env:PATH = $paths -join ';'
    
      # PSModulePath is almost always updated by process, so we want to preserve it.
      $env:PSModulePath = $psModulePath
    
      # reset user and architecture
      if ($userName) { $env:USERNAME = $userName; }
      if ($architecture) { $env:PROCESSOR_ARCHITECTURE = $architecture; }
    
      if ($refreshEnv) {
        Write-Output "Finished"
      }
    }
    
    Set-Alias refreshenv Update-SessionEnvironment
    
    # SIG # Begin signature block
    # MIIcpwYJKoZIhvcNAQcCoIIcmDCCHJQCAQExDzANBglghkgBZQMEAgEFADB5Bgor
    # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
    # KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCCL+pVj35SUMM5K
    # ZOZ/v+pTFxqKwmbwUPo2rRttrIrGbqCCF7EwggUwMIIEGKADAgECAhAECRgbX9W7
    # ZnVTQ7VvlVAIMA0GCSqGSIb3DQEBCwUAMGUxCzAJBgNVBAYTAlVTMRUwEwYDVQQK
    # EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xJDAiBgNV
    # BAMTG0RpZ2lDZXJ0IEFzc3VyZWQgSUQgUm9vdCBDQTAe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QEBCwUAA4IBAQCLBAE/
    # 2x4amEecDEoy9g+WmWMROiB4GnkPqj+IbiwftmwC5/7yL3/592HOFMJr0qOgUt51
    # moE8SuuLuOGw63c5+/48LJS4jP2XzbVNByRPIxPWorm4t/OzTJNziTowHQ+wLwwI
    # 8U97+8DaHCNL7iLZNEiqbVlpF3j7SMWGgf2BVYADJyxluNzf0ZUO+lXN4gOkM8tl
    # VDc7SjZEKvu6ckAaxXf7NPbCXVL/3+LvdmoLbT3vJlfzeXqduO3oieB10ic3ug5T
    # XtoYmyEk/P3yR3x/TqUlg1x/xaolBxy5TyMeSLcBlYn42fnQL154bvMGwFiCsHWQ
    # wY09I0xpEysOMiy8MIIGajCCBVKgAwIBAgIQAwGaAjr/WLFr1tXq5hfwZjANBgkq
    # hkiG9w0BAQUFADBiMQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5j
    # MRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSEwHwYDVQQDExhEaWdpQ2VydCBB
    # c3N1cmVkIElEIENBLTEwHhcNMTQxMDIyMDAwMDAwWhcNMjQxMDIyMDAwMDAwWjBH
    # MQswCQYDVQQGEwJVUzERMA8GA1UEChMIRGlnaUNlcnQxJTAjBgNVBAMTHERpZ2lD
    # ZXJ0IFRpbWVzdGFtcCBSZXNwb25kZXIwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAw
    # ggEKAoIBAQCjZF38fLPggjXg4PbGKuZJdTvMbuBTqZ8fZFnmfGt/a4ydVfiS457V
    # WmNbAklQ2YPOb2bu3cuF6V+l+dSHdIhEOxnJ5fWRn8YUOawk6qhLLJGJzF4o9GS2
    # ULf1ErNzlgpno75hn67z/RJ4dQ6mWxT9RSOOhkRVfRiGBYxVh3lIRvfKDo2n3k5f
    # 4qi2LVkCYYhhchhoubh87ubnNC8xd4EwH7s2AY3vJ+P3mvBMMWSN4+v6GYeofs/s
    # jAw2W3rBerh4x8kGLkYQyI3oBGDbvHN0+k7Y/qpA8bLOcEaD6dpAoVk62RUJV5lW
    # MJPzyWHM0AjMa+xiQpGsAsDvpPCJEY93AgMBAAGjggM1MIIDMTAOBgNVHQ8BAf8E
    # BAMCB4AwDAYDVR0TAQH/BAIwADAWBgNVHSUBAf8EDDAKBggrBgEFBQcDCDCCAb8G
    # A1UdIASCAbYwggGyMIIBoQYJYIZIAYb9bAcBMIIBkjAoBggrBgEFBQcCARYcaHR0
    # cHM6Ly93d3cuZGlnaWNlcnQuY29tL0NQUzCCAWQGCCsGAQUFBwICMIIBVh6CAVIA
    # QQBuAHkAIAB1AHMAZQAgAG8AZgAgAHQAaABpAHMAIABDAGUAcgB0AGkAZgBpAGMA
    # YQB0AGUAIABjAG8AbgBzAHQAaQB0AHUAdABlAHMAIABhAGMAYwBlAHAAdABhAG4A
    # YwBlACAAbwBmACAAdABoAGUAIABEAGkAZwBpAEMAZQByAHQAIABDAFAALwBDAFAA
    # UwAgAGEAbgBkACAAdABoAGUAIABSAGUAbAB5AGkAbgBnACAAUABhAHIAdAB5ACAA
    # QQBnAHIAZQBlAG0AZQBuAHQAIAB3AGgAaQBjAGgAIABsAGkAbQBpAHQAIABsAGkA
    # YQBiAGkAbABpAHQAeQAgAGEAbgBkACAAYQByAGUAIABpAG4AYwBvAHIAcABvAHIA
    # YQB0AGUAZAAgAGgAZQByAGUAaQBuACAAYgB5ACAAcgBlAGYAZQByAGUAbgBjAGUA
    # LjALBglghkgBhv1sAxUwHwYDVR0jBBgwFoAUFQASKxOYspkH7R7for5XDStnAs0w
    # HQYDVR0OBBYEFGFaTSS2STKdSip5GoNL9B6Jwcp9MH0GA1UdHwR2MHQwOKA2oDSG
    # Mmh0dHA6Ly9jcmwzLmRpZ2ljZXJ0LmNvbS9EaWdpQ2VydEFzc3VyZWRJRENBLTEu
    # Y3JsMDigNqA0hjJodHRwOi8vY3JsNC5kaWdpY2VydC5jb20vRGlnaUNlcnRBc3N1
    # cmVkSURDQS0xLmNybDB3BggrBgEFBQcBAQRrMGk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safyFAJJTe9hMgUVTWIjr
    # XBi4Set7acgictM+i0djxO4Qo9eSMtlWgAUB7dpw/B0Hu4vsEI3f8xdYx+Naa1Av
    # 0xytszonzZnB3jd0P0EX+c34iNeQgZ0MGubzoZBVH49jMilmEH89BPzIViHMFByv
    # nMBycFF5/9JTBLP0JvnTtaYMAt5WQ/sGmF6zUnjc05N3Mbcr+d4mmCpj+uP+IDqH
    # DR/9/V2HHiBsxD8vuH3J7iV+sNkWwnUWu6FwMW9sj3g/WzroZJa3tKC7jQ==
    # SIG # End signature block
    
  • tools\chocolateyInstall\helpers\functions\Write-ChocolateyFailure.ps1 Show
    # Copyright © 2017 Chocolatey Software, Inc.
    # Copyright © 2015 - 2017 RealDimensions Software, LLC
    # Copyright © 2011 - 2015 RealDimensions Software, LLC & original authors/contributors from https://github.com/chocolatey/chocolatey
    #
    # Licensed under the Apache License, Version 2.0 (the "License");
    # you may not use this file except in compliance with the License.
    # You may obtain a copy of the License at
    #
    #     http://www.apache.org/licenses/LICENSE-2.0
    #
    # Unless required by applicable law or agreed to in writing, software
    # distributed under the License is distributed on an "AS IS" BASIS,
    # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    # See the License for the specific language governing permissions and
    # limitations under the License.
    
    function Write-ChocolateyFailure {
    <#
    .SYNOPSIS
    DEPRECATED - DO NOT USE.
    
    .DESCRIPTION
    Throws the error message as an error.
    
    .NOTES
    This has been deprecated and is no longer useful as of 0.9.9. Instead
    please just use `throw $_.Exception` when catching errors. Although
    try/catch is no longer necessary unless you want to do some error
    handling.
    
    .INPUTS
    None
    
    .OUTPUTS
    None
    
    .PARAMETER PackageName
    The name of the package - while this is an arbitrary value, it's
    recommended that it matches the package id.
    
    .PARAMETER FailureMessage
    The message to throw an error with.
    
    .PARAMETER IgnoredArguments
    Allows splatting with arguments that do not apply. Do not use directly.
    
    .LINK
    Write-ChocolateySuccess
    #>
    param(
      [string] $packageName,
      [string] $failureMessage,
      [parameter(ValueFromRemainingArguments = $true)][Object[]] $ignoredArguments
    )
    
      Write-FunctionCallLogMessage -Invocation $MyInvocation -Parameters $PSBoundParameters
      Write-Warning "Write-ChocolateyFailure is deprecated and will be removed in v2. If you are the package maintainer, please use 'throw `$_.Exception' instead."
    
      $error | %{ $_.Exception | fl * | Out-String }
    
      throw "$failureMessage"
    }
    
    # SIG # Begin signature block
    # MIIcpwYJKoZIhvcNAQcCoIIcmDCCHJQCAQExDzANBglghkgBZQMEAgEFADB5Bgor
    # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
    # KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCA3Qn1zAetWAwLq
    # I1m1I1XXPWaYjpUoK/2sIfQrsYPZHaCCF7EwggUwMIIEGKADAgECAhAECRgbX9W7
    # ZnVTQ7VvlVAIMA0GCSqGSIb3DQEBCwUAMGUxCzAJBgNVBAYTAlVTMRUwEwYDVQQK
    # EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xJDAiBgNV
    # BAMTG0RpZ2lDZXJ0IEFzc3VyZWQgSUQgUm9vdCBDQTAeFw0xMzEwMjIxMjAwMDBa
    # Fw0yODEwMjIxMjAwMDBaMHIxCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2Vy
    # dCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xMTAvBgNVBAMTKERpZ2lD
    # ZXJ0IFNIQTIgQXNzdXJlZCBJRCBDb2RlIFNpZ25pbmcgQ0EwggEiMA0GCSqGSIb3
    # DQEBAQUAA4IBDwAwggEKAoIBAQD407Mcfw4Rr2d3B9MLMUkZz9D7RZmxOttE9X/l
    # qJ3bMtdx6nadBS63j/qSQ8Cl+YnUNxnXtqrwnIal2CWsDnkoOn7p0WfTxvspJ8fT
    # eyOU5JEjlpB3gvmhhCNmElQzUHSxKCa7JGnCwlLyFGeKiUXULaGj6YgsIJWuHEqH
    # CN8M9eJNYBi+qsSyrnAxZjNxPqxwoqvOf+l8y5Kh5TsxHM/q8grkV7tKtel05iv+
    # bMt+dDk2DZDv5LVOpKnqagqrhPOsZ061xPeM0SAlI+sIZD5SlsHyDxL0xY4PwaLo
    # LFH3c7y9hbFig3NBggfkOItqcyDQD2RzPJ6fpjOp/RnfJZPRAgMBAAGjggHNMIIB
    # yTASBgNVHRMBAf8ECDAGAQH/AgEAMA4GA1UdDwEB/wQEAwIBhjATBgNVHSUEDDAK
    # BggrBgEFBQcDAzB5BggrBgEFBQcBAQRtMGswJAYIKwYBBQUHMAGGGGh0dHA6Ly9v
    # Y3NwLmRpZ2ljZXJ0LmNvbTBDBggrBgEFBQcwAoY3aHR0cDovL2NhY2VydHMuZGln
    # aWNlcnQuY29tL0RpZ2lDZXJ0QXNzdXJlZElEUm9vdENBLmNydDCBgQYDVR0fBHow
    # eDA6oDigNoY0aHR0cDovL2NybDQuZGlnaWNlcnQuY29tL0RpZ2lDZXJ0QXNzdXJl
    # ZElEUm9vdENBLmNybDA6oDigNoY0aHR0cDovL2NybDMuZGlnaWNlcnQuY29tL0Rp
    # Z2lDZXJ0QXNzdXJlZElEUm9vdENBLmNybDBPBgNVHSAESDBGMDgGCmCGSAGG/WwA
    # AgQwKjAoBggrBgEFBQcCARYcaHR0cHM6Ly93d3cuZGlnaWNlcnQuY29tL0NQUzAK
    # BghghkgBhv1sAzAdBgNVHQ4EFgQUWsS5eyoKo6XqcQPAYPkt9mV1DlgwHwYDVR0j
    # BBgwFoAUReuir/SSy4IxLVGLp6chnfNtyA8wDQYJKoZIhvcNAQELBQADggEBAD7s
    # DVoks/Mi0RXILHwlKXaoHV0cLToaxO8wYdd+C2D9wz0PxK+L/e8q3yBVN7Dh9tGS
    # dQ9RtG6ljlriXiSBThCk7j9xjmMOE0ut119EefM2FAaK95xGTlz/kLEbBw6RFfu6
    # r7VRwo0kriTGxycqoSkoGjpxKAI8LpGjwCUR4p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BlAHAAdABhAG4A
    # YwBlACAAbwBmACAAdABoAGUAIABEAGkAZwBpAEMAZQByAHQAIABDAFAALwBDAFAA
    # UwAgAGEAbgBkACAAdABoAGUAIABSAGUAbAB5AGkAbgBnACAAUABhAHIAdAB5ACAA
    # QQBnAHIAZQBlAG0AZQBuAHQAIAB3AGgAaQBjAGgAIABsAGkAbQBpAHQAIABsAGkA
    # YQBiAGkAbABpAHQAeQAgAGEAbgBkACAAYQByAGUAIABpAG4AYwBvAHIAcABvAHIA
    # YQB0AGUAZAAgAGgAZQByAGUAaQBuACAAYgB5ACAAcgBlAGYAZQByAGUAbgBjAGUA
    # LjALBglghkgBhv1sAxUwHwYDVR0jBBgwFoAUFQASKxOYspkH7R7for5XDStnAs0w
    # HQYDVR0OBBYEFGFaTSS2STKdSip5GoNL9B6Jwcp9MH0GA1UdHwR2MHQwOKA2oDSG
    # Mmh0dHA6Ly9jcmwzLmRpZ2ljZXJ0LmNvbS9EaWdpQ2VydEFzc3VyZWRJRENBLTEu
    # Y3JsMDigNqA0hjJodHRwOi8vY3JsNC5kaWdpY2VydC5jb20vRGlnaUNlcnRBc3N1
    # cmVkSURDQS0xLmNybDB3BggrBgEFBQcBAQRrMGkwJAYIKwYBBQUHMAGGGGh0dHA6
    # Ly9vY3NwLmRpZ2ljZXJ0LmNvbTBBBggrBgEFBQcwAoY1aHR0cDovL2NhY2VydHMu
    # ZGlnaWNlcnQuY29tL0RpZ2lDZXJ0QXNzdXJlZElEQ0EtMS5jcnQwDQYJKoZIhvcN
    # AQEFBQADggEBAJ0lfhszTbImgVybhs4jIA+Ah+WI//+x1GosMe06FxlxF82pG7xa
    # FjkAneNshORaQPveBgGMN/qbsZ0kfv4gpFetW7easGAm6mlXIV00Lx9xsIOUGQVr
    # NZAQoHuXx/Y/5+IRQaa9YtnwJz04HShvOlIJ8OxwYtNiS7Dgc6aSwNOOMdgv420X
    # Ewbu5AO2FKvzj0OncZ0h3RTKFV2SQdr5D4HRmXQNJsQOfxu19aDxxncGKBXp2JPl
    # VRbwuwqrHNtcSCdmyKOLChzlldquxC5ZoGHd2vNtomHpigtt7BIYvfdVVEADkitr
    # wlHCCkivsNRu4PQUCjob4489yq9qjXvc2EQwggbNMIIFtaADAgECAhAG/fkDlgOt
    # 6gAK6z8nu7obMA0GCSqGSIb3DQEBBQUAMGUxCzAJBgNVBAYTAlVTMRUwEwYDVQQK
    # EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xJDAiBgNV
    # BAMTG0RpZ2lDZXJ0IEFzc3VyZWQgSUQgUm9vdCBDQTAeFw0wNjExMTAwMDAwMDBa
    # Fw0yMTExMTAwMDAwMDBaMGIxCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2Vy
    # dCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xITAfBgNVBAMTGERpZ2lD
    # ZXJ0IEFzc3VyZWQgSUQgQ0EtMTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC
    # ggEBAOiCLZn5ysJClaWAc0Bw0p5WVFypxNJBBo/JM/xNRZFcgZ/tLJz4FlnfnrUk
    # FcKYubR3SdyJxArar8tea+2tsHEx6886QAxGTZPsi3o2CAOrDDT+GEmC/sfHMUiA
    # fB6iD5IOUMnGh+s2P9gww/+m9/uizW9zI/6sVgWQ8DIhFonGcIj5BZd9o8dD3QLo
    # Oz3tsUGj7T++25VIxO4es/K8DCuZ0MZdEkKB4YNugnM/JksUkK5ZZgrEjb7Szgau
    # rYRvSISbT0C58Uzyr5j79s5AXVz2qPEvr+yJIvJrGGWxwXOt1/HYzx4KdFxCuGh+
    # t9V3CidWfA9ipD8yFGCV/QcEogkCAwEAAaOCA3owggN2MA4GA1UdDwEB/wQEAwIB
    # hjA7BgNVHSUENDAyBggrBgEFBQcDAQYIKwYBBQUHAwIGCCsGAQUFBwMDBggrBgEF
    # BQcDBAYIKwYBBQUHAwgwggHSBgNVHSAEggHJMIIB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G6zJk2w2DRtXZ/4M5ENNnR4LC6wOKjLRDx7dgRJfxGl2+4BRPIn
    # RGiD4A9aKViEKyZGZPVz5+Tr5zKm7uNvhHwfGJuP37BhYKNGKD/rA46tImzWGsX4
    # h7+oCb3xK2mi/tp+v0b/CznQboCCOoGj6Xb/n+sHElU5q42AvOc37KGCAg8wggIL
    # BgkqhkiG9w0BCQYxggH8MIIB+AIBATB2MGIxCzAJBgNVBAYTAlVTMRUwEwYDVQQK
    # EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xITAfBgNV
    # BAMTGERpZ2lDZXJ0IEFzc3VyZWQgSUQgQ0EtMQIQAwGaAjr/WLFr1tXq5hfwZjAJ
    # BgUrDgMCGgUAoF0wGAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAcBgkqhkiG9w0B
    # CQUxDxcNMTcwODA3MDAwNDU3WjAjBgkqhkiG9w0BCQQxFgQUFoJsKqPqMKOHiImf
    # xk1C3RdqR+UwDQYJKoZIhvcNAQEBBQAEggEAYyWV9PpkYiQkuDQbE+gHlu1u/ZnJ
    # NaoghYqUZVMwc/fN2QtinySarc+5UqEJiPodNVNuDW8+D6XF08F7ql/2RxJBg4iM
    # QXpIk4F0kH054PWhccDExMkyRN8JeqHxH9oMuKWmgfnuDFf8LSZsQdbrkD1VjOgd
    # +4Fil/fTzJkXrJmwiBaPU73yahJaHR5Ygzs5RiNCvkHd0591Teydqj0noCDeayYI
    # y5JQyjenKSSxbNA6ptxWFJh4c/at7K3/bQa83RCKvo/ghHoTTaswffIeXWHDz7pZ
    # QrDIZr0ezJrDef87N9/l0DZzUqz2W/b5sZQ3qAFWAyHVoLlHQ3Sch38Hxw==
    # SIG # End signature block
    
  • tools\chocolateyInstall\helpers\functions\Write-ChocolateySuccess.ps1 Show
    # Copyright © 2017 Chocolatey Software, Inc.
    # Copyright © 2015 - 2017 RealDimensions Software, LLC
    # Copyright © 2011 - 2015 RealDimensions Software, LLC & original authors/contributors from https://github.com/chocolatey/chocolatey
    #
    # Licensed under the Apache License, Version 2.0 (the "License");
    # you may not use this file except in compliance with the License.
    # You may obtain a copy of the License at
    #
    #     http://www.apache.org/licenses/LICENSE-2.0
    #
    # Unless required by applicable law or agreed to in writing, software
    # distributed under the License is distributed on an "AS IS" BASIS,
    # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    # See the License for the specific language governing permissions and
    # limitations under the License.
    
    function Write-ChocolateySuccess {
    <#
    .SYNOPSIS
    DEPRECATED - DO NOT USE.
    
    .DESCRIPTION
    Writes a success message for a package.
    
    .NOTES
    This has been deprecated and is no longer useful as of 0.9.9. Instead
    please just use `throw $_.Exception` when catching errors. Although
    try/catch is no longer necessary unless you want to do some error
    handling.
    
    .INPUTS
    None
    
    .OUTPUTS
    None
    
    .PARAMETER PackageName
    The name of the package - while this is an arbitrary value, it's
    recommended that it matches the package id.
    
    .PARAMETER IgnoredArguments
    Allows splatting with arguments that do not apply. Do not use directly.
    
    .LINK
    Write-ChocolateyFailure
    #>
    param(
      [string] $packageName,
      [parameter(ValueFromRemainingArguments = $true)][Object[]] $ignoredArguments
    )
    
      Write-FunctionCallLogMessage -Invocation $MyInvocation -Parameters $PSBoundParameters
      Write-Warning "Write-ChocolateySuccess is deprecated and will be removed in v2. If you are the maintainer, please remove it from your package file."
    }
    
    # SIG # Begin signature block
    # MIIcpwYJKoZIhvcNAQcCoIIcmDCCHJQCAQExDzANBglghkgBZQMEAgEFADB5Bgor
    # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
    # KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCCwgHB1+GbY0//D
    # jQLsZezFwlP3OHX5fdGkBcyfmm3vj6CCF7EwggUwMIIEGKADAgECAhAECRgbX9W7
    # ZnVTQ7VvlVAIMA0GCSqGSIb3DQEBCwUAMGUxCzAJBgNVBAYTAlVTMRU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xVh3lIRvfKDo2n3k5f
    # 4qi2LVkCYYhhchhoubh87ubnNC8xd4EwH7s2AY3vJ+P3mvBMMWSN4+v6GYeofs/s
    # jAw2W3rBerh4x8kGLkYQyI3oBGDbvHN0+k7Y/qpA8bLOcEaD6dpAoVk62RUJV5lW
    # MJPzyWHM0AjMa+xiQpGsAsDvpPCJEY93AgMBAAGjggM1MIIDMTAOBgNVHQ8BAf8E
    # BAMCB4AwDAYDVR0TAQH/BAIwADAWBgNVHSUBAf8EDDAKBggrBgEFBQcDCDCCAb8G
    # A1UdIASCAbYwggGyMIIBoQYJYIZIAYb9bAcBMIIBkjAoBggrBgEFBQcCARYcaHR0
    # cHM6Ly93d3cuZGlnaWNlcnQuY29tL0NQUzCCAWQGCCsGAQUFBwICMIIBVh6CAVIA
    # QQBuAHkAIAB1AHMAZQAgAG8AZgAgAHQAaABpAHMAIABDAGUAcgB0AGkAZgBpAGMA
    # YQB0AGUAIABjAG8AbgBzAHQAaQB0AHUAdABlAHMAIABhAGMAYwBlAHAAdABhAG4A
    # YwBlACAAbwBmACAAdABoAGUAIABEAGkAZwBpAEMAZQByAHQAIABDAFAALwBDAFAA
    # UwAgAGEAbgBkACAAdABoAGUAIABSAGUAbAB5AGkAbgBnACAAUABhAHIAdAB5ACAA
    # QQBnAHIAZQBlAG0AZQBuAHQAIAB3AGgAaQBjAGgAIABsAGkAbQBpAHQAIABsAGkA
    # YQBiAGkAbABpAHQAeQAgAGEAbgBkACAAYQByAGUAIABpAG4AYwBvAHIAcABvAHIA
    # YQB0AGUAZAAgAGgAZQByAGUAaQBuACAAYgB5ACAAcgBlAGYAZQByAGUAbgBjAGUA
    # LjALBglghkgBhv1sAxUwHwYDVR0jBBgwFoAUFQASKxOYspkH7R7for5XDStnAs0w
    # HQYDVR0OBBYEFGFaTSS2STKdSip5GoNL9B6Jwcp9MH0GA1UdHwR2MHQwOKA2oDSG
    # Mmh0dHA6Ly9jcmwzLmRpZ2ljZXJ0LmNvbS9EaWdpQ2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vOSfpl
    # rofnYF6wjxwwDQYJKoZIhvcNAQEBBQAEggEAJQKPIEAJaLVFltUYBOyU/7WlcAmM
    # MYtY9AqGf8Jmjts8wh+VQ4KGDiMG8bJZV0m1HrCI0OLACWxjQUnIeCo6SYxdW2Lm
    # cER7u5mQ3bJWc1rZUr6QI96rnpbyG2kFq6oLSMcCMU3h9JMaUXxdbUKBh/aKu2Rm
    # MN30fxFMNU6fOXZyL6aBPby+bFbX2ySTPDSA1rFBlJb/W8m4Iw2nnYCZZbK4cVdT
    # 6mzSEIofinAZA+qTa2xRZDmM4kp1imB/VOrT6a9zDhXSQcciXa29+O76d9FY+VlS
    # cFEi2ekOiJoIbibtjUftp5BA1ddvupd7MB6W4ZopFSb2aMUR9ef62zVxKw==
    # SIG # End signature block
    
  • tools\chocolateyInstall\helpers\functions\Write-FileUpdateLog.ps1 Show
    # Copyright © 2017 Chocolatey Software, Inc.
    # Copyright © 2015 - 2017 RealDimensions Software, LLC
    # Copyright © 2011 - 2015 RealDimensions Software, LLC & original authors/contributors from https://github.com/chocolatey/chocolatey
    #
    # Licensed under the Apache License, Version 2.0 (the "License");
    # you may not use this file except in compliance with the License.
    # You may obtain a copy of the License at
    #
    #     http://www.apache.org/licenses/LICENSE-2.0
    #
    # Unless required by applicable law or agreed to in writing, software
    # distributed under the License is distributed on an "AS IS" BASIS,
    # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    # See the License for the specific language governing permissions and
    # limitations under the License.
    
    function Write-FileUpdateLog {
    <#
    .SYNOPSIS
    DEPRECATED - DO NOT USE. Will be removed in v1.
    
    .DESCRIPTION
    Monitors a location and writes changes to a log file.
    
    .NOTES
    DEPRECATED.
    
    Has issues with paths longer than 260 characters. See
    https://github.com/chocolatey/choco/issues/156
    
    .INPUTS
    None
    
    .OUTPUTS
    None
    
    .PARAMETER LogFilePath
    The full path to where to write the log file.
    
    .PARAMETER LocationToMonitor
    The location to watch for changes at.
    
    .PARAMETER ScriptToRun
    The script block of what to run and monitor changes.
    
    .PARAMETER ArgumentList
    
    .PARAMETER IgnoredArguments
    Allows splatting with arguments that do not apply. Do not use directly.
    #>
    param (
      [string] $logFilePath,
      [string] $locationToMonitor,
      [scriptblock] $scriptToRun,
      [object[]] $argumentList,
      [parameter(ValueFromRemainingArguments = $true)][Object[]] $ignoredArguments
    )
    
      Write-FunctionCallLogMessage -Invocation $MyInvocation -Parameters $PSBoundParameters
      Write-Warning "Write-FileUpdateLog has been deprecated and will be removed in v1."
    
      Write-Debug "Tracking current state of `'$locationToMonitor`'"
      $originalContents = Get-ChildItem -Recurse $locationToMonitor | Select-Object LastWriteTimeUTC,FullName,Length
    
      Invoke-Command -ScriptBlock $scriptToRun -ArgumentList $argumentList
    
      $newContents = Get-ChildItem -Recurse $locationToMonitor | Select-Object LastWriteTimeUTC,FullName,Length
    
      if($originalContents -eq $null) {$originalContents = @()}
      if($newContents -eq $null) {$newContents = @()}
    
      $changedFiles = Compare-Object $originalContents $newContents -Property LastWriteTimeUtc,FullName,Length -PassThru | Group-Object FullName
    
      #log modified files
      $changedFiles | ? {$_.Count -gt 1} | % {$_.Name} | Add-Content $logFilePath
    
      #log added files
      $addOrDelete = $changedFiles | ? { $_.Count -eq 1 } | % {$_.Group}
      $addOrDelete | ? {$_.SideIndicator -eq "=>"} | % {$_.FullName} | Add-Content $logFilePath
    
      #log deleted files
      #$addOrDelete | ? {$_.SideIndicator -eq "<="} | % {$_.FullName} | Add-Content $logFilePath
    }
    
    # SIG # Begin signature block
    # MIIcpwYJKoZIhvcNAQcCoIIcmDCCHJQCAQExDzANBglghkgBZQMEAgEFADB5Bgor
    # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
    # KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCAMfunVzUcqp17q
    # 88uJZvW7XccGmgBOIpfFplPF9Hxpr6CCF7EwggUwMIIEGKADAgECAhAECRgbX9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XNzdXJlZElEUm9vdENBLmNydDCBgQYDVR0fBHow
    # eDA6oDigNoY0aHR0cDovL2NybDQuZGlnaWNlcnQuY29tL0RpZ2lDZXJ0QXNzdXJl
    # ZElEUm9vdENBLmNybDA6oDigNoY0aHR0cDovL2NybDMuZGlnaWNlcnQuY29tL0Rp
    # Z2lDZXJ0QXNzdXJlZElEUm9vdENBLmNybDBPBgNVHSAESDBGMDgGCmCGSAGG/WwA
    # AgQwKjAoBggrBgEFBQcCARYcaHR0cHM6Ly93d3cuZGlnaWNlcnQuY29tL0NQUzAK
    # BghghkgBhv1sAzAdBgNVHQ4EFgQUWsS5eyoKo6XqcQPAYPkt9mV1DlgwHwYDVR0j
    # BBgwFoAUReuir/SSy4IxLVGLp6chnfNtyA8wDQYJKoZIhvcNAQELBQADggEBAD7s
    # DVoks/Mi0RXILHwlKXaoHV0cLToaxO8wYdd+C2D9wz0PxK+L/e8q3yBVN7Dh9tGS
    # dQ9RtG6ljlriXiSBThCk7j9xjmMOE0ut119EefM2FAaK95xGTlz/kLEbBw6RFfu6
    # r7VRwo0kriTGxycqoSkoGjpxKAI8LpGjwCUR4pwUR6F6aGivm6dcIFzZcbEMj7uo
    # +MUSaJ/PQMtARKUT8OZkDCUIQjKyNookAv4vcn4c10lFluhZHen6dGRrsutmQ9qz
    # sIzV6Q3d9gEgzpkxYz0IGhizgZtPxpMQBvwHgfqL2vmCSfdibqFT+hKUGIUukpHq
    # aGxEMrJmoecYpJpkUe8wggU6MIIEIqADAgECAhAGsBFbtfCQ0/DaDmIsYn1YMA0G
    # CSqGSIb3DQEBCwUAMHIxCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2VydCBJ
    # bmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xMTAvBgNVBAMTKERpZ2lDZXJ0
    # IFNIQTIgQXNzdXJlZCBJRCBDb2RlIFNpZ25pbmcgQ0EwHhcNMTcwMzI4MDAwMDAw
    # WhcNMTgwNDAzMTIwMD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FBzAB
    # hhhodHRwOi8vb2NzcC5kaWdpY2VydC5jb20wTgYIKwYBBQUHMAKGQmh0dHA6Ly9j
    # YWNlcnRzLmRpZ2ljZXJ0LmNvbS9EaWdpQ2VydFNIQTJBc3N1cmVkSURDb2RlU2ln
    # bmluZ0NBLmNydDAMBgNVHRMBAf8EAjAAMA0GCSqGSIb3DQEBCwUAA4IBAQCLBAE/
    # 2x4amEecDEoy9g+WmWMROiB4GnkPqj+IbiwftmwC5/7yL3/592HOFMJr0qOgUt51
    # moE8SuuLuOGw63c5+/48LJS4jP2XzbVNByRPIxPWorm4t/OzTJNziTowHQ+wLwwI
    # 8U97+8DaHCNL7iLZNEiqbVlpF3j7SMWGgf2BVYADJyxluNzf0ZUO+lXN4gOkM8tl
    # VDc7SjZEKvu6ckAaxXf7NPbCXVL/3+LvdmoLbT3vJlfzeXqduO3oieB10ic3ug5T
    # XtoYmyEk/P3yR3x/TqUlg1x/xaolBxy5TyMeSLcBlYn42fnQL154bvMGwFiCsHWQ
    # wY09I0xpEysOMiy8MIIGajCCBVKgAwIBAgIQAwGaAjr/WLFr1tXq5hfwZjANBgkq
    # hkiG9w0BAQUFADBiMQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5j
    # MRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSEwHwYDVQQDExhEaWdpQ2VydCBB
    # c3N1cmVkIElEIENBLTEwHhcNMTQxMDIyMDAwMDAwWhcNMjQxMDIyMDAwMDAwWjBH
    # MQswCQYDVQQGEwJVUzERMA8GA1UEChMIRGlnaUNlcnQxJTAjBgNVBAMTHERpZ2lD
    # ZXJ0IFRpbWVzdGFtcCBSZXNwb25kZXIwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAw
    # ggEKAoIBAQCjZF38fLPggjXg4PbGKuZJdTvMbuBTqZ8fZFnmfGt/a4ydVfiS457V
    # WmNbAklQ2YPOb2bu3cuF6V+l+dSHdIhEOxnJ5fWRn8YUOawk6qhLLJGJzF4o9GS2
    # ULf1ErNzlgpno75hn67z/RJ4dQ6mWxT9RSOOhkRVfRiGBYxVh3lIRvfKDo2n3k5f
    # 4qi2LVkCYYhhchhoubh87ubnNC8xd4EwH7s2AY3vJ+P3mvBMMWSN4+v6GYeofs/s
    # jAw2W3rBerh4x8kGLkYQyI3oBGDbvHN0+k7Y/qpA8bLOcEaD6dpAoVk62RUJV5lW
    # MJPzyWHM0AjMa+xiQpGsAsDvpPCJEY93AgMBAAGjggM1MIIDMTAOBgNVHQ8BAf8E
    # BAMCB4AwDAYDVR0TAQH/BAIwADAWBgNVHSUBAf8EDDAKBggrBgEFBQcDCDCCAb8G
    # A1UdIASCAbYwggGyMIIBoQYJYIZIAYb9bAcBMIIBkjAoBggrBgEFBQcCARYcaHR0
    # cHM6Ly93d3cuZGlnaWNlcnQuY29tL0NQUzCCAWQGCCsGAQUFBwICMIIBVh6CAVIA
    # QQBuAHkAIAB1AHMAZQAgAG8AZgAgAHQAaABpAHMAIABDAGUAcgB0AGkAZgBpAGMA
    # YQB0AGUAIABjAG8AbgBzAHQAaQB0AHUAdABlAHMAIABhAGMAYwBlAHAAdABhAG4A
    # YwBlACAAbwBmACAAdABoAGUAIABEAGkAZwBpAEMAZQByAHQAIABDAFAALwBDAFAA
    # UwAgAGEAbgBkACAAdABoAGUAIABSAGUAbAB5AGkAbgBnACAAUABhAHIAdAB5ACAA
    # QQBnAHIAZQBlAG0AZQBuAHQAIAB3AGgAaQBjAGgAIABsAGkAbQBpAHQAIABsAGkA
    # YQBiAGkAbABpAHQAeQAgAGEAbgBkACAAYQByAGUAIABpAG4AYwBvAHIAcABvAHIA
    # YQB0AGUAZAAgAGgAZQByAGUAaQBuACAAYgB5ACAAcgBlAGYAZQByAGUAbgBjAGUA
    # LjALBglghkgBhv1sAxUwHwYDVR0jBBgwFoAUFQASKxOYspkH7R7for5XDStnAs0w
    # HQYDVR0OBBYEFGFaTSS2STKdSip5GoNL9B6Jwcp9MH0GA1UdHwR2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w0B
    # CQUxDxcNMTcwODA3MDAwNDU4WjAjBgkqhkiG9w0BCQQxFgQU9y0IXgIIdKoVPMIi
    # dLxV+GUxrsYwDQYJKoZIhvcNAQEBBQAEggEAH+r/znxIr/n3Wx9FUNQY4bez0si5
    # mPnqRyXnMIY6nFtJvxkE+mzMuBi4X5bVZik1Lztll+3e4sfrjeXMeSElzX7zHjzB
    # 6FHQ0qdsA0dwagcatIdpWd8FW6mNONLevO/RQAdrOqpqzACRjjNDO4CW0uukZ9ce
    # UrzG+xwSytUts4YTTanFvZRJOUCPFzBDvHI1tDmm9OcjOC0yYwAlhUz6hOsj+BZK
    # xu0AiybhdKYZoY9lJodPwu3KqaIWuP8Kss6v7PQzSyhMfzZZ6p+V7rCncWT8jcWN
    # fXB6UX4zcZHMFO9KFDJ04PE9l0kaczUsx4Ni2eB/mRXaC35be3kDDVoLiA==
    # SIG # End signature block
    
  • tools\chocolateyInstall\helpers\functions\Write-FunctionCallLogMessage.ps1 Show
    # Copyright © 2017 Chocolatey Software, Inc.
    # Copyright © 2011 - 2017 RealDimensions Software, LLC
    #
    # Licensed under the Apache License, Version 2.0 (the "License");
    # you may not use this file except in compliance with the License.
    #
    # You may obtain a copy of the License at
    #
    #   http://www.apache.org/licenses/LICENSE-2.0
    #
    # Unless required by applicable law or agreed to in writing, software
    # distributed under the License is distributed on an "AS IS" BASIS,
    # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    # See the License for the specific language governing permissions and
    # limitations under the License.
    
    function Write-FunctionCallLogMessage {
    <#
    .SYNOPSIS
    DO NOT USE. Not part of the public API.
    
    .DESCRIPTION
    Writes function call as a debug message.
    
    .NOTES
    Available in 0.10.2+.
    
    This function is not part of the API.
    
    .INPUTS
    None
    
    .OUTPUTS
    None
    
    .PARAMETER Invocation
    The invocation of the function (`$MyInvocation`)
    
    .PARAMETER Parameters
    The parameters passed to the function (`$PSBoundParameters`)
    
    .PARAMETER IgnoredArguments
    Allows splatting with arguments that do not apply. Do not use directly.
    
    .EXAMPLE
    >
    # This is how this function should always be called
    Write-FunctionCallLogMessage -Invocation $MyInvocation -Parameters $PSBoundParameters
    
    #>
    param (
      $invocation,
      $parameters,
      [parameter(ValueFromRemainingArguments = $true)][Object[]] $ignoredArguments
    )
    
      # do not log function call - recursion?
    
      $argumentsPassed = ''
      foreach ($param in $parameters.GetEnumerator()) {
        if ($param.Key -eq 'ignoredArguments') { continue; }
        $paramValue = $param.Value -Join ' '
        if ($param.Key -eq 'sensitiveStatements' -or $param.Key -eq 'password') {
          $paramValue = '[REDACTED]'
        }
        $argumentsPassed += "-$($param.Key) '$paramValue' "
      }
    
      Write-Debug "Running $($invocation.InvocationName) $argumentsPassed"
    }
    
    # SIG # Begin signature block
    # MIIcpwYJKoZIhvcNAQcCoIIcmDCCHJQCAQExDzANBglghkgBZQMEAgEFADB5Bgor
    # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
    # KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCDwc6a/JCQvq6xR
    # ClDTi0YceHW/G/7JB6/qzXt45R9blaCCF7EwggUwMIIEGKADAgECAhAECRgbX9W7
    # ZnVTQ7VvlVAIMA0GCSqGSIb3DQEBCwUAMGUxCzAJBgNVBAYTAlVTMRUwEwYDVQQK
    # EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xJDAiBgNV
    # BAMTG0RpZ2lDZXJ0IEFzc3VyZWQgSUQgUm9vdCBDQTAeFw0xMzEwMjIxMjAwMDBa
    # Fw0yODEwMjIxMjAwMDBaMHIxCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2Vy
    # dCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xMTAvBgNVBAMTKERpZ2lD
    # ZXJ0IFNIQTIgQXNzdXJlZCBJRCBDb2RlIFNpZ25pbmcgQ0Ew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DQYJKoZIhvcNAQELBQADggEBAD7s
    # DVoks/Mi0RXILHwlKXaoHV0cLToaxO8wYdd+C2D9wz0PxK+L/e8q3yBVN7Dh9tGS
    # dQ9RtG6ljlriXiSBThCk7j9xjmMOE0ut119EefM2FAaK95xGTlz/kLEbBw6RFfu6
    # r7VRwo0kriTGxycqoSkoGjpxKAI8LpGjwCUR4pwUR6F6aGivm6dcIFzZcbEMj7uo
    # +MUSaJ/PQMtARKUT8OZkDCUIQjKyNookAv4vcn4c10lFluhZHen6dGRrsutmQ9qz
    # sIzV6Q3d9gEgzpkxYz0IGhizgZtPxpMQBvwHgfqL2vmCSfdibqFT+hKUGIUukpHq
    # aGxEMrJmoecYpJpkUe8wggU6MIIEIqADAgECAhAGsBFbtfCQ0/DaDmIsYn1YMA0G
    # CSqGSIb3DQEBCwUAMHIxCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2VydCBJ
    # bmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xMTAvBgNVBAMTKERpZ2lDZXJ0
    # IFNIQTIgQXNzdXJlZCBJRCBDb2RlIFNpZ25pbmcgQ0EwHhcNMTcwMzI4MDAwMDAw
    # WhcNMTgwNDAzMTIwMDAwWjB3MQswCQYDVQQGEwJVUzEPMA0GA1UECBMGS2Fuc2Fz
    # MQ8wDQYDVQQHEwZUb3Bla2ExIjAgBgNVBAoTGUNob2NvbGF0ZXkgU29mdHdhcmUs
    # IEluYy4xIjAgBgNVBAMTGUNob2NvbGF0ZXkgU29mdHdhcmUsIEluYy4wggEiMA0G
    # CSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDLIWIaEiqkPbIMZi6jD6J8F3YIYPxG
    # 3Vw2I8AsM5c63WUmV+bYZQGxY5AHHVFphy9mU6spXgAqVpzkcALjo1oArVscUU34
    # 8S4mokGbZVvHlO8ny1b1HzfR4ZPHpUL71btSqpcOElYOOL0wUnf5As/39VN+Wxef
    # //D5KTDD17AA2DVvIaXMT+utERb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FBQcCARYcaHR0
    # cHM6Ly93d3cuZGlnaWNlcnQuY29tL0NQUzCCAWQGCCsGAQUFBwICMIIBVh6CAVIA
    # QQBuAHkAIAB1AHMAZQAgAG8AZgAgAHQAaABpAHMAIABDAGUAcgB0AGkAZgBpAGMA
    # YQB0AGUAIABjAG8AbgBzAHQAaQB0AHUAdABlAHMAIABhAGMAYwBlAHAAdABhAG4A
    # YwBlACAAbwBmACAAdABoAGUAIABEAGkAZwBpAEMAZQByAHQAIABDAFAALwBDAFAA
    # UwAgAGEAbgBkACAAdABoAGUAIABSAGUAbAB5AGkAbgBnACAAUABhAHIAdAB5ACAA
    # QQBnAHIAZQBlAG0AZQBuAHQAIAB3AGgAaQBjAGgAIABsAGkAbQBpAHQAIABsAGkA
    # YQBiAGkAbABpAHQAeQAgAGEAbgBkACAAYQByAGUAIABpAG4AYwBvAHIAcABvAHIA
    # YQB0AGUAZAAgAGgAZQByAGUAaQBuACAAYgB5ACAAcgBlAGYAZQByAGUAbgBjAGUA
    # LjALBglghkgBhv1sAxUwHwYDVR0jBBgwFoAUFQASKxOYspkH7R7for5XDStnAs0w
    # HQYDVR0OBBYEFGFaTSS2STKdSip5GoNL9B6Jwcp9MH0GA1UdHwR2MHQwOKA2oDSG
    # Mmh0dHA6Ly9jcmwzLmRpZ2ljZXJ0LmNvbS9EaWdpQ2VydEFzc3VyZWRJRENBLTEu
    # Y3JsMDigNqA0hjJodHRwOi8vY3JsNC5kaWdpY2VydC5jb20vRGlnaUNlcnRBc3N1
    # cmVkSURDQS0xLmNybDB3BggrBgEFBQcBAQRrMGkwJAYIKwYBBQUHMAGGGGh0dHA6
    # Ly9vY3NwLmRpZ2ljZXJ0LmNvbTBBBggrBgEFBQcwAoY1aHR0cDovL2NhY2VydHMu
    # ZGlnaWNlcnQuY29tL0RpZ2lDZXJ0QXNzdXJlZElEQ0EtMS5jcnQwDQYJKoZIhvcN
    # AQEFBQADggEBAJ0lfhszTbImgVybhs4jIA+Ah+WI//+x1GosMe06FxlxF82pG7xa
    # FjkAneNshORaQPveBgGMN/qbsZ0kfv4gpFetW7easGAm6mlXIV00Lx9xsIOUGQVr
    # NZAQoHuXx/Y/5+IRQaa9YtnwJz04HShvOlIJ8OxwYtNiS7Dgc6aSwNOOMdgv420X
    # Ewbu5AO2FKvzj0OncZ0h3RTKFV2SQdr5D4HRmXQNJsQOfxu19aDxxncGKBXp2JPl
    # VRbwuwqrHNtcSCdmyKOLChzlldquxC5ZoGHd2vNtomHpigtt7BIYvfdVVEADkitr
    # wlHCCkivsNRu4PQUCjob4489yq9qjXvc2EQwggbNMIIFtaADAgECAhAG/fkDlgOt
    # 6gAK6z8nu7obMA0GCSqGSIb3DQEBBQUAMGUxCzAJBgNVBAYTAlVTMRUwEwYDVQQK
    # EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xJDAiBgNV
    # BAMTG0RpZ2lDZXJ0IEFzc3VyZWQgSUQgUm9vdCBDQTAeFw0wNjExMTAwMDAwMDBa
    # Fw0yMTExMTAwMDAwMDBaMGIxCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2Vy
    # dCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xITAfBgNVBAMTGERpZ2lD
    # ZXJ0IEFzc3VyZWQgSUQgQ0EtMTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC
    # ggEBAOiCLZn5ysJClaWAc0Bw0p5WVFypxNJBBo/JM/xNRZFcgZ/tLJz4FlnfnrUk
    # FcKYubR3SdyJxArar8tea+2tsHEx6886QAxGTZPsi3o2CAOrDDT+GEmC/sfHMUiA
    # fB6iD5IOUMnGh+s2P9gww/+m9/uizW9zI/6sVgWQ8DIhFonGcIj5BZd9o8dD3QLo
    # Oz3tsUGj7T++25VIxO4es/K8DCuZ0MZdEkKB4YNugnM/JksUkK5ZZgrEjb7Szgau
    # rYRvSISbT0C58Uzyr5j79s5AXVz2qPEvr+yJIvJr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ob
    # jNA1sUWxcwxDTPDp/gT0TBqzF9lDhy8XTvpVA3eqx4tN77587ZbJNQYb4g==
    # SIG # End signature block
    
  • tools\chocolateyInstall\LICENSE.txt Show
       Copyright (c) 2017 Chocolatey Software, Inc.
       Copyright (c) 2011 - 2017 RealDimensions Software, LLC
    
       Licensed under the Apache License, Version 2.0 (the "License");
       you may not use this file except in compliance with the License.
       You may obtain a copy of the License at
    
           http://www.apache.org/licenses/LICENSE-2.0
    
       Unless required by applicable law or agreed to in writing, software
       distributed under the License is distributed on an "AS IS" BASIS,
       WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       See the License for the specific language governing permissions and
       limitations under the License.
  • tools\chocolateyInstall\redirects\choco.exe Show
    md5: 27D48D7DEB71EBA983E889329C38AAA5 | sha1: D43C997E7200BFB2E9CA10E0A08C4BA9FC04F1A8 | sha256: A552C27BC9853E974FBBE825827EE291D51C6FBB9A3B0F2536AFDD6D33D9276A | sha512: 06E81CECF38F9959A93DE4D4A38EEFFDF216949DA9DEF0F245223630C8DEF3F0BC4A0B66B3C0184D45965089760408886B5AEEA1DEA7C879292390DB72ADAD8A
  • tools\chocolateyInstall\redirects\choco.exe.ignore
  • tools\chocolateyInstall\redirects\chocolatey.exe Show
    md5: 61D78A454F5BB40585123F67B6101B2D | sha1: 7DEFB8273453AA83B5AF9770FB08CEB3365B85AB | sha256: C30581CDC89F4659240C08E7F1F36B2CCA9325880D51167C5185EEABE263824B | sha512: 65B02F731DC749D1430642909F58441F5A34BDEC39BFC0E3A40518721C0BDD7843F1B7696F705133E9B296691FA264F67003B5BC8DEFF858F70134558F9D745D
  • tools\chocolateyInstall\redirects\chocolatey.exe.ignore
  • tools\chocolateyInstall\redirects\cinst.exe Show
    md5: 21BCDD91DBE7AA8157D662B8A96A9221 | sha1: 03D41E15477586E4BF517232EAD80F1F08379F82 | sha256: FFF015BCBA4E1E15E5D726E9D86DCF258CAA3CFF540336CD3D3C4E379972602D | sha512: 5B931DB47F5EC943EA913939F68A5BDF82956F37C8FA28468718FC534321C3CA57067D98DB34995667A62B7618DD486CAC11229BE1EB3A46A20EAC034B62FA58
  • tools\chocolateyInstall\redirects\cinst.exe.ignore
  • tools\chocolateyInstall\redirects\clist.exe Show
    md5: 8583E7884051CC1E7F2E4AD24247B18B | sha1: 54325B43531947584684ACE6332775CAFBF1D71B | sha256: 6EF74A5AE71685BF24E69C50F63BDEC4D57A85F5422A185B514EE6EE147C8270 | sha512: 35D5DFE0A4D09120B55A5CDE3CE0011A48052AEC1F79FAD32ED83329D747D4145425E39C102B8448760215306F28628BC8B7607544E5A40772B0C993EADE686A
  • tools\chocolateyInstall\redirects\clist.exe.ignore
  • tools\chocolateyInstall\redirects\cpack.exe Show
    md5: D6840E20F0F8D31EE41F9B37EB93BA61 | sha1: A8F7920278B876AD0F0012A036C778FA6E71505F | sha256: 69318B9AD99B27F76B80F1F5C537E588F49ED2E0FF576CFA9B9C92891CE3C491 | sha512: 8C2E39F8E633283242D3416B2EFFC7C0515F5B6119FE1354F044BBAF5AB4D199D0634CE4913BE8AE835E6CABDB2ADFF16D92C782CEAC71DFF4AF5F0540924A0F
  • tools\chocolateyInstall\redirects\cpack.exe.ignore
  • tools\chocolateyInstall\redirects\cpush.exe Show
    md5: 4220BDDACC44FD3C43C852CA92481B9F | sha1: A83F58E4275383488C82D1C519FB44E6A98008CF | sha256: 7E0EB4ECB2C4445CF368556F46253C84E804A81E595758DC58E479DAE27BE612 | sha512: A0E8316C451826F611C49636B34058625A4403E58248482A75DD1807FC2B8A0F2B26D8B5F7A44C778E6D48FE84425218E5B00304FB4703565A776CD5ADE19A68
  • tools\chocolateyInstall\redirects\cpush.exe.ignore
  • tools\chocolateyInstall\redirects\cuninst.exe Show
    md5: 814A4DD2512E653F04E998528E771665 | sha1: 3C17E9C409658798DD689C01E3C7DCC8F25A70AC | sha256: FA72B2C43B84E74A5A3BB0ED0C2BD07DF1F89701675339274E091B5B9C4EAB49 | sha512: 1265A194AC9FD40DC0AFB18A7BCBF3B9FFF491172FBD4884C80B0831B2C4C74D172B0EBF4891DAF5FB9C9F42A9AEC94859C4CB7B48CFBC2EEB54E120EABBCF29
  • tools\chocolateyInstall\redirects\cuninst.exe.ignore
  • tools\chocolateyInstall\redirects\cup.exe Show
    md5: 5511EC67C714D462FF8F99C301FEBCFD | sha1: 72499B89DFDDDB64077D0F100945AF69A2D2DF17 | sha256: 7EFF129159019195F171CE33CC17E8C8FD3C5005E538A2BBC8410E7A176C9282 | sha512: 2848AF51CFE346B2CB8D996A9EB1709350D1166243DCBC93FBED67237629A090DD885327A17CD91132AD4678A21C2550E33A65C51CF60FEA475FD83E1E0EB9C4
  • tools\chocolateyInstall\redirects\cup.exe.ignore
  • tools\chocolateyInstall\redirects\cver.exe Show
    md5: 700F55FD1D598299E2A2977549AA6DE1 | sha1: 87CA93037358B8426A840F766B920A63287D403C | sha256: CD2526F70F5A3BD6A20796B88521737D02A3809F364034FB324E8FC126E16BA1 | sha512: 9046E52AE501A738A51B0F47E12A60C719EEFE200E9F9F4F656038CCCBB9E3E3A46493A1DC4A4D67097307A75DAEA29B5217FD1CCE8F1A1761609BA64EAAE13C
  • tools\chocolateyInstall\redirects\cver.exe.ignore
  • tools\chocolateyInstall\redirects\RefreshEnv.cmd Show
    @echo off
    ::
    :: RefreshEnv.cmd
    ::
    :: Batch file to read environment variables from registry and
    :: set session variables to these values.
    ::
    :: With this batch file, there should be no need to reload command
    :: environment every time you want environment changes to propagate
    
    ::echo "RefreshEnv.cmd only works from cmd.exe, please install the Chocolatey Profile to take advantage of refreshenv from PowerShell"
    echo | set /p dummy="Refreshing environment variables from registry for cmd.exe. Please wait..."
    
    goto main
    
    :: Set one environment variable from registry key
    :SetFromReg
        "%WinDir%\System32\Reg" QUERY "%~1" /v "%~2" > "%TEMP%\_envset.tmp" 2>NUL
        for /f "usebackq skip=2 tokens=2,*" %%A IN ("%TEMP%\_envset.tmp") do (
            echo/set "%~3=%%B"
        )
        goto :EOF
    
    :: Get a list of environment variables from registry
    :GetRegEnv
        "%WinDir%\System32\Reg" QUERY "%~1" > "%TEMP%\_envget.tmp"
        for /f "usebackq skip=2" %%A IN ("%TEMP%\_envget.tmp") do (
            if /I not "%%~A"=="Path" (
                call :SetFromReg "%~1" "%%~A" "%%~A"
            )
        )
        goto :EOF
    
    :main
        [email protected] off >"%TEMP%\_env.cmd"
    
        :: Slowly generating final file
        call :GetRegEnv "HKLM\System\CurrentControlSet\Control\Session Manager\Environment" >> "%TEMP%\_env.cmd"
        call :GetRegEnv "HKCU\Environment">>"%TEMP%\_env.cmd" >> "%TEMP%\_env.cmd"
    
        :: Special handling for PATH - mix both User and System
        call :SetFromReg "HKLM\System\CurrentControlSet\Control\Session Manager\Environment" Path Path_HKLM >> "%TEMP%\_env.cmd"
        call :SetFromReg "HKCU\Environment" Path Path_HKCU >> "%TEMP%\_env.cmd"
    
        :: Caution: do not insert space-chars before >> redirection sign
        echo/set "Path=%%Path_HKLM%%;%%Path_HKCU%%" >> "%TEMP%\_env.cmd"
    
        :: Cleanup
        del /f /q "%TEMP%\_envset.tmp" 2>nul
        del /f /q "%TEMP%\_envget.tmp" 2>nul
    
        :: capture user / architecture
        SET "OriginalUserName=%USERNAME%"
        SET "OriginalArchitecture=%PROCESSOR_ARCHITECTURE%"
    
        :: Set these variables
        call "%TEMP%\_env.cmd"
    
        :: reset user / architecture
        SET "USERNAME=%OriginalUserName%"
        SET "PROCESSOR_ARCHITECTURE=%OriginalArchitecture%"
    
        echo | set /p dummy="Finished."
        echo .
    
  • tools\chocolateyInstall\tools\7z.dll Show
    md5: FFA8EFF0712BEA1D1576FE25AD66371D | sha1: BB0688D07703AC66538FC99688C3F43C5A345904 | sha256: 271B01107B1FEC5231409F8DB91463D7B9A9D482D782971A1C4B6C5D12629F12 | sha512: D3FED12839F0086335080F640A6DA3480FD267B368347FD2D904D02D3CAABD52ABB698541D488D401001B1628D6851609BCFC257CBD418253BFA4A06B3757311
  • tools\chocolateyInstall\tools\7z.dll.manifest Show
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
      <assemblyIdentity version="1.0.0.0" name="7z" processorArchitecture="*" type="win32" />
      <trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
        <security>
          <requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
            <requestedExecutionLevel level="asInvoker" uiAccess="false" />
          </requestedPrivileges>
        </security>
      </trustInfo>
    </assembly>
    
  • tools\chocolateyInstall\tools\7z.exe Show
    md5: E7957B74BEFE1B2451C460B111C8E86F | sha1: 97F654A97989002EE1193D4BCA8CE0E47F016805 | sha256: 27A05F5C210DA07E1EDB7C0E6EB995B26B0164E8BFF38478ED12036D463B2B19 | sha512: 627AC61D84DE45F19668EFDE5825FADEF7AD4F393F058502B68CD179869527C66E1D7901B149FE0BE43C42505123977329402322AED0D8E0F5BF9D4E9945905D
  • tools\chocolateyInstall\tools\7z.exe.ignore
  • tools\chocolateyInstall\tools\7z.exe.manifest Show
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
      <assemblyIdentity version="1.0.0.0" name="7z" processorArchitecture="*" type="win32" />
      <trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
        <security>
          <requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
            <requestedExecutionLevel level="asInvoker" uiAccess="false" />
          </requestedPrivileges>
        </security>
      </trustInfo>
    </assembly>
    
  • tools\chocolateyInstall\tools\7zip.license.txt Show
      7-Zip
      ~~~~~
      License for use and distribution
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
      7-Zip Copyright (C) 1999-2016 Igor Pavlov.
    
      Licenses for files are:
    
        1) 7z.dll: GNU LGPL + unRAR restriction
        2) All other files:  GNU LGPL
    
      The GNU LGPL + unRAR restriction means that you must follow both 
      GNU LGPL rules and unRAR restriction rules.
    
    
      Note: 
        You can use 7-Zip on any computer, including a computer in a commercial 
        organization. You don't need to register or pay for 7-Zip.
    
    
      GNU LGPL information
      --------------------
    
        This library is free software; you can redistribute it and/or
        modify it under the terms of the GNU Lesser General Public
        License as published by the Free Software Foundation; either
        version 2.1 of the License, or (at your option) any later version.
    
        This library is distributed in the hope that it will be useful,
        but WITHOUT ANY WARRANTY; without even the implied warranty of
        MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
        Lesser General Public License for more details.
    
        You can receive a copy of the GNU Lesser General Public License from 
        http://www.gnu.org/
    
    
      unRAR restriction
      -----------------
    
        The decompression engine for RAR archives was developed using source 
        code of unRAR program.
        All copyrights to original unRAR code are owned by Alexander Roshal.
    
        The license for original unRAR code has the following restriction:
    
          The unRAR sources cannot be used to re-create the RAR compression algorithm, 
          which is proprietary. Distribution of modified unRAR sources in separate form 
          or as a part of other software is permitted, provided that it is clearly
          stated in the documentation and source comments that the code may
          not be used to develop a RAR (WinRAR) compatible archiver.
    
    
      --
      Igor Pavlov
    
  • tools\chocolateyInstall\tools\checksum.exe Show
    md5: BCA6374520A93FB27368EE4CA952EC54 | sha1: 8A44E584C52E96A235480B5F53A0BB2FC5D74F69 | sha256: 9A50D10CCA72DE7EC3D8C9FD42FC51BD978E0E8C4F7B438B90A2E30D8220D35A | sha512: 4DF6FFB2AFC2B11E830A086E214FE545F2BBB7B1EF8B501C56EB4D3BA8BC81066FCE8E95F46D218DDB9AA31455F1E471F79A4558B070A0F5284B46EAEC035632
  • tools\chocolateyInstall\tools\checksum.exe.config Show
    <?xml version="1.0" encoding="utf-8"?>
    <configuration>
        <runtime>
            <enforceFIPSPolicy enabled="false"/>
        </runtime>
    </configuration>
  • tools\chocolateyInstall\tools\checksum.exe.ignore
  • tools\chocolateyInstall\tools\checksum.license.txt Show
    CheckSum is licensed as Apache v2 - https://raw.github.com/ferventcoder/checksum/master/LICENSE
  • tools\chocolateyInstall\tools\shimgen.exe Show
    md5: 9EC68D58E5E3FD9CA2E098ED6539A1A0 | sha1: C99E977D77085185950034120C07193BB2974CF9 | sha256: 2C8C8232E3C4D16865B4C3C446FD24B5B9C7F9305A4A0245183D242EB5A26BDC | sha512: 4180CE0861C7F8A3241866E3809762CC06FD2633B22DF19C5E3E1B46FF1BAA28E697C5BC1B3B103045B9FC49B94933E373E091574A3B20D1D5E6E0EA6BE7E1B7
  • tools\chocolateyInstall\tools\shimgen.exe.ignore
  • tools\chocolateyInstall\tools\shimgen.license.txt Show
    Shim Generator - shimgen.exe
    Copyright (C) 2013 - 2017 RealDimensions Software, LLC ("RDS")
    ===================================================================
    Grant of License
    ===================================================================
    ATTENTION: Shim Generator ("shimgen.exe") is a closed source application with
    a proprietary license and its use is strictly limited to the terms of this 
    license agreement.
    
    RealDimensions Software, LLC ("RDS") grants Chocolatey Software, Inc a revocable, 
    non-exclusive license to distribute and use shimgen.exe with the official 
    Chocolatey client (https://chocolatey.org). This license file must be stored in 
    Chocolatey source next to shimgen.exe and distributed with every copy of 
    shimgen.exe. The distribution or use of shimgen.exe outside of these terms 
    without the express written permission of RDS is strictly prohibited.
    
    While the source for shimgen.exe is closed source, the shims have reference 
    source at https://github.com/chocolatey/shimgen/tree/master/shim.
    
    ===================================================================
    End-User License Agreement
    ===================================================================
    EULA - Shim Generator
    
    IMPORTANT- READ CAREFULLY: This RealDimensions Software, LLC ("RDS") End-User License
    Agreement ("EULA") is a legal agreement between you ("END USER") and RDS for all 
    RDS products, controls, source code, demos, intermediate files, media, printed 
    materials, and "online" or electronic documentation (collectively "SOFTWARE 
    PRODUCT(S)") contained with this distribution.
    
    RDS grants to you as an individual or entity, a personal, non-exclusive license 
    to install and use the SOFTWARE PRODUCT(S) for the sole purpose of use with the 
    official Chocolatey client. By installing, copying, or otherwise using the 
    SOFTWARE PRODUCT(S), END USER agrees to be bound by the terms of this EULA. If 
    END USER does not agree to any part of the terms of this EULA, DO NOT INSTALL, 
    USE, OR EVALUATE, ANY PART, FILE OR PORTION OF THE SOFTWARE PRODUCT(S).
    
    In no event shall RDS be liable to END USER for damages, including any direct, 
    indirect, special, incidental, or consequential damages of any character arising
    as a result of the use or inability to use the SOFTWARE PRODUCT(S) (including 
    but not limited to damages for loss of goodwill, work stoppage, computer failure
    or malfunction, or any and all other commercial damages or losses).
    
    The liability of RDS to END USER for any reason and upon any cause of action 
    related to the performance of the work under this agreement whether in tort or 
    in contract or otherwise shall be limited to the amount paid by the END USER to 
    RDS pursuant to this agreement or as determined by written agreement signed 
    by both RDS and END USER.
    
    ALL SOFTWARE PRODUCT(S) are licensed not sold. If you are an individual, you 
    must acquire an individual license for the SOFTWARE PRODUCT(S) from RDS or its 
    authorized resellers. If you are an entity, you must acquire an individual license 
    for each machine running the SOFTWARE PRODUCT(S) within your organization from RDS 
    or its authorized resellers. Both virtual and physical machines running the SOFTWARE 
    PRODUCT(S) must be counted in the SOFTWARE PRODUCT(S) licenses quantity of the 
    organization.
    
    ===================================================================
    Commercial / Personal Licensing
    ===================================================================
    Shim Generator ("shimgen.exe") is also offered under personal and commercial 
    licenses. You can learn more by contacting RDS at http://ferventcoder.com.
  • tools\chocolateysetup.psm1 Show
    $thisScriptFolder = (Split-Path -parent $MyInvocation.MyCommand.Definition)
    $chocInstallVariableName = "ChocolateyInstall"
    $sysDrive = $env:SystemDrive
    $tempDir = $env:TEMP
    $defaultChocolateyPathOld = "$sysDrive\Chocolatey"
    
    $originalForegroundColor = $host.ui.RawUI.ForegroundColor
    
    function Write-ChocolateyWarning {
    param (
      [string]$message = ''
    )
    
      try {
        Write-Host "WARNING: $message" -ForegroundColor "Yellow" -ErrorAction "Stop"
      } catch {
        Write-Output "WARNING: $message"
      }
    }
    
    function  Write-ChocolateyError {
    param (
      [string]$message = ''
    )
    
      try {
        Write-Host "ERROR: $message" -ForegroundColor "Red" -ErrorAction "Stop"
      } catch {
        Write-Output "ERROR: $message"
      }
    }
    
    function Initialize-Chocolatey {
    <#
      .DESCRIPTION
        This will initialize the Chocolatey tool by
          a) setting up the "chocolateyPath" (the location where all chocolatey nuget packages will be installed)
          b) Installs chocolatey into the "chocolateyPath"
                c) Instals .net 4.0 if needed
          d) Adds Chocolatey to the PATH environment variable so you have access to the choco commands.
      .PARAMETER  ChocolateyPath
        Allows you to override the default path of (C:\ProgramData\chocolatey\) by specifying a directory chocolatey will install nuget packages.
    
      .EXAMPLE
        C:\PS> Initialize-Chocolatey
    
        Installs chocolatey into the default C:\ProgramData\Chocolatey\ directory.
    
      .EXAMPLE
        C:\PS> Initialize-Chocolatey -chocolateyPath "D:\ChocolateyInstalledNuGets\"
    
        Installs chocolatey into the custom directory D:\ChocolateyInstalledNuGets\
    
    #>
    param(
      [Parameter(Mandatory=$false)][string]$chocolateyPath = ''
    )
      Write-Debug "Initialize-Chocolatey"
    
      $installModule = Join-Path $thisScriptFolder 'chocolateyInstall\helpers\chocolateyInstaller.psm1'
      Import-Module $installModule -Force
    
      if ($chocolateyPath -eq '') {
        $programData = [Environment]::GetFolderPath("CommonApplicationData")
        $chocolateyPath = Join-Path "$programData" 'chocolatey'
      }
    
      # variable to allow insecure directory:
      $allowInsecureRootInstall = $false
      if ($env:ChocolateyAllowInsecureRootDirectory -eq 'true') { $allowInsecureRootInstall = $true }
    
      # if we have an already environment variable path, use it.
      $alreadyInitializedNugetPath = Get-ChocolateyInstallFolder
      if ($alreadyInitializedNugetPath -and $alreadyInitializedNugetPath -ne $chocolateyPath -and ($allowInsecureRootInstall -or $alreadyInitializedNugetPath -ne $defaultChocolateyPathOld)){
        $chocolateyPath = $alreadyInitializedNugetPath
      }
      else {
        Set-ChocolateyInstallFolder $chocolateyPath
      }
      Create-DirectoryIfNotExists $chocolateyPath
      Ensure-Permissions $chocolateyPath
    
      #set up variables to add
      $chocolateyExePath = Join-Path $chocolateyPath 'bin'
      $chocolateyLibPath = Join-Path $chocolateyPath 'lib'
    
      if ($tempDir -eq $null) {
        $tempDir = Join-Path $chocolateyPath 'temp'
        Create-DirectoryIfNotExists $tempDir
      }
    
      $yourPkgPath = [System.IO.Path]::Combine($chocolateyLibPath,"yourPackageName")
    @"
    We are setting up the Chocolatey package repository.
    The packages themselves go to `'$chocolateyLibPath`'
      (i.e. $yourPkgPath).
    A shim file for the command line goes to `'$chocolateyExePath`'
      and points to an executable in `'$yourPkgPath`'.
    
    Creating Chocolatey folders if they do not already exist.
    
    "@ | Write-Output
    
      Write-ChocolateyWarning "You can safely ignore errors related to missing log files when `n  upgrading from a version of Chocolatey less than 0.9.9. `n  'Batch file could not be found' is also safe to ignore. `n  'The system cannot find the file specified' - also safe."
    
      #create the base structure if it doesn't exist
      Create-DirectoryIfNotExists $chocolateyExePath
      Create-DirectoryIfNotExists $chocolateyLibPath
    
      Install-ChocolateyFiles $chocolateyPath
      Ensure-ChocolateyLibFiles $chocolateyLibPath
    
      Install-ChocolateyBinFiles $chocolateyPath $chocolateyExePath
    
      $chocolateyExePathVariable = $chocolateyExePath.ToLower().Replace($chocolateyPath.ToLower(), "%DIR%..\").Replace("\\","\")
      Initialize-ChocolateyPath $chocolateyExePath $chocolateyExePathVariable
      Process-ChocolateyBinFiles $chocolateyExePath $chocolateyExePathVariable
    
      $realModule = Join-Path $chocolateyPath "helpers\chocolateyInstaller.psm1"
      Import-Module "$realModule" -Force
    
      if (-not $allowInsecureRootInstall -and (Test-Path($defaultChocolateyPathOld))) {
        Upgrade-OldChocolateyInstall $defaultChocolateyPathOld $chocolateyPath
        Install-ChocolateyBinFiles $chocolateyPath $chocolateyExePath
      }
    
      Add-ChocolateyProfile
      Install-DotNet4IfMissing
      if ($env:ChocolateyExitCode -eq $null -or $env:ChocolateyExitCode -eq '') {
        $env:ChocolateyExitCode = 0
      }
    
    @"
    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.
    "@ | write-Output
    
      if (-not $allowInsecureRootInstall) {
        Remove-OldChocolateyInstall $defaultChocolateyPathOld
      }
    }
    
    function Set-ChocolateyInstallFolder {
    param(
      [string]$folder
    )
      Write-Debug "Set-ChocolateyInstallFolder"
    
      $environmentTarget = [System.EnvironmentVariableTarget]::User
      # removing old variable
      Install-ChocolateyEnvironmentVariable -variableName "$chocInstallVariableName" -variableValue $null -variableType $environmentTarget
      if (Test-ProcessAdminRights) {
        Write-Debug "Administrator installing so using Machine environment variable target instead of User."
        $environmentTarget = [System.EnvironmentVariableTarget]::Machine
        # removing old variable
        Install-ChocolateyEnvironmentVariable -variableName "$chocInstallVariableName" -variableValue $null -variableType $environmentTarget
      } else {
        Write-ChocolateyWarning "Setting ChocolateyInstall Environment Variable on USER and not SYSTEM variables.`n  This is due to either non-administrator install OR the process you are running is not being run as an Administrator."
      }
    
      Write-Output "Creating $chocInstallVariableName as an environment variable (targeting `'$environmentTarget`') `n  Setting $chocInstallVariableName to `'$folder`'"
      Write-ChocolateyWarning "It's very likely you will need to close and reopen your shell `n  before you can use choco."
      Install-ChocolateyEnvironmentVariable -variableName "$chocInstallVariableName" -variableValue "$folder" -variableType $environmentTarget
    }
    
    function Get-ChocolateyInstallFolder(){
      Write-Debug "Get-ChocolateyInstallFolder"
      [Environment]::GetEnvironmentVariable($chocInstallVariableName)
    }
    
    function Create-DirectoryIfNotExists($folderName){
      Write-Debug "Create-DirectoryIfNotExists"
      if (![System.IO.Directory]::Exists($folderName)) { [System.IO.Directory]::CreateDirectory($folderName) | Out-Null }
    }
    
    function Get-LocalizedWellKnownPrincipalName {
    param (
      [Parameter(Mandatory = $true)]
      [Security.Principal.WellKnownSidType] $WellKnownSidType
    )
      $sid = New-Object -TypeName 'System.Security.Principal.SecurityIdentifier' -ArgumentList @($WellKnownSidType, $null)
      $account = $sid.Translate([Security.Principal.NTAccount])
    
      return $account.Value
    }
    
    function Ensure-Permissions {
    param(
      [string]$folder
    )
      Write-Debug "Ensure-Permissions"
    
      $defaultInstallPath = "$env:SystemDrive\ProgramData\chocolatey"
      try {
        $defaultInstallPath = Join-Path ([Environment]::GetFolderPath("CommonApplicationData")) 'chocolatey'
      } catch {
          # keep first setting
      }
    
      if ($folder.ToLower() -ne $defaultInstallPath.ToLower()) {
        Write-ChocolateyWarning "Installation folder is not the default. Not changing permissions. Please ensure your installation is secure."
        return
      }
    
      # Everything from here on out applies to the default installation folder
    
      if (!(Test-ProcessAdminRights)) {
        throw "Installation of Chocolatey to default folder requires Administrative permissions. Please run from elevated prompt. Please see https://chocolatey.org/install for details and alternatives if needing to install as a non-administrator."
      }
    
      $currentEA = $ErrorActionPreference
      $ErrorActionPreference = 'Stop'
      try {
        # get current acl
        $acl = (Get-Item $folder).GetAccessControl('Access,Owner')
    
        Write-Debug "Removing existing permissions."
        $acl.Access | % { $acl.RemoveAccessRuleAll($_) }
    
        $inheritanceFlags = ([Security.AccessControl.InheritanceFlags]::ContainerInherit -bor [Security.AccessControl.InheritanceFlags]::ObjectInherit)
        $propagationFlags = [Security.AccessControl.PropagationFlags]::None
    
        $rightsFullControl = [Security.AccessControl.FileSystemRights]::FullControl
        $rightsModify = [Security.AccessControl.FileSystemRights]::Modify
        $rightsReadExecute = [Security.AccessControl.FileSystemRights]::ReadAndExecute
        $rightsWrite = [Security.AccessControl.FileSystemRights]::Write
    
        Write-Output "Restricting write permissions to Administrators"
        $builtinAdmins = Get-LocalizedWellKnownPrincipalName -WellKnownSidType ([Security.Principal.WellKnownSidType]::BuiltinAdministratorsSid)
        $adminsAccessRule = New-Object System.Security.AccessControl.FileSystemAccessRule($builtinAdmins, $rightsFullControl, $inheritanceFlags, $propagationFlags, "Allow")
        $acl.SetAccessRule($adminsAccessRule)
        $localSystem = Get-LocalizedWellKnownPrincipalName -WellKnownSidType ([Security.Principal.WellKnownSidType]::LocalSystemSid)
        $localSystemAccessRule = New-Object System.Security.AccessControl.FileSystemAccessRule($localSystem, $rightsFullControl, $inheritanceFlags, $propagationFlags, "Allow")
        $acl.SetAccessRule($localSystemAccessRule)
        $builtinUsers = Get-LocalizedWellKnownPrincipalName -WellKnownSidType ([Security.Principal.WellKnownSidType]::BuiltinUsersSid)
        $usersAccessRule = New-Object System.Security.AccessControl.FileSystemAccessRule($builtinUsers, $rightsReadExecute, $inheritanceFlags, $propagationFlags, "Allow")
        $acl.SetAccessRule($usersAccessRule)
    
        $allowCurrentUser = $env:ChocolateyInstallAllowCurrentUser -eq 'true'
        if ($allowCurrentUser) {
          # get current user
          $currentUser = [Security.Principal.WindowsIdentity]::GetCurrent()
    
          if ($currentUser.Name -ne $localSystem) {
            $userAccessRule = New-Object System.Security.AccessControl.FileSystemAccessRule($currentUser.Name, $rightsModify, $inheritanceFlags, $propagationFlags, "Allow")
            Write-ChocolateyWarning 'Adding Modify permission for current user due to $env:ChocolateyInstallAllowCurrentUser. This could lead to escalation of privilege attacks. Consider not allowing this.'
            $acl.SetAccessRule($userAccessRule)
          }
        } else {
          Write-Debug 'Current user no longer set due to possible escalation of privileges - set $env:ChocolateyInstallAllowCurrentUser="true" if you require this.'
        }
    
        Write-Debug "Set Owner to Administrators"
        $builtinAdminsSid = New-Object System.Security.Principal.SecurityIdentifier([Security.Principal.WellKnownSidType]::BuiltinAdministratorsSid, $null)
        $acl.SetOwner($builtinAdminsSid)
    
        Write-Debug "Default Installation folder - removing inheritance with no copy"
        $acl.SetAccessRuleProtection($true, $false)
    
        # enact the changes against the actual
        (Get-Item $folder).SetAccessControl($acl)
    
        # set an explicit append permission on the logs folder
        Write-Debug "Allow users to append to log files."
        $logsFolder = "$folder\logs"
        Create-DirectoryIfNotExists $logsFolder
        $logsAcl = (Get-Item $logsFolder).GetAccessControl('Access')
        $usersAppendAccessRule = New-Object System.Security.AccessControl.FileSystemAccessRule($builtinUsers, $rightsWrite, [Security.AccessControl.InheritanceFlags]::ObjectInherit, [Security.AccessControl.PropagationFlags]::InheritOnly, "Allow")
        $logsAcl.SetAccessRule($usersAppendAccessRule)
        $logsAcl.SetAccessRuleProtection($false, $true)
        (Get-Item $logsFolder).SetAccessControl($logsAcl)
      } catch {
        Write-ChocolateyWarning "Not able to set permissions for $folder."
      }
      $ErrorActionPreference = $currentEA
    }
    
    function Upgrade-OldChocolateyInstall {
    param(
      [string]$chocolateyPathOld = "$sysDrive\Chocolatey",
      [string]$chocolateyPath =  "$($env:ALLUSERSPROFILE)\chocolatey"
    )
    
      Write-Debug "Upgrade-OldChocolateyInstall"
    
      if (Test-Path $chocolateyPathOld) {
        Write-Output "Attempting to upgrade `'$chocolateyPathOld`' to `'$chocolateyPath`'."
        Write-ChocolateyWarning "Copying the contents of `'$chocolateyPathOld`' to `'$chocolateyPath`'. `n This step may fail if you have anything in this folder running or locked."
        Write-Output 'If it fails, just manually copy the rest of the items out and then delete the folder.'
        Write-ChocolateyWarning "!!!! ATTN: YOU WILL NEED TO CLOSE AND REOPEN YOUR SHELL !!!!"
        #-ForegroundColor Magenta -BackgroundColor Black
    
        $chocolateyExePathOld = Join-Path $chocolateyPathOld 'bin'
        'Machine', 'User' |
        % {
          $path = Get-EnvironmentVariable -Name 'PATH' -Scope $_
          $updatedPath = [System.Text.RegularExpressions.Regex]::Replace($path,[System.Text.RegularExpressions.Regex]::Escape($chocolateyExePathOld) + '(?>;)?', '', [System.Text.RegularExpressions.RegexOptions]::IgnoreCase)
          if ($updatedPath -ne $path) {
            Write-Output "Updating `'$_`' PATH to reflect removal of '$chocolateyPathOld'."
            try {
              Set-EnvironmentVariable -Name 'Path' -Value $updatedPath -Scope $_ -ErrorAction Stop
            } catch {
              Write-ChocolateyWarning "Was not able to remove the old environment variable from PATH. You will need to do this manually"
            }
    
          }
        }
    
        Copy-Item "$chocolateyPathOld\lib\*" "$chocolateyPath\lib" -force -recurse
    
        $from = "$chocolateyPathOld\bin"
        $to = "$chocolateyPath\bin"
        $exclude = @("choco.exe", "chocolatey.exe", "cinst.exe", "clist.exe", "cpack.exe", "cpush.exe", "cuninst.exe", "cup.exe", "cver.exe", "RefreshEnv.cmd")
        Get-ChildItem -Path $from -recurse -Exclude $exclude |
          % {
            Write-Debug "Copying $_ `n to $to"
            if ($_.PSIsContainer) {
              Copy-Item $_ -Destination (Join-Path $to $_.Parent.FullName.Substring($from.length)) -Force -ErrorAction SilentlyContinue
            } else {
              $fileToMove = (Join-Path $to $_.FullName.Substring($from.length))
              try {
               Copy-Item $_ -Destination $fileToMove -Exclude $exclude -Force -ErrorAction Stop
              }
              catch {
                Write-ChocolateyWarning "Was not able to move `'$fileToMove`'. You may need to reinstall the shim"
              }
            }
          }
      }
    }
    
    function Remove-OldChocolateyInstall {
    param(
      [string]$chocolateyPathOld = "$sysDrive\Chocolatey"
    )
      Write-Debug "Remove-OldChocolateyInstall"
    
      if (Test-Path $chocolateyPathOld) {
        Write-ChocolateyWarning "This action will result in Log Errors, you can safely ignore those. `n You may need to finish removing '$chocolateyPathOld' manually."
        try {
          Get-ChildItem -Path "$chocolateyPathOld" | % {
            if (Test-Path $_.FullName) {
              Write-Debug "Removing $_ unless matches .log"
              Remove-Item $_.FullName -exclude *.log -recurse -force -ErrorAction SilentlyContinue
            }
          }
    
          Write-Output "Attempting to remove `'$chocolateyPathOld`'. This may fail if something in the folder is being used or locked."
          Remove-Item "$($chocolateyPathOld)" -force -recurse -ErrorAction Stop
        }
        catch {
          Write-ChocolateyWarning "Was not able to remove `'$chocolateyPathOld`'. You will need to manually remove it."
        }
      }
    }
    
    function Install-ChocolateyFiles {
    param(
      [string]$chocolateyPath
    )
      Write-Debug "Install-ChocolateyFiles"
    
      Write-Debug "Removing install files in chocolateyInstall, helpers, redirects, and tools"
      "$chocolateyPath\chocolateyInstall", "$chocolateyPath\helpers", "$chocolateyPath\redirects", "$chocolateyPath\tools" | % {
        #Write-Debug "Checking path $_"
    
        if (Test-Path $_) {
          Get-ChildItem -Path "$_" | % {
            #Write-Debug "Checking child path $_ ($($_.FullName))"
            if (Test-Path $_.FullName) {
              Write-Debug "Removing $_ unless matches .log"
              Remove-Item $_.FullName -exclude *.log -recurse -force -ErrorAction SilentlyContinue
            }
          }
        }
      }
    
      Write-Debug "Attempting to move choco.exe to choco.exe.old so we can place the new version here."
      # rename the currently running process / it will be locked if it exists
      $chocoExe = Join-Path $chocolateyPath 'choco.exe'
      if (Test-Path ($chocoExe)) {
        Write-Debug "Renaming '$chocoExe' to '$chocoExe.old'"
        try {
          Remove-Item "$chocoExe.old" -force -ErrorAction SilentlyContinue
          Move-Item $chocoExe "$chocoExe.old" -force -ErrorAction SilentlyContinue
        }
        catch {
          Write-ChocolateyWarning "Was not able to rename `'$chocoExe`' to `'$chocoExe.old`'."
        }
      }
    
      Write-Debug "Unpacking files required for Chocolatey."
      $chocInstallFolder = Join-Path $thisScriptFolder "chocolateyInstall"
      $chocoExe = Join-Path $chocInstallFolder 'choco.exe'
      $chocoExeDest = Join-Path $chocolateyPath 'choco.exe'
      Copy-Item $chocoExe $chocoExeDest -force
    
      Write-Debug "Copying the contents of `'$chocInstallFolder`' to `'$chocolateyPath`'."
      Copy-Item $chocInstallFolder\* $chocolateyPath -Recurse -Force
    }
    
    function Ensure-ChocolateyLibFiles {
    param(
      [string]$chocolateyLibPath
    )
      Write-Debug "Ensure-ChocolateyLibFiles"
      $chocoPkgDirectory = Join-Path $chocolateyLibPath 'chocolatey'
    
      Create-DirectoryIfNotExists $chocoPkgDirectory
    
      if (!(Test-Path("$chocoPkgDirectory\chocolatey.nupkg"))) {
        Write-Output "chocolatey.nupkg file not installed in lib.`n Attempting to locate it from bootstrapper."
        $chocoZipFile = Join-Path $tempDir "chocolatey\chocInstall\chocolatey.zip"
    
        Write-Debug "First the zip file at '$chocoZipFile'."
        Write-Debug "Then from a neighboring chocolatey.*nupkg file '$thisScriptFolder/../../'."
    
        if (Test-Path("$chocoZipFile")) {
          Write-Debug "Copying '$chocoZipFile' to '$chocoPkgDirectory\chocolatey.nupkg'."
          Copy-Item "$chocoZipFile" "$chocoPkgDirectory\chocolatey.nupkg" -Force -ErrorAction SilentlyContinue
        }
    
        if (!(Test-Path("$chocoPkgDirectory\chocolatey.nupkg"))) {
          $chocoPkg = Get-ChildItem "$thisScriptFolder/../../" | ?{$_.name -match "^chocolatey.*nupkg" } | Sort name -Descending | Select -First 1
          if ($chocoPkg -ne '') { $chocoPkg = $chocoPkg.FullName }
          "$chocoZipFile", "$chocoPkg" | % {
            if ($_ -ne $null -and $_ -ne '') {
              if (Test-Path $_) {
                Write-Debug "Copying '$_' to '$chocoPkgDirectory\chocolatey.nupkg'."
                Copy-Item $_ "$chocoPkgDirectory\chocolatey.nupkg" -Force -ErrorAction SilentlyContinue
              }
            }
          }
        }
      }
    }
    
    function Install-ChocolateyBinFiles {
    param(
      [string] $chocolateyPath,
      [string] $chocolateyExePath
    )
      Write-Debug "Install-ChocolateyBinFiles"
      Write-Debug "Installing the bin file redirects"
      $redirectsPath = Join-Path $chocolateyPath 'redirects'
      if (!(Test-Path "$redirectsPath")) {
        Write-ChocolateyWarning "$redirectsPath does not exist"
        return
      }
    
      $exeFiles = Get-ChildItem "$redirectsPath" -include @("*.exe","*.cmd") -recurse
      foreach ($exeFile in $exeFiles) {
        $exeFilePath = $exeFile.FullName
        $exeFileName = [System.IO.Path]::GetFileName("$exeFilePath")
        $binFilePath = Join-Path $chocolateyExePath $exeFileName
        $binFilePathRename = $binFilePath + '.old'
        $batchFilePath = $binFilePath.Replace(".exe",".bat")
        $bashFilePath = $binFilePath.Replace(".exe","")
        if (Test-Path ($batchFilePath)) { Remove-Item $batchFilePath -force -ErrorAction SilentlyContinue }
        if (Test-Path ($bashFilePath)) { Remove-Item $bashFilePath -force -ErrorAction SilentlyContinue }
        if (Test-Path ($binFilePathRename)) {
          try {
            Write-Debug "Attempting to remove $binFilePathRename"
            Remove-Item $binFilePathRename -force -ErrorAction Stop
          }
          catch {
            Write-ChocolateyWarning "Was not able to remove `'$binFilePathRename`'. This may cause errors."
          }
        }
        if (Test-Path ($binFilePath)) {
         try {
            Write-Debug "Attempting to rename $binFilePath to $binFilePathRename"
            Move-Item -path $binFilePath -destination $binFilePathRename -force -ErrorAction Stop
          }
          catch {
            Write-ChocolateyWarning "Was not able to rename `'$binFilePath`' to `'$binFilePathRename`'."
          }
        }
    
        try {
          Write-Debug "Attempting to copy $exeFilePath to $binFilePath"
          Copy-Item -path $exeFilePath -destination $binFilePath -force -ErrorAction Stop
        }
        catch {
          Write-ChocolateyWarning "Was not able to replace `'$binFilePath`' with `'$exeFilePath`'. You may need to do this manually."
        }
    
        $commandShortcut = [System.IO.Path]::GetFileNameWithoutExtension("$exeFilePath")
        Write-Debug "Added command $commandShortcut"
      }
    }
    
    function Initialize-ChocolateyPath {
    param(
      [string]$chocolateyExePath = "$($env:ALLUSERSPROFILE)\chocolatey\bin",
      [string]$chocolateyExePathVariable = "%$($chocInstallVariableName)%\bin"
    )
      Write-Debug "Initialize-ChocolateyPath"
      Write-Debug "Initializing Chocolatey Path if required"
      $environmentTarget = [System.EnvironmentVariableTarget]::User
      if (Test-ProcessAdminRights) {
        Write-Debug "Administrator installing so using Machine environment variable target instead of User."
        $environmentTarget = [System.EnvironmentVariableTarget]::Machine
      } else {
        Write-ChocolateyWarning "Setting ChocolateyInstall Path on USER PATH and not SYSTEM Path.`n  This is due to either non-administrator install OR the process you are running is not being run as an Administrator."
      }
    
      Install-ChocolateyPath -pathToInstall "$chocolateyExePath" -pathType $environmentTarget
    }
    
    function Process-ChocolateyBinFiles {
    param(
      [string]$chocolateyExePath = "$($env:ALLUSERSPROFILE)\chocolatey\bin",
      [string]$chocolateyExePathVariable = "%$($chocInstallVariableName)%\bin"
    )
      Write-Debug "Process-ChocolateyBinFiles"
      $processedMarkerFile = Join-Path $chocolateyExePath '_processed.txt'
      if (!(test-path $processedMarkerFile)) {
        $files = get-childitem $chocolateyExePath -include *.bat -recurse
        if ($files -ne $null -and $files.Count -gt 0) {
          Write-Debug "Processing Bin files"
          foreach ($file in $files) {
            Write-Output "Processing $($file.Name) to make it portable"
            $fileStream = [System.IO.File]::Open("$file", 'Open', 'Read', 'ReadWrite')
            $reader = New-Object System.IO.StreamReader($fileStream)
            $fileText = $reader.ReadToEnd()
            $reader.Close()
            $fileStream.Close()
    
            $fileText = $fileText.ToLower().Replace("`"" + $chocolateyPath.ToLower(), "SET DIR=%~dp0%`n""%DIR%..\").Replace("\\","\")
    
            Set-Content $file -Value $fileText -Encoding Ascii
          }
        }
    
        Set-Content $processedMarkerFile -Value "$([System.DateTime]::Now.Date)" -Encoding Ascii
      }
    }
    
    # Adapted from http://www.west-wind.com/Weblog/posts/197245.aspx
    function Get-FileEncoding($Path) {
        $bytes = [byte[]](Get-Content $Path -Encoding byte -ReadCount 4 -TotalCount 4)
    
        if(!$bytes) { return 'utf8' }
    
        switch -regex ('{0:x2}{1:x2}{2:x2}{3:x2}' -f $bytes[0],$bytes[1],$bytes[2],$bytes[3]) {
            '^efbbbf'   { return 'utf8' }
            '^2b2f76'   { return 'utf7' }
            '^fffe'     { return 'unicode' }
            '^feff'     { return 'bigendianunicode' }
            '^0000feff' { return 'utf32' }
            default     { return 'ascii' }
        }
    }
    
    function Add-ChocolateyProfile {
      Write-Debug "Add-ChocolateyProfile"
      try {
        $profileFile = "$profile"
        if ($profileFile -eq $null -or $profileFile -eq '') {
          Write-Output 'Not setting tab completion: Profile variable ($profile) resulted in an empty string.'
          return
        }
    
        $profileDirectory = (Split-Path -Parent $profileFile)
    
        if ($env:ChocolateyNoProfile -ne $null -and $env:ChocolateyNoProfile -ne '') {
          Write-Warning "Not setting tab completion: Environment variable "ChocolateyNoProfile" exists and is set."
          return
        }
    
        $localSystem = Get-LocalizedWellKnownPrincipalName -WellKnownSidType ([Security.Principal.WellKnownSidType]::LocalSystemSid)
        # get current user
        $currentUser = [Security.Principal.WindowsIdentity]::GetCurrent()
        if ($currentUser.Name -eq $localSystem) {
          Write-Warning "Not setting tab completion: Current user is SYSTEM user."
          return
        }
    
        if (!(Test-Path($profileDirectory))) {
          Write-Debug "Creating '$profileDirectory'"
          New-Item "$profileDirectory" -Type Directory -Force -ErrorAction SilentlyContinue | Out-Null
        }
    
        if (!(Test-Path($profileFile))) {
          Write-Warning "Not setting tab completion: Profile file does not exist at '$profileFile'."
          return
    
          #Write-Debug "Creating '$profileFile'"
          #"" | Out-File $profileFile -Encoding UTF8
        }
    
        $signature = Get-AuthenticodeSignature $profile
        if ($signature.Status -ne 'NotSigned') {
          Write-Warning "Not setting tab completion: File is Authenticode signed at '$profile'."
          return
        }
    
        $profileInstall = @'
    
    # Chocolatey profile
    $ChocolateyProfile = "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1"
    if (Test-Path($ChocolateyProfile)) {
      Import-Module "$ChocolateyProfile"
    }
    '@
    
        $chocoProfileSearch = '$ChocolateyProfile'
        if(Select-String -Path $profileFile -Pattern $chocoProfileSearch -Quiet -SimpleMatch) {
          Write-Debug "Chocolatey profile is already installed."
          return
        }
    
        Write-Output 'Adding Chocolatey to the profile. This will provide tab completion, refreshenv, etc.'
        $profileInstall | Out-File $profileFile -Append -Encoding (Get-FileEncoding $profileFile)
        Write-ChocolateyWarning 'Chocolatey profile installed. Reload your profile - type . $profile'
    
        if ($PSVersionTable.PSVersion.Major -lt 3) {
          Write-ChocolateyWarning "Tab completion does not currently work in PowerShell v2. `n Please upgrade to a more recent version of PowerShell to take advantage of tab completion."
          #Write-ChocolateyWarning "To load tab expansion, you need to install PowerTab. `n See https://powertab.codeplex.com/ for details."
        }
    
      } catch {
        Write-ChocolateyWarning "Unable to add Chocolatey to the profile. You will need to do it manually. Error was '$_'"
    @'
    This is how add the Chocolatey Profile manually.
    Find your $profile. Then add the following lines to it:
    
    $ChocolateyProfile = "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1"
    if (Test-Path($ChocolateyProfile)) {
      Import-Module "$ChocolateyProfile"
    }
    '@ | Write-Output
      }
    }
    
    $netFx4InstallTries = 0
    
    function Install-DotNet4IfMissing {
    param(
      $forceFxInstall = $false
    )
      # we can't take advantage of any chocolatey module functions, because they
      # haven't been unpacked because they require .NET Framework 4.0
    
      Write-Debug "Install-DotNet4IfMissing called with `$forceFxInstall=$forceFxInstall"
      $NetFxArch = "Framework"
      if ([IntPtr]::Size -eq 8) {$NetFxArch="Framework64" }
    
      $NetFx4ClientUrl = 'https://download.microsoft.com/download/5/6/2/562A10F9-C9F4-4313-A044-9C94E0A8FAC8/dotNetFx40_Client_x86_x64.exe'
      $NetFx4FullUrl = 'https://download.microsoft.com/download/9/5/A/95A9616B-7A37-4AF6-BC36-D6EA96C8DAAE/dotNetFx40_Full_x86_x64.exe'
      $NetFx4Url = $NetFx4FullUrl
      $NetFx4Path = "$tempDir"
      $NetFx4InstallerFile = 'dotNetFx40_Full_x86_x64.exe'
      $NetFx4Installer = Join-Path $NetFx4Path $NetFx4InstallerFile
    
      if ((!(Test-Path "$env:SystemRoot\Microsoft.Net\$NetFxArch\v4.0.30319") -and !(Test-Path "C:\Windows\Microsoft.Net\$NetFxArch\v4.0.30319")) -or $forceFxInstall) {
        Write-Output "'$env:SystemRoot\Microsoft.Net\$NetFxArch\v4.0.30319' was not found or this is forced"
        if (!(Test-Path $NetFx4Path)) {
          Write-Output "Creating folder `'$NetFx4Path`'"
          $null = New-Item -Path "$NetFx4Path" -ItemType Directory
        }
    
        $netFx4InstallTries += 1
    
        if (!(Test-Path $NetFx4Installer)) {
          Write-Output "Downloading `'$NetFx4Url`' to `'$NetFx4Installer`' - the installer is 40+ MBs, so this could take a while on a slow connection."
          (New-Object Net.WebClient).DownloadFile("$NetFx4Url","$NetFx4Installer")
        }
    
        $psi = New-Object System.Diagnostics.ProcessStartInfo
        $psi.WorkingDirectory = "$NetFx4Path"
        $psi.FileName = "$NetFx4InstallerFile"
        # https://msdn.microsoft.com/library/ee942965(v=VS.100).aspx#command_line_options
        # http://blogs.msdn.com/b/astebner/archive/2010/05/12/10011664.aspx
        # For the actual setup.exe (if you want to unpack first) - /repair /x86 /x64 /ia64 /parameterfolder Client /q /norestart
        $psi.Arguments = "/q /norestart /repair"
    
        Write-Output "Installing `'$NetFx4Installer`' - this may take awhile with no output."
        $s = [System.Diagnostics.Process]::Start($psi);
        $s.WaitForExit();
        if ($s.ExitCode -ne 0 -and $s.ExitCode -ne 3010) {
          if ($netFx4InstallTries -ge 2) {
            Write-ChocolateyError ".NET Framework install failed with exit code `'$($s.ExitCode)`'. `n This will cause the rest of the install to fail."
            throw "Error installing .NET Framework 4.0 (exit code $($s.ExitCode)). `n Please install the .NET Framework 4.0 manually and then try to install Chocolatey again. `n Download at `'$NetFx4Url`'"
          } else {
            Write-ChocolateyWarning "Try #$netFx4InstallTries of .NET framework install failed with exit code `'$($s.ExitCode)`'. Trying again."
            Install-DotNet4IfMissing $true
          }
        }
      }
    }
    
    Export-ModuleMember -function Initialize-Chocolatey;
    
    # SIG # Begin signature block
    # MIIcpwYJKoZIhvcNAQcCoIIcmDCCHJQCAQExDzANBglghkgBZQMEAgEFADB5Bgor
    # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
    # KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCBw9683GApZS/tX
    # OJBEqi1H9i8Pvb2zjjL9SS/nY/d3k6CCF7EwggUwMIIEGKADAgECAhAECRgbX9W7
    # ZnVTQ7VvlVAIMA0GCSqGSIb3DQEBCwUAMGUxCzAJBgNVBAYTAlVTMRUwEwYDVQQK
    # EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xJDAiBgNV
    # BAMTG0RpZ2lDZXJ0IEFzc3VyZWQgSUQgUm9vdCBDQTAeFw0xMzEwMjIxMjAwMDBa
    # Fw0yODEwMjIxMjAwMDBaMHIxCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2Vy
    # dCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xMTAvBgNVBAMTKERpZ2lD
    # ZXJ0IFNIQTIgQXNzdXJlZCBJRCBDb2RlIFNpZ25pbmcgQ0EwggEiMA0GCSqGSIb3
    # DQEBAQUAA4IBDwAwggEKAoIBAQD407Mcfw4Rr2d3B9MLMUkZz9D7RZmxOttE9X/l
    # qJ3bM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AB1AHMAZQAgAG8AZgAgAHQAaABpAHMAIABDAGUAcgB0AGkAZgBpAGMA
    # YQB0AGUAIABjAG8AbgBzAHQAaQB0AHUAdABlAHMAIABhAGMAYwBlAHAAdABhAG4A
    # YwBlACAAbwBmACAAdABoAGUAIABEAGkAZwBpAEMAZQByAHQAIABDAFAALwBDAFAA
    # UwAgAGEAbgBkACAAdABoAGUAIABSAGUAbAB5AGkAbgBnACAAUABhAHIAdAB5ACAA
    # QQBnAHIAZQBlAG0AZQBuAHQAIAB3AGgAaQBjAGgAIABsAGkAbQBpAHQAIABsAGkA
    # YQBiAGkAbABpAHQAeQAgAGEAbgBkACAAYQByAGUAIABpAG4AYwBvAHIAcABvAHIA
    # YQB0AGUAZAAgAGgAZQByAGUAaQBuACAAYgB5ACAAcgBlAGYAZQByAGUAbgBjAGUA
    # LjALBglghkgBhv1sAxUwHwYDVR0jBBgwFoAUFQASKxOYspkH7R7for5XDStnAs0w
    # HQYDVR0OBBYEFGFaTSS2STKdSip5GoNL9B6Jwcp9MH0GA1UdHwR2MHQwOKA2oDSG
    # Mmh0dHA6Ly9jcmwzLmRpZ2ljZXJ0LmNvbS9EaWdpQ2VydEFzc3VyZWRJRENBLTEu
    # Y3JsMDigNqA0hjJodHRwOi8vY3JsNC5kaWdpY2VydC5jb20vRGlnaUNlcnRBc3N1
    # cmVkSURDQS0xLmNybDB3BggrBgEFBQcBAQRrMGkwJAYIKwYBBQUHMAGGGGh0dHA6
    # Ly9vY3NwLmRpZ2ljZXJ0LmNvbTBBBggrBgEFBQcwAoY1aHR0cDovL2NhY2VydHMu
    # ZGlnaWNlcnQuY29tL0RpZ2lDZXJ0QXNzdXJlZElEQ0EtMS5jcnQwDQYJKoZIhvcN
    # AQEFBQADggEBAJ0lfhszTbImgVybhs4jIA+Ah+WI//+x1GosMe06FxlxF82pG7xa
    # FjkAneNshORaQPveBgGMN/qbsZ0kfv4gpFetW7easGAm6mlXIV00Lx9xsIOUGQVr
    # NZAQoHuXx/Y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Tyu7X+Wblo16b0WvDxCSKNiKDKldC2
    # HEHCKSvhkOE2bVeqvIbZ90mVmpzbHbVOiG8NiI4qoP+oYLJsQCIoI9D+Aj+VYRJz
    # aY9eHmOi8bOnB8czQyAH8sRtWN3Xql/MbAQgCpvD3V2lkRxfxmDbsPvMK/gNElwq
    # brkaZdjFyCKcM6czzQrMkxemsIiaXDD/6j3Vh3HNIcLX0OCw/j3RN/TOlctMZNps
    # fNX6KMpblIrrqxkkQtuTRQ9mqEzfGoULMJ8Mdyl8ZrZ84is09DSuTKGCAg8wggIL
    # BgkqhkiG9w0BCQYxggH8MIIB+AIBATB2MGIxCzAJBgNVBAYTAlVTMRUwEwYDVQQK
    # EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xITAfBgNV
    # BAMTGERpZ2lDZXJ0IEFzc3VyZWQgSUQgQ0EtMQIQAwGaAjr/WLFr1tXq5hfwZjAJ
    # BgUrDgMCGgUAoF0wGAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAcBgkqhkiG9w0B
    # CQUxDxcNMTcwODA3MDAwNDU5WjAjBgkqhkiG9w0BCQQxFgQUCanydPTQIqb6/SHK
    # ohYBrk8HMvYwDQYJKoZIhvcNAQEBBQAEggEAS99VQXnZUdfxJ9yIhYLWEPvWYhOy
    # X5oM7ifwG4g/V8A7v1iHSp0OVIN3zsfuJO0FSmgb/TVwWQlsbGy5F31M+Zt/1ma8
    # I3OUiKfNQ2KvD7YgLYZe9oVX5P6xdBh1G7vUv3f83eyVyHnXRvdSUDYjonJcqr4U
    # XZsHRZ4VhAptFRN9lq5AAVY/H/UHlYAWAd2tjDo1mNvvitM0SsfHVXyoM7uk6mGE
    # mxSHhafescQywaLJYhAo8dYMhTX5aiufULYFPAZeLWe3FzLQ9IuwsYmwkRMVqCeJ
    # HEZSqhustcO5KH8dcRo8HjVw2mVyn990HoY+tixfgjZhZsEaubXDKeh9zQ==
    # SIG # End signature block
    
  • tools\init.ps1 Show
    param($installPath, $toolsPath, $package, $project)
    
    $modules = Get-ChildItem $ToolsPath -Filter *.psm1
    $modules | ForEach-Object { import-module -name  $_.FullName }
    
    @"
    ========================
    Chocolatey
    ========================
    Welcome to Chocolatey, your local machine repository built on the NuGet infrastructure. Chocolatey allows you to install application packages to your machine with the goodness of a #chocolatey #nuget combo. 
    Application executables get added to the path automatically so you can call them from anywhere (command line/powershell prompt), not just in Visual Studio.
    
    Lets get Chocolatey!
    ----------
    Visual Studio -
    ----------
    Please run Initialize-Chocolatey one time per machine to set up the repository. 
    If you are upgrading, please remember to run Initialize-Chocolatey again.
    After you have run Initialize-Chocolatey, you can safely uninstall the chocolatey package from your current Visual Studio solution.
    ----------
    Alternative NuGet -
    ----------
    If you are not using NuGet in Visual Studio, please navigate to the directory with the chocolateysetup.psm1 and run that in Powershell, followed by Initialize-Chocolatey.
    Upgrade is the same, just run Initialize-Chocolatey again.
    ----------
    Once you've run initialize or upgrade, you can uninstall this package from the local project without affecting your chocolatey repository.
    ========================
    "@ | Write-Host
    

Virus Scan Results

No results available for this package. We are building up results for older packages over time so expect to see results. If this is a new package, it should have results within a day or two.

Dependencies

This package has no dependencies.

Maintainer(s)

Software Author(s)

  • Chocolatey Software
  • Inc

Copyright

2017 Chocolatey Software, Inc, 2011- 2017 RealDimensions Software, LLC

Tags

Release Notes

See all - https://github.com/chocolatey/choco/blob/stable/CHANGELOG.md

0.10.7

BREAKING CHANGES

  • Set requested execution level back to asInvoker while determining more advanced elevated scenarios - see #1324

    After much deliberation with the community, we're moving execution policy back to the default of asInvoker to make it work like it did prior to 0.10.4. However we are leaving it open for you to change it to whatever execution level you want by keeping the manifest external from choco.exe. We will be looking more at advanced scenarios - the discussion is at #1307. If you don't have a GitHub account, feel free to start a thread on the mailing list (and if you are a customer, you have private channels to voice your opinions on this change).

    Moving to "asInvoker" means that Chocolatey will not ask for elevated privileges prior to execution, so you will need to remember to do that yourself. If you go to $env:ChocolateyInstall, you will find choco.exe.manifest, and you have freedom to adjust the execution level as you see fit. There is one catch, you will need to do it on every install/upgrade of Chocolatey until #1206 is implemented.

BUG FIXES

  • Fix - Add file/file64 not as aliases, but use them to set url/url64 if empty - see #1323
  • Fix - Automatic Uninstaller doesn't split multiple paths - see #1327
  • Fix - choco list / search / info - fails with local directory source - see #1325
  • Fix - When version is four digits, Chocolatey version heading is not shown - see #1326
  • Fix - search / list - page/page-size not honored for exact search in 0.10.6 - see #1322
  • Fix - Deserializing failures on package info files should not fail the choco run - see #1328

IMPROVEMENTS

  • Use $packageArgs in default template for uninstall script - see #1330

0.10.6.1

BUG FIXES

  • Fix - shimgen fails with unrecognized option: '/errorendlocation' in .NET 4.0 only environments - see #1321
  • Fix - Do not fail extracting resources at runtime - see #1318
  • Fix - Silently fail when deleting choco.exe.old - see #1319

0.10.6

This release includes fixes and adjustments to the API to make it more usable. Search / List has also been improved with the data that it returns when verbose/detailed, along with info always returning a package with information instead of erroring sometimes. The search results from the community package repository now match what you see on the website.

BUG FIXES

  • Fix - choco.exe.manifest is ignored because it is extracted AFTER first choco.exe access - see #1292
  • Fix - Chocolatey config changes in 0.10.4+ - The process cannot access the file because it is being used by another process - see #1241
  • Fix - PowerShell sees authenticode hash as changed in scripts that are UTF8 (w/out BOM) that contain unicode characters - see #1225
  • Fix - Chocolatey timed out immediately when execution timeout was infinite (0) - see #1224
  • Fix - Multiple authenticated sources with same base url fail when authentication is different - see #1248
  • Fix - choco list / search / info - Some packages can't be found - see #1004
  • Fix - chocolatey.config gets corrupted when multiple processes access simultaneously - see #1258
  • Fix - Update ShimGen to 0.8.x to address some issues - see #1243
  • Fix - AutoUninstaller should skip uninstall keys if they are empty - see #1315
  • Fix - Trace logging should only occur on when trace is enabled - see #1309
  • Fix - RefreshEnv.cmd doesn't set the correct PATH - see #1227
  • Fix - choco new generates uninstall template with wrong use of registry key variable - see #1304
  • [API] Fix- chocolatey.lib nuget package has incorrect documentation xml - see #1247
  • [API] Fix - Chocolatey file cache still adds a 'chocolatey' directory on each install - see #1231
  • [API] Fix - List and Count should implement similar functionality as run - see #1298
  • Pro/Business - [API] Fix - Ensure DLL can work with licensed code - see #1287

IMPROVEMENTS

  • Default package push url now uses push subdomain - see #1285
  • Report process id in the log files - see #1239
  • choco info / list / search - Include summary on detailed view - see #1253
  • choco info / list /search - Include release notes on detailed view - see #1263
  • choco list / search - Option to list packages only by name - see #1237
  • choco list / search - Allow sorting package results by relevance - see #1101
  • choco list / search - Search by tags only - see #1033
  • choco outdated - Option to leave out pinned packages - see #994
  • Install-ChocolateyPackage and other functions should alias File/File64 - see #1284
  • Install-ChocolateyPowerShellCommand should alias File/FileFullPath for PsFileFullPath - see #1311
  • Logging - capture more information about a user (user name, domain, remote?, system?) - see #615
  • Stop saying "0 packages failed." - see #1259
  • [API] provide a way to see ChocolateyConfiguration - see #1267
  • [API] Attempt to get ChocolateyInstall environment variable prior to extraction - see #1297
  • [API] Expose Container directly - see #1294
  • Pro/Business - Support for Package Audit (who installed packages) - see #1238
  • Pro/Business - [API] Ensure configuration retains base info between uses - see #1296

0.10.5

BUG FIXES

  • Fix - Start-ChocolateyProcessAsAdmin errors when running PowerShell scripts - see #1220

IMPROVEMENTS

  • Show machine readable output with choco outdated -r - see #1222

0.10.4

We're dubbing this the "10-4 good buddy" release. We've added some major functionality and fixes we think you are going to find top notch - dare we say as smooth as really expensive chocolate? A lot of work for this release has been provided by the community. Remember that Chocolatey is only as good as the support that comes from the community! Be sure to thank other community members for the awesome that is Chocolatey and Chocolatey 10-4. We've closed over 30 bugs and added over 40 enhancements (75 tickets in total)!

Proxy support just got some major enhancements with the ability to not only specify proxy information at runtime, but also to set bypass lists and bypassing on local connections and configure source repositories to bypass proxies. A major issue with changing command execution timeout was just fixed. And there used to be a tiny chance you might corrupt the choco config when running multiple choco processes -but now that is much better handled.

We've also made package itself display download progress, which is great when software binaries are embedded in packages. For you folks looking to remove any progress (like when using Vagrant), now you can use --no-progress. When NuGet.Core has issues, those issues will have more visibility into why things are failing without needing a debugging log. Speaking of some extreme visibility, see network traffic with --trace.

We've got a few possible breaking changes that could affect you, see what we've written about them below.

This also marks the first release that uses the Chocolatey Software digital certificate for signing instead of the RealDimensions Software, LLC certificate.

Another major feature released in preview is using remembered arguments on upgrade. This is in preview in 0.10.4 and will be turned to 'on' automatically in a future release. We are going to be continually making it better and won't turn it on by default until it is ready. If you want to turn it on and start using it, once you have 0.10.4 installed, run choco feature enable -n useRememberedArgumentsForUpgrades. You can also do this per command with --use-remembered-arguments. You can also turn it off per command with --ignore-remembered-arguments. We've also really described a lot of important considerations and thoughts related to using this so there are no surprises. Please do read the issue notes at length if you plan to use this feature to reduce confusion.

BREAKING CHANGES

  • Run with highestAvailable Execution Level by default - see #1054

    One longstanding request with Chocolatey was to have it always request admin privileges before running. This has been a hope that it would cut down on the accidental runs of Chocolatey in a command shell that is not elevated and needing to open one that is elevated. This UAC (User account control) setting is handled by something called an application manifest (app.manifest). We had it set to "asInvoker", or run with the context of the user that ran the command. We've moved this to "highestAvailable", which means if you are a non-admin, it will just run under your context, but if you are an admin in a non-elevated shell, it will ask for elevated permissions to run. There is also "requireAdministrator", which locks execution down to administrators only.

    Moving to "highestAvailable" allows for that asking of privileges that you are used to, up front before it runs. However one additional thing we did here was give you more control over this setting now. We used to embed the app manifest into choco.exe. We now set it next to choco.exe (base install under $env:ChocolateyInstall, you will find choco.exe.manifest) so you have more freedom to adjust those execution levels as you see fit. There is one catch, you will need to do it on every install/upgrade of Chocolatey until #1206 is implemented.

  • When a prerelease is installed, it should upgrade to latest prerelease unless excluded - typically seen in choco upgrade all - see #686

    When you run choco upgrade all, it never catches the prereleases. However if you run choco upgrade all --pre, it may upgrade some of your stable installs to prereleases. Neither of these situations are desirable. So by default, we've made it so that choco upgrade all just does the right thing, which is to upgrade your stable releases to the latest stable release and your prerelease packages will upgrade to the absolute latest available, whether that be stable or prerelease. If you need to change the behavior back to the old way for upgrade all, simply add the --exclude-prerelease option.

  • Fix - Passing Allow Downgrade To upgrade against a prerelease may downgrade it to last stable version - see #1212

    This is a bug fix that was allowing a prerelease to be downgraded accidentally to the last stable version if you ran choco upgrade somepackage --allow-downgrade without a particular version and without --pre. Now while this would be less affected with #686 above, it could still happen. It's a bug. The only reason this was marked as breaking change is that someone could be depending on the buggy behavior. So heads up, this bug is now fixed. If you are attempting to downgrade, make sure you specify the version you want it to go down to.

FEATURES

  • [Security][Preview] Use Remembered Arguments for a Package During Upgrades - You must opt in for this to work - see #797
  • Show download progress for the packages themselves - see #1134
  • Set Explicit Proxy Bypass List / Bypass On Local - see #1165
  • Option/feature to stop installation when a package fails - see #1151
  • Add File64 to Install-ChocolateyInstallPackage and Get-ChocolateyUnzip - see #1187

BUG FIXES

  • [Security] Fix - PowerShell sees authenticode hash as changed in scripts that were signed with Unix Line Endings (LF) - unable to use AllSigned - see #1203
  • [Security] Fix - chocolatey setup - Use https for downloading .NET Framework 4x if not installed - see #1112
  • Fix - chocolatey.config gets corrupted when multiple processes access simultaneously - see #1047
  • Fix - "commandExecutionTimeoutSeconds" always reverts to 2700 when deprecated config setting is 0 - see #1059
  • Fix - Allow Chocolatey version check with FIPS - see #1193
  • Fix - Chocolatey doesn't always decompress downloads appropriately (support automatic decompression) - see #1056
  • Fix - Load built-in Chocolatey functions, then load extensions - see #1200
  • Fix - Use provided checksum type - see #1018
  • Fix - MSU fails to install with space in path - see #1177
  • Fix - Unable to disable failOnInvalidOrMissingLicense feature - see #1069
  • Fix - PowerShell (Start-ChocolateyProcessAsAdmin) should only import the installerModule and not the profile - see #1013
  • Fix - Automatic Uninstaller should skip when uninstaller executable does not exist - see #1035
  • Fix - Package installation often fails with ERROR: You cannot call a method on a null-valued expression - see #1141
  • Fix - Text file determination fails to throw an error because it catches it - see #1010
  • Fix - Delete the .istext file before the content-type check - see #1012
  • Fix - new command - don't add unparsed options as the name - see #1085
  • Fix - Proxy settings ignored for local connections - see #497
  • Fix - RefreshEnv / Update-SessionEnvironment changes current user to SYSTEM - see #902
  • Fix - Set-EnvironmentVariable writes an error when installing Chocolatey as SYSTEM - see #1043
  • Fix - Get-FtpFile fails with integer overflow when downloading file more than 2gb in size - see #1098
  • Fix - Uninstall-ChocolateyPackage prints out warning if the passed file path starts and ends with quotes - see #1039
  • Fix - Get-UninstallRegistryKey fixes/improvements - see #815
  • Fix - Unzip specific folder feature is broken after introducing 7zip - see #676
  • Fix - Join-Path error when installing Chocolatey as SYSTEM - see #1042
  • Fix - $env:OS_NAME is 'Windows' for Windows 10 - see #1178
  • Fix - choco install relativepath/to/some.nuspec fails - see #906
  • Fix - When pointing to a nupkg, choco should use only that nupkg to install and not a newer version in the same directory - see #523
  • Fix - Automatic uninstaller should split by quotes when necessary - see #1208
  • [API] Fix - lib should merge the AlphaFS dependency - see #1148
  • [API] Fix - don't reset loggers on setting custom automatically - see #1121
  • [API] Fix - Chocolatey file cache adds a 'chocolatey' directory on each install - see #1210
  • [API] Fix - Getting Local List of Package may leave config in undesirable state - see #1213
  • Fix - Pro/Business - Chocolatey Licensed Feed May Show Up More Than Once - see #1166
  • Fix - Pro/Business - Synchronized packages with DLLs are attempted to be imported by Chocolatey's PowerShell Extensions Loader - see #1041

IMPROVEMENTS

  • [Security] Username and password for choco apikey not encrypted in output - see #1106
  • [Security] Sign Binaries / Authenticode Signatures with Chocolatey Software digital certificate - see #1214
  • Setting commandExecutionTimeout to 0 means never time out - see #1202
  • Configure sources to skip proxy - see #262
  • Set proxy information at runtime - see #1173
  • Start-ChocolateyProcessAsAdmin should not elevate when already elevated - see #1126
  • Add --no-progress cli switch for hidding progress bars - see #917
  • Note web status errors on package install failures - see #1172
  • Always let Nuget.Core log - see #1095
  • Make choco get its proxy settings also from environment variables - see #605
  • Remove quotes in process passed to Start-ChocolateyProcessAsAdmin / CommandExecutor - see #1167
  • Increase download buffer size in Get-FtpFile to speed up downloads - see #1099
  • Trace network traffic - see #1182
  • Upgrade 7Zip to 16.04 - see #1184
  • Do not create .ignore file if outside of Chocolatey location - see #1180
  • Help should exit zero if called with the help switch, otherwise non-zero on bad commands - see #473
  • "Licensed messages" may address users in a somewhat unprofessional manner - see #1111
  • Show the entire text to turn on the allowGlobalConfirmation flag - see #1053
  • Running choco should produce name/version and further instructions - see #1083
  • Typo in Install-ChocolateyPowershellCommand - see #1088
  • Update choco new pkg template to give example of handling nested quoted paths - see #1067
  • Add Aliases for Install-ChocolateyVsixPackage - see #1146
  • Add Chocolatey Software to copyright - see #1209
  • Pro/Business - Feature to Disable Non-Elevated Warnings - see #1118
  • Pro/Business - Package Throttle - Bitrate limit packages and downloads (support) - see #454
  • Pro/Business - Allow version overrides for local packages - see #942
  • Pro/Business - List include programs should not show items from Package Synchronizer's Programs and Features Package Sync - see #1205
  • Pro/Business - Show better messaging when unable to load licensed assembly - see #1145
  • Pro/Business - PowerShell Functions should allow overriding urls - see #1117
  • Pro/Business - Automatic Uninstaller - allow remove directly - see #1119
  • Pro/Business - Add Chocolatey Architect edition license SKU - see #1075
  • Pro/Business - Ensure sync command can be machine parseable - quiet logging - see #1147
  • Pro/Business - Configure a source to be allowed for self-service - see #1181

0.10.3

BREAKING CHANGES

  • Fix - Do Not Check $LastExitCode - Only error a package install if script errors or set a different exit code when it is specifically set - see #1000

Starting in v0.9.10, Chocolatey started checking $LASTEXITCODE in addition to the script command success as a way to be more helpful in determining package failures. This meant it offered the ability to capture when a script exited with Exit 1 and handle that accordingly. However that really has never been a recommended scenario for returning errors from scripts and is not seen in the wild anywhere so it is believed that those that may be affected are very few.

Checking $LastExitCode checks the last executable's exit code when the script specifically does not call Exit (which is . This can lead to very perplexing failures, such as running a successful xcopy that exits with 2 and seeing package failures without understanding why. Since it is not typically recommended to call Exit to return a value from PowerShell because of issues with different hosts, it's less of a concern to only look at explicit failures. For folks that may need it, allow failing a package again by the last external command exit code or exit from a PowerShell script. Note that it is not recommended to use exit with a number to return from PowerShell scripts. Instead you should use $env:ChocolateyExitCode or Set-PowerShellExitCode (first available in v0.9.10) to ensure proper setting of the exit code.

If you need the prior behavior, please turn on the feature scriptsCheckLastExitCode.

BUG FIXES

  • Fix - chocolateybeforemodify runs after modifying (moving) chocolatey lib package files - see #995
  • Fix - The refreshenv command throws an error about Write-FunctionCallLogMessage when ran in PowerShell on 0.10.2 - see #996

0.10.2

We're dubbing this the "Every Joe" release in honor of a friend that just lost his fight with brain cancer. If you want to help further research, please make a donation to a cancer research association of your choosing (e.g. the American Brain Tumor Assocation).

A couple of important fixes/enhancements in this release. Most of the improvements are about providing better feedback to you and fixing minor issues. The big one surrounds when packages set a download path for a file using $env:TEMP, choco will ensure that the file can still be found for later use.

BUG FIXES

  • Fix - Downloaded file is at old $env:TEMP\chocolatey\chocolatey location, but install calls with just $env:TEMP\chocolatey\ location - see #969
  • Fix - [Pro/Business] UseOriginalLocation fails when there is no 64bit file - see #972
  • Fix - Do not use unparsed options as package names - see #983

IMPROVEMENTS

  • Start-ChocolateyProcessAsAdmin enhancements - see #977
  • Log PowerShell function calls better - see #976
  • Allow environment variables in some config settings - see #971
  • [Pro/Business] Provide license type to environment variables - see #968
  • Note that chocolateyUninstall.ps1 may no longer required in template - see #982
  • Provide guidance when licensed only options are passed to FOSS - see #984
  • Rollback automatically when a user cancels an operation - see #985
  • Explain how to workaround a failing uninstall - see #573
  • Remove extra forward slashes in url - see #986
  • Side by side uninstall enhancements - see #992

0.10.1

We're dubbing this the "Shhh! Keep that secret please" release. We've found that when passing in passwords and other sensitive arguments, those items can end up in the logs in clear text. We've addressed this in #948 and #953. When it comes to passing sensitive arguments through to native installers, you can set up environment variables with those sensitive args and pass those arguments directly through to Start-ChocolateyProcessAsAdmin. If you prefer a better experience, the licensed version allows passing sensitive options directly through choco.exe as --install-arguments-sensitive and --package-parameters-sensitive. Read more in the Licensed CHANGELOG.

Perhaps the biggest improvement in this release is that Chocolatey will automatically look to see if it can download binaries over HTTPS when provided an HTTP url. If so, Chocolatey will switch to downloading the binaries over SSL. This provides better security in downloading and knowing you are getting the binary from the source location instead of a possible man in the middle location, especially when the package does not provide checksums for verification.

Another improvement you may not even notice, but we think you will love is that Chocolatey now supports TLS v1.2 transport which presents a nice transparent increase in security. You will need to have at least .NET Framework 4.5 installed to take advantage of this feature.

FEATURES

  • [Security] Support TLS v1.2 - see #458
  • [Security] Attempt to download packages via HTTPS connection - see #746
  • [Security] Pro/Business - Pass sensitive arguments to installers - see #948
  • Search (and info) by version - see #935

BUG FIXES

  • [Security] Fix - Passwords in command line options are logged in clear text - see #953
  • [Security] Fix - For PowerShell v2 - if switch down to SSLv3 protocol fails, go back to original protocol - see #958
  • Fix - Unzipping to ProgramFiles/System32 is Subject to File System Redirection - see #960
  • Fix - Run without login - see #945
  • Fix - Support Long Paths - see #934
  • Fix - help should not issue warning about elevated command shell - see #893
  • Fix - Licensed Feed cannot be disabled - see #959
  • Fix - Choco with unknown command should show help menu - see #938
  • Fix - Get-FtpFile error when file is missing (called through Get-ChocolateyWebFile) - see #920
  • Fix - Skip Get-WebFileName for FTP - see #957
  • Fix - Chocolatey-InstallChocolateyPackage fix for double chocolatey folder name is not also applied to the passed in file name - see #908
  • Fix - Start-ProcessAsAdmin - working directory should be from the location of the executable - see #937
  • [POSH Host] Fix - PowerShell Host - Package scripts setting values can affect packages that depend on them - see #719
  • Fix - Transactional install - pending check may fail if the lib folder doesn't exist - see #954
  • Fix - Start-ChocolateyProcessAsAdmin Module Import for PowerShell causes errors - see #901

IMPROVEMENTS

  • Transactional Install - Improve concurrent operations (pending) - see #943
  • Uninstall-ChocolateyPackage should set unrecognized fileType to exe - see #964
  • Powershell functions - Allow access to package title, not only ID - see #925
  • Option to apply package parameters / install arguments to dependent packages - see #839
  • Get-ChocolateyWebFile download check enhancements - see #952
  • Do not treat unknown checksum types as MD5 - see #932
  • Pro/Business - Install-ChocolateyPackage - UseOriginalLocation - see #950
  • Auto determine checksum type - see #922
  • Ensure PowerShell functions have parameter name parity - see #941
  • Output from installer should go to verbose log - see #940

0.10.0

What was planned for 0.9.10.4 is now 0.10.0. This is due partly to a breaking change we are making for security purposes and a move to provide better a better versioning scheme for the remainder of the sub-v1 versions of Chocolatey. Instead of 0.y.z.0 being considered where major verions occur in the sub 1 series, 0.y.0 will now be considered where those major versions occur. We also are moving right along towards v1 (and hope to be there in 2017).

0.10.0 carries the fixes for 0.9.10.4 and includes a major security enhancement (checksum requirement).

BREAKING CHANGES

  • [Security] Checksum requirement and enhancements - see #112

Checksums in package scripts are meant as a measure to validate the originally intended downloaded resources used in the creation of a package are the same files that are received at a future date. This also ensures that the same files that are checked by all parts of moderation (if applicable) are the same files that are received by users for a package. This is seen mostly on the community repository because it is public and packages are subject to copyright laws (distribution rights), which typically requires the package scripts to download software from the official distribution locations. The Chocolatey framework has had the ability to use checksums in package scripts since July 2014.

What is the requirement? choco will now fail if a package download resources from HTTP/FTP and does not use checksums to verify those downloaded resources. The requirement for HTTP/FTP is #112. We are considering also requiring it for HTTPS (#895) as well. You can optionally set a feature (allowEmptyChecksumsSecure) to ensure packages using HTTPS also use checksums.

How does this protect the community anymore than before? During moderation review, there is a check of these downloaded binaries against VirusTotal (which verifies these binaries against 50-60+ different virus scanners). The binaries are also verified for installation purposes against a test computer. With an independent 3rd party checksum in the package itself, it guarantees that the files received by a user from those remote sources are the exact same files that were used in the verification process.

Why the requirement, and why now? This is a measure of protection for the Chocolatey community. HTTP is easy to hack with both DNS poisoning and MITM (man in the middle) attacks. Without independent verification of the integrity of the downloaded resources, users can be left susceptible to these issues. We've been planning a move to require checksums for awhile now, with a planned longer and smoother transition for package maintainers to get packages updated to reduce breakages. Unfortunately there was a recent event with FOSSHub getting hacked (the community repository had 8 possibly affected packages and we quickly took action), which necessitated a need for us to move in a much swifter fashion to ensure the protection of the community sooner, rather than later. The changes in Chocolatey represented by the checksum changes are a major step in the process to ensure protection. Requiring for HTTPS as well will mitigate any future compromises of software distribution sites that are used with Chocolatey packages.

Can I shut this behavior off or opt out per package?
You can shut off the checksum requirement by enabling the feature allowEmptyChecksums. This will return Chocolatey to previous behavior. We strongly recommend against it.

You can shut it off or turn it per package install/upgrade with --allow-empty-checksums and --require-checksums, respectively. See https://chocolatey.org/docs/commands-install / https://chocolatey.org/docs/commands-upgrade.

You can also disable the feature allowEmptyChecksumsSecure to enforce checksums for packages that download from secure locations (HTTPS).

Other things I should know? Users also now have the ability to pass their own checksums and checksumtypes into the install. See https://chocolatey.org/docs/commands-install / https://chocolatey.org/docs/commands-upgrade.

KNOWN ISSUES

FEATURES

  • Pro/Business - Download a package without installing it - see #108

BUG FIXES

  • Fix - Installing choco on Windows 10 Vagrant box stops Vagrant from being able to manage the box - see #834
  • Fix - 64bit 7z.exe on 32bit system in chocolatey\tools - see #836
  • Fix - [POSH Host] PowerShell exit code does not reset between packages in a single run - see #854
  • Fix - Uninstall-ChocolateyZipPackage is failing - see #871
  • Fix - "C:\Program Files\WindowsPowerShell\Modules" is missing in PSModulePath for cmd.exe #830
  • Fix - Environment variables update fixes #840
  • Fix - Handle null items better - see #853
  • Fix - HKCU may not have Environment (Install of Chocolatey) - see #375
  • Fix - Progress of download does not clear the whole output line - see #875
  • Fix - Wrong download progress reported during package upgrade - see #872
  • Fix - Uninstall not supporting side-by-side => ChocolateyUninstall.ps1 not run - see #862
  • Fix - Uninstall ignores the version parameter - see #861
  • Fix - Search by exact or by id only is case sensitive for remote sources - see #889
  • Fix - Deprecated links inserted in .nuspec files created by choco new ... - see #870
  • Fix - Get-OSArchitectureWidth doesn't do what it says it does - see #828
  • Fix - When Choco fails to get a package from NuGet Core, fail the package with exit code 1 - see #867
  • Fix - Illegal characters in path - see #857
  • Fix - Get-OSArchitectureWidth doesn't do what it says it does - see #828
  • Fix - Pro/Business - Choco install config file fails on licensed assembly - see #866
  • Fix - DISM /all doesn't run anywhere but Windows 6.2 -- no dependencies get installed - see #897

IMPROVEMENTS

  • Do not install tab completion (edit of profile) under certain conditions - see #833
  • Choco install with packages.config should print out the packages to install - see #878
  • Larger default log file size and retention - see #852
  • Allow getting installer type to be overridden - see #885
  • Pack - Add optional output folder option - see #598
  • Little command name correction on init.ps1 - see #595
  • Tab completion - don't query if there is a file in the folder that meets completion - see #847

0.9.10.3

BUG FIXES

  • Fix - Ignore ValidPackage Exit Codes for Real - see #827
  • Fix - Cache folder running under SYSTEM account should be C:\Windows\TEMP - see #826
  • Fix - Built-in 7zip doesn't behave properly - see #775
  • Fix - Successful installer exit codes not recognized by choco should return 0 - see #821
  • Fix - NotSilent fails with "Cannot bind argument to parameter statements because it is an empty string" - see #819
  • Fix - Silent Args being passed as a string array cause package failure - see #808

IMPROVEMENTS

  • Hold pending check for 10 seconds / provide means of explicitly overriding the transactional install cleanup - see #822
  • Pro/Business - Add runtime skip option to allow skipping the virus scanner - see #786

0.9.10.2

BUG FIXES

  • Fix - Chocolatey Licensed is unable to find 0.9.10.x (only 0.9.10.0) - see #814
  • Fix - Logging is broken in some packages due to new TEMP directory - see #813
  • [API] Fix - When performing an Install/Uninstall/Upgrade operation through the API, an error is throw for "chocolatey.resources" - see #811

IMPROVEMENTS

  • Ensure log file path exists - and fix the log file arguments if necessary - see #758

0.9.10.1

BUG FIXES

  • Fix - Cannot bind argument to parameter 'exitCode' because it is null - see #810

IMPROVEMENTS

  • [Security] Upgrade to 7zip 16.02 to overcome CVE-2016-2334/CVE-2016-2335 - see #812

0.9.10

The "I got 99 problems, but a package manager ain't one" release. With the release of 0.9.10 (or if you prefer 0.9.10.0), we're about to make everything 100% better in your Windows package management world. We've addressed over 100 features and bugs in this release. We looked at how we could improve PowerShell and we've come out with a competely internal host that can Prompt and Read-Host in a way that times out and selects default values after a period of time. Speaking of PowerShell, how about some tab completion choco &lt;tab&gt; to choco install node&lt;tab&gt;? How about never having to close and reopen your shell again?

Alternative sources (-source webpi, -s windowsfeature, etc) are back! I mean, am I right?! Have you heard of auto uninstaller? If Chocolatey has installed something that works with Programs and Features, Chocolatey knows how to uninstall it without an uninstall script about 90+% of the time. This feature was in beta for the 0.9.9 series, it is on by default in 0.9.10 (unless you disabled it after trying it, you will need to reenable it, see choco feature for more details).

Here's one you probably never knew existed - extensions. Chocolatey has had the ability to extend itself by adding PowerShell modules for years, and most folks either didn't know it existed or have never used them. We've enhanced them a bit in preparation for the licensed version of Chocolatey.

We redesigned our choco new default packaging template and we've made managing templates as easy as managing packages.

choco search/choco list has so many enhancements, you may not need to visit dot org again. See it in action.
* search -v provides moderation related information and a world of nuspec information
* search by id only
* search by id exact
* search by approved only, not broken, and/or by download cache
* sort by version
* search with paging

There are 150 tickets closed for this release! We've included remediation steps for when a breaking change affects you. Mostly if you have been using Chocolatey in a recommended way, you won't even notice any adverse changes. There are a number of things we thought to highlight, and quite a few security enhancements coming in this release (look for the [Security] tag on the ticket summary).

BREAKING CHANGES

  • Only fail automation scripts (chocolateyInstall.ps1) if the script returns non-zero exit code - see #445

The 0.9.8 series would only fail a package with terminating errors. The 0.9.9 series took that a bit further and started failing packages if anything wrote to stderr. It turns out that is a bad idea. Only when PowerShell exits with non-zero (which comes with terminating errors) should the package fail due to this. If you need the old behavior of the 0.9.9 series, you can get it back with a switch (--fail-on-standard-error and its aliases) and/or a feature flip (failOnStandardError).

  • Fix - Force reinstall, force upgrade, and uninstall should delete the download cache - see #590

If you set a custom cache directory for downloads, it will no longer use a "chocolatey" subdirectory under that. You may need to make any adjustments if this is going to affect you.

  • Exit with the same exit code as the software being installed - see #512

There are more exit codes from Chocolatey now that indicate success -0, 1605, 1614, 1641, and 3010. You may need to adjust anything you were using that would only check for 0 and nonzero.
If you need the previous behavior, be sure to disable the feature usePackageExitCodes or use the --ignore-package-exit-codes switch in your choco commands.

  • PowerShell module functions adjusted for automatic documentation - see #697

If you were using any of the functions in a non-recommended way or not compliant with the examples, you are going to find breakages in the functions as some of the things that were called out as non-optional are now enforced. This shouldn't affect most folks.

  • [Security] Explicit permissions - remove inheritance/lock down to admins - see #398

This further restricts the default installation location by removing all permissions and inheritance of permissions, explicitly giving Administrator/LocalSystem to Full access, and Users are granted Read and Execute. In prior installations, we ensured Modify access to the installing user, but that has been removed for security reasons. Should you need the previous behavior, set $env:ChocolateyInstallAllowCurrentUser="true".

KNOWN ISSUES

FEATURES

  • Alternative Sources - see #14
  • [POSH Host] Use Internal PowerShell Host - see #8
  • Run a script before uninstall/upgrade (chocolateyBeforeModify.ps1) to allow for things like services to shutdown - see #268
  • Manage package templates with a specially named package and special package folder - see #542
  • Support for custom headers - see #332
  • [Security] Show moderation-related information in search results - see #493
  • New Helper - Get-ToolsLocation helper (replacement for Get-BinRoot) - see #631
  • Choco list/search should have exact filter search - see #453
  • RefreshEnv (Refresh Environment Variables) Should also work in PowerShell - see #664
  • Provide PowerShell tab completion for Chocolatey - see #412
  • [Security] Sign the powershell scripts and assemblies - see #501
  • Add a choco info command to show info for one package - see #644
  • Mark packages pending until install completes successfully - see #198
  • Resolve sources by name - see #356
  • Uninstall-ChocolateyEnvironmentVariable function - see #772
  • Get-UninstallRegistryKey function - see #739
  • Pro/Business - Ubiquitous Install Directory Switch - see #258
  • Pro/Business - Runtime Virus Scanning - see virus scanning
  • Pro/Business - Private CDN cache for downloads - see private CDN cache
  • Pro/Business - Sync "choco installed status" with "Windows installed status" - see #567

BUG FIXES

  • [Security] Fix - Only load the Chocolatey PowerShell module from a known location - see #560
  • [Security] Fix - Package source authentication at http://location/path doesn't also use http://location/ (base url) - see #466
  • [Security] Fix - When defining a proxy without credentials - proxy password is shown in plain text - see #503
  • [Security] Fix - Fully qualify shutdown command - see #702
  • [Security] Fix - MSI packages fail install with Could not find 'msiexec' - see #723
  • Fix - Force should set allow-downgrade to true - see #585
  • Fix - Do not use NuGet package cache - see #479
  • Fix - Pack doesn't include chocolatey-specific metadata - see #607
  • Fix - TEMP environment variable is 8.3 Path on some systems - see #532
  • Fix - $packageName should be present for zip uninstalls in uninstall script template - see #534
  • Fix - Debug/Verbose messages not logged in automation scripts (chocolateyInstall.ps1) - see #520
  • Fix - Escape log output for variables that have data from external sources - see #565
  • Fix - Choco new silentargs can't pass in args in the param=value format - see #510
  • Fix - Exception if no source is enabled - see #490
  • Fix - Chocolatey command help output written to standard error instead of standard out - see #468
  • Fix - Logger doesn't clear cached NullLoggers - see #516
  • Fix - DISM "/All" argument in the wrong position - see #480
  • Fix - Pro - Installing/uninstalling extensions should rename files in use - see #594
  • Fix - Running Get-WebFileName in PowerShell 5 fails and sometimes causes package errors - see #603
  • Fix - Merging assemblies on a machine running .Net 4.5 or higher produces binaries incompatible with .Net 4 - see #392
  • Fix - API - Incorrect log4net version in chocolatey.lib dependencies - see #390
  • [POSH Host] Fix - Message after Download progress is on the same line sometimes - see #525
  • [POSH Host] Fix - PowerShell internal process - "The handle is invalid." - see #526
  • [POSH Host] Fix - The handle is invalid - when output is being redirected and a package attempts to write to a filestream - see #572
  • [POSH Host] Fix - Write-Host adding multiple line breaks - see #672
  • [POSH Host] Fix - PowerShell Host doesn't show colorization overrides - see #674
  • [POSH Host] Fix - $profile is empty string when installing packages - does not automatically install the ChocolateyProfile - see #667
  • [POSH Host] Fix - Getting LCID doesn't work properly with the built-in PowerShell - see #741
  • [POSH Host] Fix - Host.Version should return actual PowerShell version - see #708
  • Fix - Verbose shows in output on debug switch - see #611
  • Fix - Get-ChocolateyUnzip captures files that don't belong to the package / Unzip should not do a full disk scan - see #616 and #155
  • Fix - Package succeeds but software install silently fails when Install-ChocolateyInstallPackage has the wrong arguments - see #629
  • Fix - ShimGen handling of spaces and arguments that have shimgen in them - see #647
  • Fix - PowerShell v2 - Choco installer messages can't actually be warnings (causes FileStream errors) - see #666
  • Fix - Installing chocolatey removes $env:PSModulePath changes for current PowerShell session - see #295
  • Fix - Notice for Get-BinRoot deprecation won't be displayed - see #673
  • Fix - choco new creates a bad ChocolateyUninstall.ps1 script which does not work. - see #460
  • Fix - ShimGen fails when file metadata has strings that need literals - see #677
  • Fix - Install-ChocolateyPath Expands Variables in PATH, Overwriting Preexisting Variables - see #303
  • Fix - Install-ChocolateyShortcut gives invalid warning when target is a web url - see #592
  • Fix - Argument Parsing failures should be reported as warnings and not debug messages - see #571
  • Fix - choco pack returns zero exit code when Nuget.Core validation errors - see #469
  • Fix - Install-ChocolateyPath updates PATH to REG_SZ, which may break using Windows dir and system32 tools - see #699
  • Fix - Removing environment variables sets empty environment variables - see #724
  • Fix - Environment Variable Changes Require Reboot - see #728
  • Fix - Get-WebFileName determines strange file name - see #727
  • Fix - Package params are also applied to dependent package - see #733
  • Fix - Use package name/version from environment, not parameters - see #751
  • Fix - Get-WebFileName Does Not Match on Invalid Characters - see #753
  • Fix - choco new cannot introduce multistage folder hierarchy template - see #706
  • Fix - Empty $env:ChocolateyToolsLocation combine error - see #756
  • Fix - Installing chocolatey removes $env:PSModulePath changes for current powershell session - see #295
  • Fix - Some environment variables are set too early for options/switches to have an effect - see #620
  • [API] Fix - Issue when attempting to execute run command through API - see #769
  • Fix - Logging of upgrade messages - placement of some messages is incorrect - see #557
  • Fix - Get-WebFile fails with - The term '//continue' is not recognized as the name of a cmdlet - see #789
  • Fix - Unable to read registry snapshot file - see #487
  • Fix - Pro/Business - Licensed version has an incorrect dependency on PowerShell assemblies and will only load v3 and above - see #799
  • Fix - Exit codes in package scripts should work - see #802
  • Fix - Running choco new creates a bad nuspec - see #801

IMPROVEMENTS

  • AutoUninstaller is on by default - see #308
  • Use the actual download file name instead of providing one - see #435
  • Unset Configuration Values - see #551
  • Ability to run "choco upgrade all" ignoring specific packages - see #293
  • Extensions enhancements - see #588
  • Show human-readable file sizes when downloading - see #363
  • [Security] Warn about environment changes - see #563
  • Warn when execution timeout has elapsed - see #561
  • Update nuspec to make it easier to get started - see #535
  • Suppress verbose output to verbose - like with 7-zip - see #476
  • Choco push moderation message only on push to dot org - see #601
  • Allow tools/bin root to be root of the drive again - see #628
  • File description of ShimGen shims should match original as closely as possible - see #374
  • Shim Generation should automatically detect GUI - see #634
  • Don't show 32 bit wording unless there is explicitly both versions available - see #642
  • Allow passing arbitrary key/value arguments to new command when generating packages from templates - see #658
  • Choco search/list should be able to search just by Id - see #663
  • Search by approved, by not broken, by download cache - see #670
  • Save nuspec files with package installs - see #623
  • Show a prompt character when asking a multiple choice question - see #184
  • When prompting for a user yes/no answer, use a short [y/n] representation - see #181
  • Default package template should include LICENSE.txt and VERIFICATION.txt for packages with binaries - see #675
  • choco list/search aliases for -v - '-detail' and '-detailed' - see #646
  • Log normal output to a secondary log - see #682
  • Display Package test status information on install/upgrade - see #696
  • Report when reboots are necessary from package installs - see #712
  • Report loaded extensions - see #715
  • Exit with specific codes on certain actions - see #707
  • Determine if Downloaded File is HTML or Plain Text - see #649
  • Interactively prompt with timeout on some questions - see #710
  • [POSH Host] Exit code from PowerShell Host should be useful - see #709
  • Update environment for scripts after setting environment variables - see #729
  • Clean up any temp nuget folder actions after NuGet operations - see #622
  • Ensure Web Requests and Responses Do Not Timeout - make configurable - see #732
  • Combine timeout from push and execution timeout as one parameter - see #752
  • Override autouninstaller / failonautouninstaller fail with switches for uninstall - see #515
  • Offer to remove actual package (.install/.portable) when removing meta/virtual package - see #735
  • Provide more info in package summary - see #455
  • Report install location - see #689
  • Track MSI Information Better - see #755
  • Support for client certificates - see #399
  • choco feature list formatting enhancements - see #742
  • choco new --original-template - see #737
  • Update Get-FtpFile with fixes for Get-WebFile - see #765
  • Rename Get-ProcessorBits as a more appropriately named Get-OSArchitectureWidth - see #713
  • Allow passing no 32-bit url and fail the package on 32-bit systems - see #527
  • Enhance Install-ChocolateyShortcut to support WindowStyle, Pin to Taskbar and Run As Administrator checkbox - see #519
  • [Security] Allow hashing files for checksums with FIPS compliant algorithms - see #446
  • After upgrading provide summary of upgraded packages - see #759
  • Web functions - Check for local file and return early - see #781
  • Refresh environment variables after each install - see #439
  • Capture Arguments for a Package during Install/Upgrade - see #358
  • If config update fails, log to debug instead of warn - see #793
  • Remove extra empty lines when doing choco upgrade all - see #796
  • Mention required permissions if user has no access - see #794
  • Pro/Business - Also check for license in User Profile location - see #606
  • Pro/Business - Set download cache information if available - see #562
  • Pro/Business - Allow commands to be added - see #583
  • Pro/Business - Load/Provide hooks for licensed version - see #584
  • Pro/Business - On valid license, add pro/business source automatically - see #604
  • Pro/Business - Add switch to fail on invalid or missing license - see #596
  • Pro/Business - add ignore invalid switches/parameters - see #586
  • Pro/Business - Don't prompt to upload file for virus scanning if it is too large - see #695
  • Pro/Business - add 'support' command - see #745
  • Pro/Business - Adjust environment settings warning to suggest upgrade - see #795
  • API - Add the ability to retrieve package count for a Source - see #431
  • API - Chocolatey Lib still marks vital package information as internal - see #433
  • API - Add paging to list command - see #427
  • API - Choco search should sort by version - see #668
  • API - Switch dll to .NET Client Profile - see #680

Version History

Version Downloads Last updated Status
Chocolatey 0.10.8-beta-20170806 910 Monday, August 7, 2017 approved
Chocolatey 0.10.6.1 844506 Saturday, June 3, 2017 approved
Chocolatey 0.10.6 412468 Thursday, June 1, 2017 approved
Chocolatey 0.10.6-beta-20170531 353 Thursday, June 1, 2017 approved
Chocolatey 0.10.6-beta-20170503 7442 Wednesday, May 3, 2017 approved
Chocolatey 0.10.5 18006743 Thursday, March 30, 2017 approved
Chocolatey 0.10.4 173552 Thursday, March 30, 2017 approved
Chocolatey 0.10.4-beta1-20170326 280 Sunday, March 26, 2017 approved
Chocolatey 0.10.4-beta1-20170323 123 Thursday, March 23, 2017 approved