Unpacking Software Livestream

Join our monthly Unpacking Software livestream to hear about the latest news, chat and opinion on packaging, software deployment and lifecycle management!

Learn More

Chocolatey Product Spotlight

Join the Chocolatey Team on our regular monthly stream where we put a spotlight on the most recent Chocolatey product releases. You'll have a chance to have your questions answered in a live Ask Me Anything format.

Learn More

Chocolatey Coding Livestream

Join us for the Chocolatey Coding Livestream, where members of our team dive into the heart of open source development by coding live on various Chocolatey projects. Tune in to witness real-time coding, ask questions, and gain insights into the world of package management. Don't miss this opportunity to engage with our team and contribute to the future of Chocolatey!

Learn More

Calling All Chocolatiers! Whipping Up Windows Automation with Chocolatey Central Management

Webinar from
Wednesday, 17 January 2024

We are delighted to announce the release of Chocolatey Central Management v0.12.0, featuring seamless Deployment Plan creation, time-saving duplications, insightful Group Details, an upgraded Dashboard, bug fixes, user interface polishing, and refined documentation. As an added bonus we'll have members of our Solutions Engineering team on-hand to dive into some interesting ways you can leverage the new features available!

Watch On-Demand
Chocolatey Community Coffee Break

Join the Chocolatey Team as we discuss all things Community, what we do, how you can get involved and answer your Chocolatey questions.

Watch The Replays
Chocolatey and Intune Overview

Webinar Replay from
Wednesday, 30 March 2022

At Chocolatey Software we strive for simple, and teaching others. Let us teach you just how simple it could be to keep your 3rd party applications updated across your devices, all with Intune!

Watch On-Demand
Chocolatey For Business. In Azure. In One Click.

Livestream from
Thursday, 9 June 2022

Join James and Josh to show you how you can get the Chocolatey For Business recommended infrastructure and workflow, created, in Azure, in around 20 minutes.

Watch On-Demand
The Future of Chocolatey CLI

Livestream from
Thursday, 04 August 2022

Join Paul and Gary to hear more about the plans for the Chocolatey CLI in the not so distant future. We'll talk about some cool new features, long term asks from Customers and Community and how you can get involved!

Watch On-Demand
Hacktoberfest Tuesdays 2022

Livestreams from
October 2022

For Hacktoberfest, Chocolatey ran a livestream every Tuesday! Re-watch Cory, James, Gary, and Rain as they share knowledge on how to contribute to open-source projects such as Chocolatey CLI.

Watch On-Demand

Downloads:

345,437,190

Downloads of v 0.9.10-beta-20160612:

688

Last Update:

12 Jun 2016

Package Maintainer(s):

Software Author(s):

  • Rob Reynolds
  • The Chocolatey Team

Tags:

nuget apt-get machine repository chocolatey

Chocolatey

This is a prerelease version of Chocolatey.

  • 1
  • 2
  • 3

0.9.10-beta-20160612 | Updated: 12 Jun 2016

Downloads:

345,437,190

Downloads of v 0.9.10-beta-20160612:

688

Software Author(s):

  • Rob Reynolds
  • The Chocolatey Team

Chocolatey 0.9.10-beta-20160612

This is a prerelease version of Chocolatey.

  • 1
  • 2
  • 3

Some Checks Have Failed or Are Not Yet Complete

Not All Tests Have Passed


Validation Testing Passed


Verification Testing Passed

Details

Scan Testing Resulted in Investigate

Details
NOTE

Please visit our documentation to learn how to install/uninstall Chocolatey.

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

>
Package Approved

This package was approved as a trusted package on 12 Jun 2016.

Description

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.

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.


tools\chocolateyInstall.ps1
$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
# MIIcrQYJKoZIhvcNAQcCoIIcnjCCHJoCAQExDzANBglghkgBZQMEAgEFADB5Bgor
# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCBnRkXWjpY0tljG
# tdHcuF7eSc6SMx0xvZ11gdXM3nwBmaCCF7cwggUwMIIEGKADAgECAhAECRgbX9W7
# ZnVTQ7VvlVAIMA0GCSqGSIb3DQEBCwUAMGUxCzAJBgNVBAYTAlVTMRUwEwYDVQQK
# EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xJDAiBgNV
# BAMTG0RpZ2lDZXJ0IEFzc3VyZWQgSUQgUm9vdCBDQTAeFw0xMzEwMjIxMjAwMDBa
# Fw0yODEwMjIxMjAwMDBaMHIxCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2Vy
# dCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xMTAvBgNVBAMTKERpZ2lD
# ZXJ0IFNIQTIgQXNzdXJlZCBJRCBDb2RlIFNpZ25pbmcgQ0EwggEiMA0GCSqGSIb3
# DQEBAQUAA4IBDwAwggEKAoIBAQD407Mcfw4Rr2d3B9MLMUkZz9D7RZmxOttE9X/l
# qJ3bMtdx6nadBS63j/qSQ8Cl+YnUNxnXtqrwnIal2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HQbICwe+ruCp0Z22TNc0
# BrOkQkBVe2bWVSPA0j91fAI7LMGFT4E4Uv25TaptZrkf7tKtpr36t2DAPzkTxIKR
# T67deZZo/PVItQeUzHD2vSXX+uyOrIn+EdRblRspbCeIMEoSD0h3SwRUX1iBA6GC
# Ag8wggILBgkqhkiG9w0BCQYxggH8MIIB+AIBATB2MGIxCzAJBgNVBAYTAlVTMRUw
# EwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20x
# ITAfBgNVBAMTGERpZ2lDZXJ0IEFzc3VyZWQgSUQgQ0EtMQIQAwGaAjr/WLFr1tXq
# 5hfwZjAJBgUrDgMCGgUAoF0wGAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAcBgkq
# hkiG9w0BCQUxDxcNMTYwNjEyMTg1MjIwWjAjBgkqhkiG9w0BCQQxFgQUOybKjvBK
# jOiOudQrjCk4Z5WAUP4wDQYJKoZIhvcNAQEBBQAEggEARUa6uj28bw45UphO6F4y
# vxp6sWFfaqXlwgw283ghl7G436uEtuIUFSpZgXoM2XZeUlBX1lUDD/vfhmcSWnS7
# JM9moOuwjdWJoXTUVtaCquodan6Q3InDbBD/gai9yrzLRcZSGsyA63cbMGApiCyl
# pv7Y357x4z2/0dyUvR9LwlLxFXrT/R5EJ7n7/R7wWmPijmkHdQld/x6CuJZYqS/R
# wZbOt87w+gGzh8bWqNlUMxiz9hAgZ859DytTIVajLqwYNd1M+q2imdKpjUTqcFEm
# x00fRG4xfLdtF9HMyNontWUxu92yYIj05VkkAo1I/QIOukyrh0CXk0+iUVVJL0WL
# Cw==
# SIG # End signature block
tools\chocolateyInstall\choco.exe
md5: 6E0887483F8A3A89DB0A678F8C27E870 | sha1: 8A7A4351BD1D2E127238D5AA19D66FDE8BACB73C | sha256: 58C0E2914539732AC5EBDDB9407D5C01384C12DA112FAE73F3FFE091B7E8EA4E | sha512: 264063D179FA869D118E61524FA9D85F227B9B1C5DAEF337A76F330D011C05BA57851E276B2DDD8184CB8BBEA97DEAD9974BAA87A9AF33119267E9D5C478CE5A
tools\chocolateyInstall\choco.exe.ignore
 
tools\chocolateyInstall\helpers\chocolateyInstaller.psm1
# Copyright 2011 - Present 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
    }

# 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 = $_;
    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: '$_'"
      }
    }
  }
}

Export-ModuleMember -Function * -Alias * -Cmdlet *

# SIG # Begin signature block
# MIIcrQYJKoZIhvcNAQcCoIIcnjCCHJoCAQExDzANBglghkgBZQMEAgEFADB5Bgor
# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCCdpbvsTk+JMoB4
# 1SOom9k5nDP4qdx4IVt4bLY0ywvsOqCCF7cwggUwMIIEGKADAgECAhAECRgbX9W7
# ZnVTQ7VvlVAIMA0GCSqGSIb3DQEBCwUAMGUxCzAJBgNVBAYTAlVTMRUwEwYDVQQK
# EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xJDAiBgNV
# BAMTG0RpZ2lDZXJ0IEFzc3VyZWQgSUQgUm9vdCBDQTAeFw0xMzEwMjIxMjAwMDBa
# Fw0yODEwMjIxMjAwMDBaMHIxCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2Vy
# dCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xMTAvBgNVBAMTKERpZ2lD
# ZXJ0IFNIQTIgQXNzdXJlZCBJRCBDb2RlIFNpZ25pbmcgQ0EwggEiMA0GCSqGSIb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LR1Ryu3vJCoq41GZwZWDATp4ccNlNFW/UoGQ8gBnwl58RxZ4v4m+sqtmLP
# dcqu/5SSa3/tzUlzdIfzaOLMRi9/fkPSMFbk+8umSmlevxfQV3LqpnupbvQ4ohA9
# Sq3arI7qUoM5ahwv26DUB6pt7/CFmnm/EqFeEm33NHpCyqKvNArWU6/sKytiS6Pz
# Cq4zwN7h4JLgpZN4VVQQj7SBN3/4QhDkUFnphQlq2feNzCbabGsrlmONhSKocaGC
# Ag8wggILBgkqhkiG9w0BCQYxggH8MIIB+AIBATB2MGIxCzAJBgNVBAYTAlVTMRUw
# EwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20x
# ITAfBgNVBAMTGERpZ2lDZXJ0IEFzc3VyZWQgSUQgQ0EtMQIQAwGaAjr/WLFr1tXq
# 5hfwZjAJBgUrDgMCGgUAoF0wGAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAcBgkq
# hkiG9w0BCQUxDxcNMTYwNjEyMTg1MjE5WjAjBgkqhkiG9w0BCQQxFgQURrTfrayI
# 7eHalnuOi6M6bnMTPEkwDQYJKoZIhvcNAQEBBQAEggEAgq1cLGv47PBAg5RMbreh
# P5KWvvQ1ioorWJpAa7vvpMKgXqaosvPMYcUoowpRNJhjh4WK4AOfGrpIq/HmytZA
# JSS8NPGbVS8P+TraAa2d3OVU5b5d4aK/ifChFwmRdI9W5EL/PnM5w4c8CVjBGN1q
# PMoyLEGiZ7vi60Bg9nA+h49cumspGeMqxYenbKNnAM6paaOgqXa6Ri07r7f+83zQ
# /MwehLALA/2aVbo1jdZcqEMEz3ro2cs4RCH5JtL+rlP3wxEsXYAJKkktF0c1aoY6
# u8BON+0DOAVGrDOrOKjudDSggBsw0+K+PGeIJbsY+K6jzR8rDlAa3ymJTnUJ5hN6
# DQ==
# SIG # End signature block
tools\chocolateyInstall\helpers\chocolateyProfile.psm1
# Copyright © 2011 - Present 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\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
# MIIcrQYJKoZIhvcNAQcCoIIcnjCCHJoCAQExDzANBglghkgBZQMEAgEFADB5Bgor
# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCCwoSvUAwkX+Y4o
# W9+EXs3d+0t4BRVLe1CWh9KjebSWTqCCF7cwggUwMIIEGKADAgECAhAECRgbX9W7
# ZnVTQ7VvlVAIMA0GCSqGSIb3DQEBCwUAMGUxCzAJBgNVBAYTAlVTMRUwEwYDVQQK
# EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xJDAiBgNV
# BAMTG0RpZ2lDZXJ0IEFzc3VyZWQgSUQgUm9vdCBDQTAeFw0xMzEwMjIxMjAwMDBa
# Fw0yODEwMjIxMjAwMDBaMHIxCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2Vy
# dCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xMTAvBgNVBAMTKERpZ2lD
# ZXJ0IFNIQT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chocolateyInstall\helpers\chocolateyScriptRunner.ps1
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 '7za.exe'
$ShimGen = Join-Path $chocoTools 'shimgen.exe'
$checksumExe = Join-Path $chocoTools 'checksum.exe'

Write-Debug "Running `'$packageScript`'";
& "$packageScript"

$scriptSuccess = $?

$exitCode = $LASTEXITCODE
if ($exitCode -eq 0 -and -not $scriptSuccess) {
  $exitCode = 1
}

if ($env:ChocolateyExitCode -ne $null -and $env:ChocolateyExitCode -ne '') {
 $exitCode = $env:ChocolateyExitCode
}

Exit $exitCode
# SIG # Begin signature block
# MIIcrQYJKoZIhvcNAQcCoIIcnjCCHJoCAQExDzANBglghkgBZQMEAgEFADB5Bgor
# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCCSkCxnXSomcAGh
# yyp1iHFQQz6GT5O7DH11swrLgUWHzKCCF7cwggUwMIIEGKADAgECAhAECRgbX9W7
# ZnVTQ7VvlVAIMA0GCSqGSIb3DQEBCwUAMGUxCzAJBgNVBAYTAlVTMRUwEwYDVQQK
# EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xJDAiBgNV
# BAMTG0RpZ2lDZXJ0IEFzc3VyZWQgSUQgUm9vdCBDQTAeFw0xMzEwMjIxMjAwMDBa
# Fw0yODEwMjIxMjAwMDBaMHIxCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2Vy
# dCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xMTAvBgNVBAMTKERpZ2lD
# ZXJ0IFNIQTIgQXNzdXJlZCBJRCBDb2RlIFNpZ25pbmcgQ0EwggEiMA0GCSqGSIb3
# DQEBAQUAA4IBDwAwggEKAoIBAQD407Mcfw4Rr2d3B9MLMUkZz9D7RZmxOttE9X/l
# qJ3bMtdx6nadBS63j/qSQ8Cl+YnUNxnXtqrwnIal2CWsDnkoOn7p0WfTxvspJ8fT
# eyOU5JEjlpB3gvmhhCNmElQzUHSxKCa7JGnCwlLyFGeKiUXULaGj6YgsIJWuHEqH
# CN8M9eJNYBi+qsSyrnAxZjNxPqxwoqvOf+l8y5Kh5TsxHM/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E2HzKGC
# Ag8wggILBgkqhkiG9w0BCQYxggH8MIIB+AIBATB2MGIxCzAJBgNVBAYTAlVTMRUw
# EwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20x
# ITAfBgNVBAMTGERpZ2lDZXJ0IEFzc3VyZWQgSUQgQ0EtMQIQAwGaAjr/WLFr1tXq
# 5hfwZjAJBgUrDgMCGgUAoF0wGAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAcBgkq
# hkiG9w0BCQUxDxcNMTYwNjEyMTg1MjE5WjAjBgkqhkiG9w0BCQQxFgQUxW4ytZl4
# S4MtnZqj3lMgCM3dkXAwDQYJKoZIhvcNAQEBBQAEggEADJXeaUanjeJQI1TdVFfF
# t7piTdNm6Dnf6azbVbMsuO01e0mMnmVvOdtOHiATtzCdPCsfLUgLCWAntZEziNMW
# 2mjCFppKNwkqdN00FsEUrb67lYP5U7Xi+ajmyOHXm1TT4d4/MdJtorVDJPHtnmV6
# rnrL0xtuWqqS2nBsGZH6UHd2MUt8pa4i6c1caAvJslL2tKzJDuPRkWyPhLMvPFKT
# 5YZFaAf7FW6VM8EJH3BWr4ExTzAf8hTfMVyVA57iTNZXqCEP45UFKqHUbJClctqt
# pGeUq1C7ZKgrH41LvUDQCu+4KkI3F4Q5GcAbaCDHK4RQpeT3CfeTfN8k/ag/vhV/
# dw==
# SIG # End signature block
tools\chocolateyInstall\helpers\ChocolateyTabExpansion.ps1
# Copyright © 2011 - Present 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','pack','push','-h','--help','pin','source','config','feature','apikey')

$allcommands = " --debug --verbose --force --noop --help --accept-license --confirm --limit-output --execution-timeout= --cache-location='' --fail-on-error-output --use-system-powershell"
$proInstallUpgradeOptions = " --install-directory='Pro/Biz editions' --skip-download-cache --use-download-cache --skip-virus-check --virus-check --virus-positives-minimum="
$proNewOptions = " --file=<biz>"

$commandOptions = @{
  list = "--lo --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 --use-package-exit-codes --ignore-package-exit-codes --skip-automation-scripts --allow-multiple-versions --ignore-checksums" + $allcommands + $proInstallUpgradeOptions
  pin = "--name= --version= -?" + $allcommands
  outdated = "-? --source='' --user= --password=" + $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 --use-package-exit-codes --ignore-package-exit-codes --skip-automation-scripts --fail-on-unfound --fail-on-not-installed --ignore-checksums" + $allcommands + $proInstallUpgradeOptions
  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" + $allcommands
  new = "--template-name= --file='Biz editions only' --automaticpackage --version= --maintainer='' packageversion= maintainername='' maintainerrepo='' installertype= url='' url64='' silentargs='' --use-built-in-template -?" + $allcommands
  pack = "--version= -?" + $allcommands
  push = "--source='' --api-key= --timeout= -?" + $allcommands
  source = "--name= --source='' --user= --password= --priority= -?" + $allcommands
  config = "--name= --value= -?" + $allcommands
  feature = "--name= -?" + $allcommands
  apikey = "--source='' --api-key= -?" + $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) {
    @(& $script:choco list $filter -lo -r --id-starts-with) | %{ $_.Split('|')[0] }
}

function script:chocoLocalPackagesUpgrade($filter) {
    @('all|') + @(& $script:choco list $filter -lo -r --id-starts-with) | where { $_ -like "$filter*" } | %{ $_.Split('|')[0] }
}

function script:chocoRemotePackages($filter) {
    @('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
# MIIcrQYJKoZIhvcNAQcCoIIcnjCCHJoCAQExDzANBglghkgBZQMEAgEFADB5Bgor
# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCCSb2ZILWZXTR+F
#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xFgQUKgyExB2n
# 8KljsCBKfow9PgIPy7cwDQYJKoZIhvcNAQEBBQAEggEAlWr1E0bt1FeU9O+TiSS8
# u8UMmepF9I9a/xYmfZaI5Am3dnMt/gUIGdJq57n446ptoKFWgLCeTsrOkHsupM6s
# Q7+n/uemPCukRYlIv3+TCA8GbjM4OZQa7VWs4tEckdmfI0PzZkJ8BGitYzr9T1id
# deoISTC6OcEBhLwbsOMlzwwTN51X0/7zRT1PvwGgJ1+dQUxyqLjHaUITZ3QCsMUd
# VoXrIn1IDuYnPQEPlXFS2yoZCzyGUc4TB4HN5HapBD7BflbC/1bXVEGwZMYYJvFd
# MmUfS1yU+b4h16K20saoHUl0UjscF03HLdA0/NX7WX1a5zm4vn59vPuSJPmKAx4R
# iQ==
# SIG # End signature block
tools\chocolateyInstall\helpers\functions\Format-FileSize.ps1
# Copyright © 2011 - Present 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
)
  # This interrupts download progress, so ensure there is no output.
  #Write-Debug "Running 'Format-FileSize' with size: '$size'";

  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
# MIIcrQYJKoZIhvcNAQcCoIIcnjCCHJoCAQExDzANBglghkgBZQMEAgEFADB5Bgor
# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCBxIEc8y4RO6EtV
# RxRN7vA7MYXtnYmNDfrS9A1xYGrapqCCF7cwggUwMIIEGKADAgECAhAECRgbX9W7
# ZnVTQ7VvlVAIMA0GCSqGSIb3DQEBCwUAMGUxCzAJBgNVBAYTAlVTMRUwEwYDVQQK
# EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xJDAiBgNV
# BAMTG0RpZ2lDZXJ0IEFzc3VyZWQgSUQgUm9vdCBDQTAeFw0xMzEwMjIxMjAwMDBa
# Fw0yODEwMjIxMjAwMDBaMHIxCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2Vy
# dCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xMTAvBgNVBAMTKERpZ2lD
# ZXJ0IFNIQTIgQXNzdXJlZCBJRCBDb2RlIFNpZ25pbmcgQ0EwggEiMA0GCSqGSIb3
# DQEBAQUAA4IBDwAwggEKAoIBAQD407Mcfw4Rr2d3B9MLMUkZz9D7RZmxOttE9X/l
# qJ3bMtdx6nadBS63j/qSQ8Cl+YnUNxnXtqrwnIal2CWsDnkoOn7p0WfTxvspJ8fT
# eyOU5JEjlpB3gvmhhCNmElQzUHSxKCa7JGnCwlLyFGeKiUXULaGj6YgsIJWuHEqH
# CN8M9eJNYBi+qsSyrnAxZjNxPqxwo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zTog1Y5IFv3xLU1nj4qGC
# Ag8wggILBgkqhkiG9w0BCQYxggH8MIIB+AIBATB2MGIxCzAJBgNVBAYTAlVTMRUw
# EwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20x
# ITAfBgNVBAMTGERpZ2lDZXJ0IEFzc3VyZWQgSUQgQ0EtMQIQAwGaAjr/WLFr1tXq
# 5hfwZjAJBgUrDgMCGgUAoF0wGAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAcBgkq
# hkiG9w0BCQUxDxcNMTYwNjEyMTg1MjA5WjAjBgkqhkiG9w0BCQQxFgQUYDaV3rld
# svIhNdyqkkFkG0mm4p0wDQYJKoZIhvcNAQEBBQAEggEAif/R1NJU+cGet/eWdzPT
# olrWswqy3HJetN7mtYFezqkKp+cW58WEAnZCrX56YFfeSr3JdcSdHgPAnubSeneA
# oR/ePo+7YlIzNUnqFbIDmmcCOnir+V1PPlel/yDsQtRFHEtHqMvborSvD/siDFPq
# bezIuRkFS2w4AkCwq8Zn5eUkG2sx4361shbmbrLCWIOMwjoIVrvTm9CWM+bUH6kC
# 0CqQKqVet/+/6fDWFZMgruKmzup7qQmXHWoembEp2joUTlg6UxSK6/0gmGUI8ZRn
# EwliYQFMl0RSBgqmCcRHfy5CY0X+O1lkdbHUhYQ6da3GCQYLG7zDUulsk7HkbAsQ
# 3g==
# SIG # End signature block
tools\chocolateyInstall\helpers\functions\Get-CheckSumValid.ps1
# Copyright 2011 - Present 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. This
function is usually used when comparing a file that is downloaded from
an official distribution point. If the checksum fails to
match, this function throws an error.

.NOTES
This uses the checksum.exe tool available separately at
https://chocolatey.org/packages/checksum.

.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.

.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.

.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(ValueFromRemainingArguments = $true)][Object[]] $ignoredArguments
)
  Write-Debug "Running 'Get-ChecksumValid' with file:`'$file`', checksum: `'$checksum`', checksumType: `'$checksumType`'";
  if ($env:chocolateyIgnoreChecksums -eq 'true') {
    Write-Warning "Ignoring checksums due to feature checksumFiles = false or config ignoreChecksums = true."
    return
  }
  if ($checksum -eq '' -or $checksum -eq $null) { return }

  if (!([System.IO.File]::Exists($file))) { throw "Unable to checksum a file that doesn't exist - Could not find file `'$file`'" }

  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.'
    $checksumType = 'md5'
  }

  $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 --ignore-checksums if necessary."
  }

  #$fileCheckSumActual = $md5Output.Split(' ')[0]
  # if ($fileCheckSumActual -ne $checkSum) {
  #   throw "CheckSum for `'$file'` did not meet `'$checkSum`'."
  # }
}

# SIG # Begin signature block
# MIIcrQYJKoZIhvcNAQcCoIIcnjCCHJoCAQExDzANBglghkgBZQMEAgEFADB5Bgor
# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCBEuflhMGvXih+g
# ZdC8ZHw3lDmJa2hNfNhGn3s8IWMxb6CCF7cwggUwMIIEGKADAgECAhAECRgbX9W7
# ZnVTQ7VvlVAIMA0GCSqGSIb3DQEBCwUAMGUxCzAJBgNVBAYTAlVTMRUwEwYDVQQK
# EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xJDAiBgNV
# BAMTG0RpZ2lDZXJ0IEFzc3VyZWQgSUQgUm9vdCBDQTAeFw0xMzEwMjIxMjA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fuZ3l7g2e7WN4pU09Ap7i0xd0rWRMFjv+OQj17iLbpeO7k3Fa8Z4UV3Ow62zI
# xkrNODut2E1f4XcRimcYEeypZCpOZ1m2PyXxfzgtmDtnA43DctXe2A1htyeXE6ex
# yg==
# SIG # End signature block
tools\chocolateyInstall\helpers\functions\Get-ChocolateyUnzip.ps1
# Copyright 2011 - Present 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 standalone command line tool 7za.exe.
Supported archive formats 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.

.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"`

.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(
  [parameter(Mandatory=$true, 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,
  [parameter(ValueFromRemainingArguments = $true)][Object[]] $ignoredArguments
)
  $zipfileFullPath=$fileFullPath
  if ($specificfolder) {
    $fileFullPath=join-path $fileFullPath $specificFolder
  }

  Write-Debug "Running 'Get-ChocolateyUnzip' with fileFullPath:`'$fileFullPath`'', destination: `'$destination`', specificFolder: `'$specificFolder``, packageName: `'$packageName`'";

  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 $fileFullPath to $destination..."
  if (![System.IO.Directory]::Exists($destination)) {[System.IO.Directory]::CreateDirectory($destination)}

  $7zip = Join-Path "$helpersPath" '..\tools\7za.exe'
  if (!([System.IO.File]::Exists($7zip))) {
    Update-SessionEnvironment
    $7zip = Join-Path "$env:ChocolateyInstall" 'tools\7za.exe'
  }
  $7zip = [System.IO.Path]::GetFullPath($7zip)
  Write-Debug "7zip found at `'$7zip`'"

  # 32-bit 7za.exe 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.
  if ([IntPtr]::Size -ne 4) {
    $fileFullPath32 = $fileFullPath -ireplace ([regex]::Escape([Environment]::GetFolderPath('System'))),(Join-Path $Env:SystemRoot sysnative)
    $destination32 = $destination -ireplace ([regex]::Escape([Environment]::GetFolderPath('System'))),(Join-Path $Env:SystemRoot sysnative)
  } else {
    $fileFullPath32 = $fileFullPath
    $destination32 = $destination
  }

  $params = "x -aoa -o`"$destination`" -y `"$fileFullPath`""
  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("Extracting")) {
        $global:zipFileList.AppendLine($global:zipDestinationFolder + "\" + $line.Substring(12))
      }
    }
  }

  $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

  [void] $process.Start()
  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"

  $exitCode = $process.ExitCode
  Set-PowerShellExitCode $exitCode
  $process.Dispose()
  Write-Debug "Command ['$7zip' $params] exited with `'$exitCode`'."

  if ($zipExtractLogFullPath) {
    Set-Content $zipExtractLogFullPath $global:zipFileList.ToString() -Encoding UTF8 -Force
  }

  Write-Debug "7za 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
# MIIcrQYJKoZIhvcNAQcCoIIcnjCCHJoCAQExDzANBglghkgBZQMEAgEFADB5Bgor
# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCBGtPaunNpRn6ej
# J0R5qMOYATdf2ylmiMi+B02fJQpy/aCCF7cwggUwMIIEGKADAgECAhAECRgbX9W7
# ZnVTQ7VvlVAIMA0GCSqGSIb3DQEBCwUAMGUxCzAJBgNVBAYTAlVTMRUwEwYDVQQK
# EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xJDAiBgNV
# BAMTG0RpZ2lDZXJ0IEFzc3VyZWQgSUQgUm9vdCBDQTAeFw0xMzEwMjIxMjAwMDBa
# Fw0yODEwMjIxMjAwMDBaMHIxCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2Vy
# dCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xMTAvBgNVBAMTKERpZ2lD
# ZXJ0IFNIQTIgQXNzdXJlZCBJRCBDb2RlIFNpZ25pbmcgQ0EwggE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
# PiTY2Bt3IA1rODtI2c+vRc5r+Gcy/mlL7RuJNcei79KH2I6ReaWVcgklbulFHNkW
# NkDpNOBs4zIgHkMBqx0X9QWjTn8q/mE3Hbuil2YaraY2hwY8b8zgFTz+9WScggAz
# RrGaLcjdEk6bz9vqwoJixgp72l9GXgLMs6yEd2Z2X/lXzfRilijpVJqLHZGms5R2
# KpUPMcjs0YN0sXKOc4Pb9IESnCMDY4bNjWbnQBsZIfQHpGqvEhclJQNNGEoS96GC
# Ag8wggILBgkqhkiG9w0BCQYxggH8MIIB+AIBATB2MGIxCzAJBgNVBAYTAlVTMRUw
# EwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20x
# ITAfBgNVBAMTGERpZ2lDZXJ0IEFzc3VyZWQgSUQgQ0EtMQIQAwGaAjr/WLFr1tXq
# 5hfwZjAJBgUrDgMCGgUAoF0wGAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAcBgkq
# hkiG9w0BCQUxDxcNMTYwNjEyMTg1MjEwWjAjBgkqhkiG9w0BCQQxFgQU0+RAWlsH
# gB+QK7HO6kd6y8QHdwkwDQYJKoZIhvcNAQEBBQAEggEACNdJrEpFXqyq7c1yaAMt
# KVgCxbjhKIWwIEhsDW/mgmeGUv0iEUDwTteROmv9/BI7CGMzgahspoW0dqjQtP7G
# IlD/TmeR61PPSrE5Lp3gONXSUZUeA5Dixo7RQ8u1aPIHcTJIwputbs3SoWNBaVtj
# aOIUYDLSl0O6zm7US4KAAmZlcc0hJOCBtR0qTRz6FAPDxQ3Lly5jhGlzFs1tRSt4
# ADV0o+BY4GNrGPdpnH1l60s0BNakyhSOLFfh1/a3y5r5aiCLBQfsgXRshb2BWQzY
# R2i5kg3G9IOjGPuVS2VkY/N1rHo0LQJJ8vmkaK6eHeMub6y8LIP5EpprvT24sunx
# DA==
# SIG # End signature block
tools\chocolateyInstall\helpers\functions\Get-ChocolateyWebFile.ps1
# Copyright 2011 - Present 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.

.PARAMETER Checksum
OPTIONAL (Highly recommended) - 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.

.PARAMETER ChecksumType
OPTIONAL - 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.

.PARAMETER Checksum64
OPTIONAL (Highly recommended) - 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.

.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.

.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.

.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)][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(ValueFromRemainingArguments = $true)][Object[]] $ignoredArguments
)
  Write-Debug "Running 'Get-ChocolateyWebFile' for $packageName with url:`'$url`', fileFullPath:`'$fileFullPath`', url64bit:`'$url64bit`', checksum: `'$checksum`', checksumType: `'$checksumType`', checksum64: `'$checksum64`', checksumType64: `'$checksumType64`'";

  $url32bit = $url;
  $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."
  }

  if ($getOriginalFileName) {
    try {
      $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'."
  }

  $headers = @{}
  if ($url.StartsWith('http')) {
    try {
      $headers = Get-WebHeaders $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
        [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]::Ssl3
        try {
          $headers = Get-WebHeaders $url -ErrorAction "Stop"
        } catch {
          Write-Host "Attempt to get headers for $url failed.`n  $($_.Exception.Message)"
        }
      } else {
        Write-Host "Attempt to get headers for $url failed.`n  $($_.Exception.Message)"
      }
    }

    $needsDownload = $true
    if ($headers.Count -ne 0 -and $headers.ContainsKey("Content-Length")) {
      $fi = new-object System.IO.FileInfo($fileFullPath)
      # if the file already exists there is no reason to download it again.
      if ($fi.Exists -and $fi.Length -eq $headers["Content-Length"]) {
        Write-Debug "$($packageName)'s requested file has already been downloaded. Using cached copy at
  `'$fileFullPath`'."
        $needsDownload = $false
      }
    }

    if ($needsDownload) {
      Write-Host "Downloading $packageName $bitPackage
  from `'$url`'"
      Get-WebFile $url $fileFullPath -options $options
    }
  } elseif ($url.StartsWith('ftp')) {
    Write-Host "Ftp-ing $packageName
  from `'$url`'"
    Get-FtpFile $url $fileFullPath
  } else {
    if ($url.StartsWith('file:')) { $url = ([uri] $url).LocalPath }
    Write-Host "Copying $packageName
  from `'$url`'"
    Copy-Item $url -Destination $fileFullPath -Force
  }

  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) {
    # 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'
    }
  }

  Write-Debug "Verifying package provided checksum of '$checksum' for '$fileFullPath'."
  Get-CheckSumValid -file $fileFullPath -checkSum $checksum -checksumType $checksumType

  return $fileFullPath
}

# SIG # Begin signature block
# MIIcrQYJKoZIhvcNAQcCoIIcnjCCHJoCAQExDzANBglghkgBZQMEAgEFADB5Bgor
# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
# KX7zUQIBAAIB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kiG9w0BCQUxDxcNMTYwNjEyMTg1MjEwWjAjBgkqhkiG9w0BCQQxFgQUK2H+gBQT
# jUkPI6pGTFQxVF91euowDQYJKoZIhvcNAQEBBQAEggEAGXO0JpXSbMCDV/GmXp0u
# HqCadcIGcHnFSRYfClTbukh2uI1YpZJgztVC7V/sRWJiQxUKeB6dS2GJe5aCvaUl
# 1j6mn0jVkrJPtWTB/MGl2IR8RpiW+O31MTq6+RdJR1ttHPKFCdnZoOm1KSz0c/XE
# HBp6cVJFOeTq5akJa5PbRPsbCq5jxmqYm0OEYIVE4IGsp3qao6Eq+/3NTa41JL33
# apawntGI3QfPSXh0jvqiA4bbAYLFwhzLsxDobejRaZDVbWTtrYE/2YEcQ6hmLP8I
# sPj8NMMK6ZVefha3mBtgtkBAgD1Wv7GRAexd/RZNU+PckIh8b78v8tfI9gis4Ryi
# aQ==
# SIG # End signature block
tools\chocolateyInstall\helpers\functions\Get-EnvironmentVariable.ps1
# Copyright 2011 - Present 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
)
  [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"
    $environmentVariableValue = $win32RegistryKey.GetValue($Name, [string]::Empty, $registryValueOptions)
  } catch {
    Write-Debug "Unable to retrieve the $Name environment variable. Details: $_"
  } finally {
    $win32RegistryKey.Close()
  }

  if ($environmentVariableValue -eq $null -or $environmentVariableValue -eq '') {
    $environmentVariableValue = [Environment]::GetEnvironmentVariable($Name, $Scope)
  }

  return $environmentVariableValue
}

# SIG # Begin signature block
# MIIcrQYJKoZIhvcNAQcCoIIcnjCCHJoCAQExDzANBglghkgBZQMEAgEFADB5Bgor
# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCD21TWkXpF6GY0X
# wf6pBR+3rNT0/YHFt7zb8D9rHyDnJ6CCF7cwggUwMIIEGKADAgECAhAECRgbX9W7
# ZnVTQ7VvlVAIMA0GCSqGSIb3DQEBCwUAMGUxCzAJBgNVBAYTAlVTMRUwEwYDVQQK
# EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xJDAiBgNV
# BAMTG0RpZ2lDZXJ0IEFzc3VyZWQgSUQgUm9vdCBDQTAeFw0xMzEwMjIxMjAwMDBa
# Fw0yODEwMjIxMjAwMDBaMHIxCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2Vy
# dCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xMTAvBgNVBAMTKERpZ2lD
# ZXJ0IFNIQTIgQXNzdXJlZCBJRCBDb2RlIFNpZ25pbmcgQ0EwggEiMA0GCSqGSIb3
# DQEBAQUAA4IBDwAwggEKAoIBAQD407Mcfw4Rr2d3B9MLMUkZz9D7RZmxOttE9X/l
# qJ3bMtdx6nadBS63j/qSQ8Cl+YnUNxnXtqrwnIal2CWsDnkoOn7p0WfTxvspJ8fT
# eyOU5JEjlpB3gvmhhCNmElQzUHSxKCa7JGnCwlLyFGeKiUXULaGj6YgsIJWuHEqH
# CN8M9eJNYBi+qsSyrnAxZjNxPqxwoqvOf+l8y5Kh5TsxHM/q8grkV7tKtel05iv+
# bMt+dDk2DZDv5LVOpKn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IB+AIBATB2MGIxCzAJBgNVBAYTAlVTMRUw
# EwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20x
# ITAfBgNVBAMTGERpZ2lDZXJ0IEFzc3VyZWQgSUQgQ0EtMQIQAwGaAjr/WLFr1tXq
# 5hfwZjAJBgUrDgMCGgUAoF0wGAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAcBgkq
# hkiG9w0BCQUxDxcNMTYwNjEyMTg1MjEwWjAjBgkqhkiG9w0BCQQxFgQUcZPMbKEc
# GI/0wS1RIytIdeD2P0swDQYJKoZIhvcNAQEBBQAEggEAnruog/y73Xn0tYrhfgnh
# dtYb/LrBEfWvbV0S4Dm3ZCtusy7LAxzri6hXv/bYy8oz5fcJt3+6mGaHLWkkC+wI
# 3i8zsmv8Tv8eq4u1IPg4SYuDnCu9WmHVHUsuibwHU8Xp9kotSwz0kjRpGlv3tYQk
# pJvQaGeYq9glvfGf40HNZdT9c6IvY2+1Ad7DRa0guGBmVFX47alV5YgRfxvzmf9I
# wn4SjtNQprdFt+SDhNLmMKMsPQxY5ama3ODl2JjslFFo7k5H3dp9ngMI2q95sLCU
# fyB1XZuLJUvJJzoI+8GW6V9W3uF+OIbxHEIzgdLMLM8giZIezMxQURHGUcHXrPfM
# VQ==
# SIG # End signature block
tools\chocolateyInstall\helpers\functions\Get-EnvironmentVariableNames.ps1
# Copyright 2011 - Present 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
#>

  switch ($Scope) {
    'User' { Get-Item 'HKCU:\Environment' | 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
# MIIcrQYJKoZIhvcNAQcCoIIcnjCCHJoCAQExDzANBglghkgBZQMEAgEFADB5Bgor
# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCAemDpwy/LO5hvd
# 2XySdpJNilzN2l/TVDVRNzRL2uehU6CCF7cwggUwMIIEGKADAgECAhAECRgbX9W7
# ZnVTQ7VvlVAIMA0GCSqGSIb3DQEBCwUAMGUxCzAJBgNVBAYTAlVTMRUwEwYDVQQK
# EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xJDAiBgNV
# BAMTG0RpZ2lDZXJ0IEFzc3VyZWQgSUQgUm9vdCBDQTAeFw0xMzEwMjIxMjAwMDBa
# Fw0yODEwMjIxMjAwMDBaMHIxCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2Vy
# dCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xMTAvBgNVBAMTKERpZ2lD
# ZXJ0I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SIG # End signature block
tools\chocolateyInstall\helpers\functions\Get-FtpFile.ps1
## 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.

.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-Debug "Running 'Get-FtpFile' for $fileName with url:'$url', userName: '$userName', password: '$password'";

  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
  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)
	  }

  	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()
    [int]$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[] 1024
    [int]$total = [int]$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) {
            Write-Progress "Downloading $url to $fileName" "Saving $totalFormatted of $goalFormatted ($total/$goal)" -id 0 -percentComplete (($total/$goal)*100)
          } else {
            Write-Progress "Downloading $url to $fileName" "Saving $total bytes..." -id 0 -Completed
          }
          if ($total -eq $goal) {
            Write-Progress "Completed download of $url." "Completed a total of $total bytes of $fileName" -id 0 -Completed
          }
        }
      } while ($count -ne 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()
    }

  } 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 ($ftpresponse -ne $null) {
      $ftpresponse.Close()
    }
  }
}

# SIG # Begin signature block
# MIIcrQYJKoZIhvcNAQcCoIIcnjCCHJoCAQExDzANBglghkgBZQMEAgEFADB5Bgor
# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE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b3DQEHATAcBgkq
# hkiG9w0BCQUxDxcNMTYwNjEyMTg1MjExWjAjBgkqhkiG9w0BCQQxFgQUOCB+L6rH
# QPmUHs8YXhPD+ldMKPwwDQYJKoZIhvcNAQEBBQAEggEAnYdSWJmDP+TipCf/TEf6
# u4FzDGQqY2rG13QmXGoOUrZQ880kqQ009pg2qk2RuhLNKZZlebIzDntdzO9Kq3TS
# BfLcvdB/nCBRKmEfXayMgzDLcDgP0JhgqU5Czc9A+XhW5oYwGSo4CDtWYjai31aW
# VKHNpNuGdLRn0rkt3xi1KY3aMtFkEl2qtp7R8XvrsTP7V7/n/N2ifIMy8UDYzxo3
# /KKNYSwXDKcD+ZqK0B7QOOFzQcLiz9Q7QxQiJY3BjHjytXOr8dadV0RsNrCAlYK0
# PlEQByzJ1U0Aeal/jgJwkcEsaJg0CFbbJKuum3HMtB2aD0bOBU5P9r5YBmYpJ5zQ
# SA==
# SIG # End signature block
tools\chocolateyInstall\helpers\functions\Get-OSArchitectureWidth.ps1
# Copyright 2011 - Present 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-Debug "Running 'Get-OSArchitectureWidth'"

  $bits = 64
  if ([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

# SIG # Begin signature block
# MIIcrQYJKoZIhvcNAQcCoIIcnjCCHJoCAQExDzANBglghkgBZQMEAgEFADB5Bgor
# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCDD5l1AJC4t2/tV
# O1mAUnru3EtqJIMqCFxLWEK6OkXw4KCCF7cwggUwMIIEGKADAgECAhAECRgbX9W7
# ZnVTQ7VvlVAIMA0GCSqGSIb3DQEBCwUAMGUxCzAJBgNVBAYTAlVTMRUwEwYDVQQK
# EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xJDAiBgNV
# BAMTG0RpZ2lDZXJ0IEFzc3VyZWQgSUQgUm9vdCBDQTAeFw0xMzEwMjIxMjAwMDBa
# Fw0yODEwMjIxMjAwMDBaMHIxCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2Vy
# dCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xMTAvBgNVBAMTKERpZ2lD
# ZXJ0IFNIQTIgQXNzdXJlZCBJRCBDb2RlIFNpZ25pbmcgQ0EwggEiMA0GCSqGSIb3
# DQEBAQUAA4IBDwAwggEKAoIBAQD407Mcfw4Rr2d3B9MLMUkZz9D7RZmxOttE9X/l
# qJ3bMtdx6nadBS63j/qSQ8Cl+YnUNxnXtqrwnIal2CWsDnkoOn7p0WfTxvspJ8fT
# eyOU5JEjlpB3gvmhhCNmElQzUHSx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CshMwqm4Pc42GpsbPOCfISkeiNJnAR7Xpaj
# 8nZafiLsP0jxojynHIc9zlNGuXRmlu5kl1BdlYPU+9DoEfRRHoPA1vAn1gj9vKGC
# Ag8wggILBgkqhkiG9w0BCQYxggH8MIIB+AIBATB2MGIxCzAJBgNVBAYTAlVTMRUw
# EwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20x
# ITAfBgNVBAMTGERpZ2lDZXJ0IEFzc3VyZWQgSUQgQ0EtMQIQAwGaAjr/WLFr1tXq
# 5hfwZjAJBgUrDgMCGgUAoF0wGAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAcBgkq
# hkiG9w0BCQUxDxcNMTYwNjEyMTg1MjExWjAjBgkqhkiG9w0BCQQxFgQUYZvRkpXE
# aAXqQKH5hHSv79ObHeswDQYJKoZIhvcNAQEBBQAEggEAMYqyG1rqweoOy/Y17B9V
# lCjYVVSnrOqsgR5dcvgsBgrZhQk8ah/zDMjUYjpv/hq7ByJWGbKcO2Y88eYUWFJX
# 9dkRZub36FDvmBALd+LZ6VhufaUlGtsrR4UIGUVHZJ8cVW1OrbU1wDv6KtpCyXnz
# dHnxku3ysDjPcUvVFSIF/tFx2e/qfGyUj1DefnD6dQ3uXoblDOW53d80pMv0ZZFu
# HLWPBHD32AFrTi6aGB3rpvBLHbKON3HE4uWcVjwQXRL9sp8/eShxZXAgCIkp4lLB
# lof/dUt9SLttHehR9B79/TQ/qfkgfkL+Y9R7wqUgOZBdhymkeFEvYBqkrKihtpS2
# 2g==
# SIG # End signature block
tools\chocolateyInstall\helpers\functions\Get-ToolsLocation.ps1
# Copyright 2011 - Present 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
#>
  Write-Debug "Running 'Get-ToolsLocation'";
  $invocation = $MyInvocation
  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 is being replaced with Get-ToolsLocation, 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
      }

      $toolsLocation = $binRoot
      Set-EnvironmentVariable -Name "ChocolateyBinRoot" -Value '' -Scope User
    }
  }

  # 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)) {
    Set-EnvironmentVariable -Name "ChocolateyToolsLocation" -Value $toolsLocation -Scope User
  }

  return $toolsLocation
}

Set-Alias Get-BinRoot Get-ToolsLocation -Force -Scope Global -Option AllScope

# SIG # Begin signature block
# MIIcrQYJKoZIhvcNAQcCoIIcnjCCHJoCAQExDzANBglghkgBZQMEAgEFADB5Bgor
# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCBGCufQuqmIwg8U
# HAkGOYnG4lag5W4Tf1s8TLsJ6f8RdKCCF7cwggUwMIIEGKADAgECAhAECRgbX9W7
# ZnVTQ7VvlVAIMA0GCSqGSIb3DQEBCwUAMGUxCzAJBgNVBAYTAlVTMRUwEwYDVQQK
# EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xJDAiBgNV
# BAMTG0RpZ2lDZXJ0IEFzc3VyZWQgSUQgUm9vdCBDQTAeFw0xMzEwMjIxMjAwMDBa
# Fw0yODEwMjIxMjAwMDBaMHIxCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2Vy
# dCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xMTAvBgNVBAMTKERpZ2lD
# ZXJ0IFNIQTIgQXNzdXJlZCBJRCBDb2RlIFNpZ25pbmcgQ0EwggEiMA0GCSqGSIb3
# DQEBAQUAA4IBDwAwggEKAoIBAQD407Mcfw4Rr2d3B9MLMUkZz9D7RZmxOttE9X/l
# qJ3bMtdx6nadBS63j/qSQ8Cl+YnUNxnXtqrwnIal2CWsDnkoOn7p0WfTxvspJ8fT
# eyOU5JEjlpB3gvmhhCNmElQzUHSxKCa7JGnCwlLyFGeKiUXULaGj6YgsIJWuHEqH
# CN8M9eJNYBi+qsSyrnAxZjNxPqxwoqvOf+l8y5Kh5TsxHM/q8grkV7tKtel05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ggILBgkqhkiG9w0BCQYxggH8MIIB+AIBATB2MGIxCzAJBgNVBAYTAlVTMRUw
# EwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20x
# ITAfBgNVBAMTGERpZ2lDZXJ0IEFzc3VyZWQgSUQgQ0EtMQIQAwGaAjr/WLFr1tXq
# 5hfwZjAJBgUrDgMCGgUAoF0wGAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAcBgkq
# hkiG9w0BCQUxDxcNMTYwNjEyMTg1MjExWjAjBgkqhkiG9w0BCQQxFgQUqHdBF9R5
# 7efV+3r27AUupihmPwcwDQYJKoZIhvcNAQEBBQAEggEAJHwhbWPwEBdjuPkH1V6g
# lZpEzgvrhvPX0Oc1tQCgmHANxg3Qvrl8XTa2CSh9OP5RGeWD/ajxHBBuNtIwsj0K
# QdpzznlCfShQ9vw87UW+2jO4uh7oIQTPsDg6mqAlpxKIHS4SlyEoMoPm02poT4E8
# ZDlwN4Jcnng6pf/kYMu5QwNo41ZS8jB9J60gbNR+RZCWJqMz4pHehccF75A+a1Se
# iJNfcKcyoSlcRTMrdB6Gj6UjtwxeDpsZHFVoWD4H2pz81lcaRIHnKkX+qorr8d3l
# fnQpyHSOBL1p0V2AkgNkR0yZH5z2MRG2e/8n2x1vSIVet2P6RAiX3SGfhcC29Hja
# 4g==
# SIG # End signature block
tools\chocolateyInstall\helpers\functions\Get-UACEnabled.ps1
# Copyright 2011 - Present 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
#>

  $uacRegPath = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System"
  $uacRegValue = "EnableLUA"
  $uacEnabled = $false

  Write-Debug "Running 'Get-UACEnabled'"

  # 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
# MIIcrQYJKoZIhvcNAQcCoIIcnjCCHJoCAQExDzANBglghkgBZQMEAgEFADB5Bgor
# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCDjXM+t/5r1V9LI
# 5UcU/WFOQh2HjMhWPAv837Wqu1MsTqCCF7cwggUwMIIEGKADAgECAhAECRgbX9W7
# ZnVTQ7VvlVAIMA0GCSqGSIb3DQEBCwUAMGUxCzAJBgNVBAYTAlVTMRUwEwYDVQQK
# EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xJDAiBgNV
# BAMTG0RpZ2lDZXJ0IEFzc3VyZWQgSUQgUm9vdCBDQTAeFw0xMzEwMjIxMjAwMDBa
# Fw0yODEwMjIxMjAwMDBaMHIxCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2Vy
# dCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC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aiZQnuChQxf3V8aGF9j6rMntKzl
# VQ==
# SIG # End signature block
tools\chocolateyInstall\helpers\functions\Get-VirusCheckValid.ps1
# Copyright 2011 - Present 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 virus checking built into FOSS Chocolatey. Check out Pro or Business if you need this. https://chocolatey.org/compare"
}

# SIG # Begin signature block
# MIIcrQYJKoZIhvcNAQcCoIIcnjCCHJoCAQExDzANBglghkgBZQMEAgEFADB5Bgor
# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCAFsC/VArVa0Itx
# jZYERO2YXNPRi2wGXmX2RoemvPcPWaCCF7cwggUwMIIEGKADAgECAhAECRgbX9W7
# ZnVTQ7VvlVAIMA0GCSq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byqlDhtgPUt3D33xn1tGBbgvdofrk99N+bJ6Ci7X6n8ej+5
# pP5x57MU++qLhlUAR930jeSGSA8Okrt/WNzhOYtu2/kDss3IxD/024752uyWzlLE
# pO6wbHv8QUquLAwiOxPxzvcX2KmnoD2rvAtmooJQv4ehyLk8bO6YOw01eDfiWW0y
# RucwBuqmBYsRJ1pUHA5XIKufHQ/5CIqpT66tYYjbuvU0U770gsV7g2JZSURRCv4+
# ktSXJlDSuwqcb83hKUq+M0sHVDs2Umn5iwvLXhJy7vyYYgwk3rtn9+mIBBXW6eIP
# LQ==
# SIG # End signature block
tools\chocolateyInstall\helpers\functions\Get-WebFile.ps1
# 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.

.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-Debug "Running 'Get-WebFile' for $fileName with url:`'$url`', userAgent: `'$userAgent`' ";
  #if ($url -eq '' 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
  }

  $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
  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)
	}

	Write-Host "Using explicit proxy server '$explicitProxy'."
    $req.Proxy = $proxy

  } elseif (!$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
    $req.Proxy = $proxy
  }

  $req.Accept = "*/*"
  $req.AllowAutoRedirect = $true
  $req.MaximumAutomaticRedirections = 20
  #$req.KeepAlive = $true
  # use the default request timeout of 100000
  if ($env:chocolateyRequestTimeout -ne $null -and $env:chocolateyRequestTimeout -ne '') {
    $req.Timeout =  $env:chocolateyRequestTimeout
  }
  if ($env:chocolateyResponseTimeout -ne $null -and $env:chocolateyResponseTimeout -ne '') {
    $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 {
   [System.Net.HttpWebResponse]$res = $req.GetResponse();

   try {
      $headers = @{}
      foreach ($key in $res.Headers) {
        $value = $res.Headers[$key];
        if ($value) {
          $headers.Add("$key","$value")
        }
      }

      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 "$fileName.istext" -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) {
              Write-Progress "Downloading $url to $fileName" "Saving $totalFormatted of $goalFormatted ($total/$goal)" -id 0 -percentComplete (($total/$goal)*100)
            }

            if ($total -eq $goal) {
              Write-Progress "Completed download of $url." "Completed download of $fileName ($goalFormatted)." -id 0 -Completed
            }
          }
        } 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()
    }
  }
}

# this could be cleaned up with http://learn-powershell.net/2013/02/08/powershell-and-events-object-events/

# SIG # Begin signature block
# MIIcrQYJKoZIhvcNAQcCoIIcnjCCHJoCAQExDzANBglghkgBZQMEAgEFADB5Bgor
# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCCEivHQEKXaMKBs
# WOFbmIz9ry9PXgurfS1+tl6ZC5EFEqCCF7cwggUwMIIEGKADAgECAhAECRgbX9W7
# ZnVTQ7VvlVAIMA0GCSqGSIb3DQEBCwUAMGUxCzAJBgNVBAYTAlVTMRUwEwYDVQQK
# EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xJDAiBgNV
# BAMTG0RpZ2lDZXJ0IEFzc3VyZWQgSUQgUm9vdCBDQTAeFw0xMzEwMjIxMjAwMDBa
# Fw0yODEwMjIxMjAwMDBaMHIxCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2Vy
# dCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xMTAvBgNVBAMTKERpZ2lD
# ZXJ0IFNIQTIgQXNzdXJlZCBJRCBDb2RlIFNpZ25pbmcgQ0EwggEiMA0GCSqGSIb3
# DQEBAQUAA4IBDwAwggEKAoIBAQD407Mcfw4Rr2d3B9MLMUkZz9D7RZmxOttE9X/l
# qJ3bMtdx6nadBS63j/qSQ8Cl+YnUNxnXtqrwnIal2CWsDnkoOn7p0WfTxvspJ8fT
# eyOU5JEjlpB3gvmhhCNmElQzUHSxKCa7JGnCwlLyFGeKiUXULaGj6YgsIJWuHEqH
# CN8M9eJNYBi+qsSyrnAxZjNxPqxwoqvOf+l8y5Kh5TsxHM/q8grkV7tKtel05iv+
# bMt+dDk2DZDv5LVOpKnqagqrhPOsZ061xPeM0SAlI+s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
# EwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20x
# ITAfBgNVBAMTGERpZ2lDZXJ0IEFzc3VyZWQgSUQgQ0EtMQIQAwGaAjr/WLFr1tXq
# 5hfwZjAJBgUrDgMCGgUAoF0wGAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAcBgkq
# hkiG9w0BCQUxDxcNMTYwNjEyMTg1MjEyWjAjBgkqhkiG9w0BCQQxFgQUgd6fnQ6r
# P/J+JRAVe5kaST7kGf8wDQYJKoZIhvcNAQEBBQAEggEAU4AMCFvAuFW7dJlegJty
# 9vflexFWnCLJk/OvqFPbNhbbNhKKhGKnvRRBPlHJKFXfymAhyFuVYTVmeJNhQdrl
# MAeUg9KVRWW3jeoLfrDPGNbv/8ydamwTnYNcfKc0tOoqWxo0Na4mN2o1CKXnafhM
# 7gj6dFV1n5XgZhvl+6c2nvoKtOxn77vGIHmGPXP2bIjd5PSYdLEiJJekEczg9ebc
# ivXamU8efPsQQ6xWu90Bqv3nPcXoQZ23Y4Zmv+UlUwiaoO/zSctSIGtd2gkZL4wp
# OHv2y0YFsJSYhFZJwrIl0okhzKhkrMRePQY/DLEysRUP+hysVGH+iUzPqMtCzbs/
# PQ==
# SIG # End signature block
tools\chocolateyInstall\helpers\functions\Get-WebFileName.ps1
# Copyright 2011 - Present 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-Debug "Running 'Get-WebFileName' to determine name with url:'$url', defaultName:'$defaultName'";


  $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
  }

  $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
  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)
  }

    Write-Debug "Using explicit proxy server '$explicitProxy'."
    $request.Proxy = $proxy

  } elseif (!$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
    $request.Proxy = $proxy
  }

  $request.Method = "GET"
  $request.Accept = '*/*'
  $request.AllowAutoRedirect = $true
  $request.MaximumAutomaticRedirections = 20
  #$request.KeepAlive = $true
  $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
# MIIcrQYJKoZIhvcNAQcCoIIcnjCCHJoCAQExDzANBglghkgBZQMEAgEFADB5Bgor
# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCDo7klShRrW1FQe
# Q5SGBxJFkLa1z1JGRAMjIAqxx2pnD6CCF7cwggUwMIIEGKADAgECAhAECRgbX9W7
# ZnVTQ7VvlVAIMA0GCSqGSIb3DQEBCwUAMGUxCzAJBgNVBAYTAlVTMRUwEwYDVQQK
# EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xJDAiBgNV
# BAMTG0RpZ2lDZXJ0IEFzc3VyZWQgSUQgUm9vdCBDQTAeFw0xMzEwMjIxMjAwMDBa
# Fw0yODEwMjIxMjAwMDBaMHIxCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2Vy
# dCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xMTAvBgNVBAMTKERpZ2lD
# ZXJ0IFNIQTIgQXNzdXJlZCBJRCBDb2RlIFNpZ25pbmcgQ0EwggEiMA0GCSqGSIb3
# DQEBAQUAA4IBDwAwggEKAoIBAQD407Mcfw4Rr2d3B9MLMUkZz9D7RZmxOttE9X/l
# qJ3bMtdx6nadBS63j/qSQ8Cl+YnUNxnXtqrwnIal2CWsDnkoOn7p0WfTxvspJ8fT
# eyOU5JEjlpB3gvmhhCNmElQzUHSxKCa7JGnCwlLyFGeKiUXULaGj6YgsIJWuHEqH
# CN8M9eJNYBi+qsSyrnAxZjNxPqxwoqvOf+l8y5Kh5TsxHM/q8grkV7tKtel05iv+
# bMt+dDk2DZDv5LVOpKnqagqrhPOsZ061xPeM0SAlI+sIZD5SlsHy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wxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20x
# ITAfBgNVBAMTGERpZ2lDZXJ0IEFzc3VyZWQgSUQgQ0EtMQIQAwGaAjr/WLFr1tXq
# 5hfwZjAJBgUrDgMCGgUAoF0wGAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAcBgkq
# hkiG9w0BCQUxDxcNMTYwNjEyMTg1MjEyWjAjBgkqhkiG9w0BCQQxFgQUPbl4TFJO
# wh72VTjzQSvXmqAnuykwDQYJKoZIhvcNAQEBBQAEggEAgnOm8u8cm/0i9nX7lr7C
# KApk8P4Vt7PhRsfwFLODZ0F+hmKKD3+Y8rDnGwpf83vjon/OtNPtLsXMib5zngXf
# rylC7VkXX0u7ULuLsEtKnftaD1O+bOX0cR2ghdjN4e9N3ypCHDyvuW3Iuq7yPdgE
# L4swMJcOqhKhBK/IAH0Sb2XLHNrX8T6vLofGv3CZfSf07pkioY9h5lfE/hXNwXZS
# JUMDH3oEGU0gdJn4UYSx3hBAZCs7qAuOyusd/tym5uf1Jy3Nn4qgtF52SRybza+p
# 6xPosjlwgoxBWFrVLDdeCg8swsdfnR81o9tOr4ixuN37uOvuf8C48SMrQPIDG/9D
# Qw==
# SIG # End signature block
tools\chocolateyInstall\helpers\functions\Get-WebHeaders.ps1
# Copyright 2011 - Present 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-Debug "Running 'Get-WebHeaders' with url:`'$url`', userAgent: `'$userAgent`'";
  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
  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)
  }

    Write-Host "Using explicit proxy server '$explicitProxy'."
    $request.Proxy = $proxy

  } elseif (!$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
    $request.Proxy = $proxy
  }

  $request.Accept = '*/*'
  $request.AllowAutoRedirect = $true
  $request.MaximumAutomaticRedirections = 20
  #$request.KeepAlive = $true
  $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
# MIIcrQYJKoZIhvcNAQcCoIIcnjCCHJoCAQExDzANBglghkgBZQMEAgEFADB5Bgor
# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
# KX7zUQIBAAIB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BCQUxDxcNMTYwNjEyMTg1MjEyWjAjBgkqhkiG9w0BCQQxFgQUchn5yJrJ
# 0CewX/KLmxn1nypvtH4wDQYJKoZIhvcNAQEBBQAEggEAemip/lIn5Ufl5kw0y6DQ
# SPpXOTv4WZHKsqIACl4htI4PecN2c2lwe3Erth/XohCp6C0AVArNURoVAP4UVMFi
# VOwff7hViSeLK6QVVFRLQksw94bU4HUqxcI9EH2dGK1IT7h0bWzMjhQLtgSGqTsp
# 43waZ4rSD2/endmVXZehfChcWFQumlivtDOFaklxLgalchvyBArm7k4drkasIkKf
# 0JWPeIdZwm0nC//vQe4CLu+4secWbwIgTuw8hgkAEbOvqEgy91jPS3tc9zizG9nr
# L75cw2AtWzpQ6V3/fvloaLgk2PH01SKO6VgJNc+YVgU82/R+yFAqKJTh+X5xn5QZ
# cA==
# SIG # End signature block
tools\chocolateyInstall\helpers\functions\Install-BinFile.ps1
# Copyright 2011 - Present 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-Debug "Running 'Install-BinFile' for $name with path:`'$path`'|`$useStart:$useStart|`$command:$command";

  $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
# MIIcrQYJKoZIhvcNAQcCoIIcnjCCHJoCAQExDzANBglghkgBZQMEAgEFADB5Bgor
# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCCVLC+FH8ski1Db
# b+Dk5YaZO97pydDo9MlcURob+NP5EqCCF7cwggUwMIIEGKADAgECAhAECRgbX9W7
# ZnVTQ7VvlVAIMA0GCSqGSIb3DQEBCwUAMGUxCzAJBgNVBAYTAlVTMRUwEwYDVQQK
# EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xJDAiBgNV
# BAMTG0RpZ2lDZXJ0IEFzc3VyZWQgSUQgUm9vdCBDQTAeFw0xMzEwMjIxMjAwMDBa
# Fw0yODEwMjIxMjAwMDBaMHIxCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2Vy
# dCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xMTAvBgNVBAMTKERpZ2lD
# ZXJ0IFNIQTIgQXNzdXJlZCBJRCBDb2RlIFNpZ25pbmcgQ0EwggEiMA0GCSqGSIb3
# DQEBAQUAA4IBDwAwggEKAoIBAQD407Mcfw4Rr2d3B9MLMUkZz9D7RZmxOttE9X/l
# qJ3bMtdx6nadBS63j/qSQ8Cl+YnUNxnXtqrwnIal2CWsDnkoOn7p0WfTxvspJ8fT
# eyOU5JEjlpB3gvmhhCNmElQzUHSxKCa7JGnCwlLyFGeKiUXULaGj6YgsIJWuHEqH
# CN8M9eJNYBi+qsSyrnAxZjNxPqxwoqvOf+l8y5Kh5TsxHM/q8grkV7tKtel05iv+
# bMt+dDk2DZDv5LVOpKnqag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BATB2MGIxCzAJBgNVBAYTAlVTMRUw
# EwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20x
# ITAfBgNVBAMTGERpZ2lDZXJ0IEFzc3VyZWQgSUQgQ0EtMQIQAwGaAjr/WLFr1tXq
# 5hfwZjAJBgUrDgMCGgUAoF0wGAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAcBgkq
# hkiG9w0BCQUxDxcNMTYwNjEyMTg1MjEzWjAjBgkqhkiG9w0BCQQxFgQUb5dp1Hvz
# 4g5exRqCHc4HekuXt98wDQYJKoZIhvcNAQEBBQAEggEAccFe3rcac7H3IfL1ccnO
# N9H2x8WUixmyiNnVnEX2XX1OD2mCAxiymTbk1Uk1bol0fhdc3IH4PzxGs7GZBK6e
# dg0A8wv6sd2Ar/VKNgyjrFKp5jGD0NopN4RExuw/19IWWxsypurYkvaB0HlP8Y1V
# PhvkWe9bmiT73m0SSpLzo1TBJWPESJgD2jhimaPgS+WqyRWteY8uFt4PiVyrnfxb
# vpfN0AE9YvUeXmlDwdLUETswEY+lUaJx/Svv5JsEF9xuwYJmrtTrnGqtUo5vRbRt
# GxTv9Wl8qOTAVNqomsvONjYTlxFLmdfqZvkjc4YScuXl5CUXzhKnthZxv796wM05
# DA==
# SIG # End signature block
tools\chocolateyInstall\helpers\functions\Install-ChocolateyDesktopLink.ps1
tools\chocolateyInstall\helpers\functions\Install-ChocolateyEnvironmentVariable.ps1
# Copyright 2011 - Present 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-Debug "Running 'Install-ChocolateyEnvironmentVariable' with variableName:`'$variableName`' and variableValue:`'$variableValue`'";

  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 {
    Set-EnvironmentVariable -Name $variableName -Value $variableValue -Scope $variableType
  }

  Set-Content env:\$variableName $variableValue
}

# SIG # Begin signature block
# MIIcrQYJKoZIhvcNAQcCoIIcnjCCHJoCAQExDzANBglghkgBZQMEAgEFADB5Bgor
# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCAa2uM7GhWIlhnc
# e36SIoaezVJ3kYafBssxZivo5HzgTKCCF7cwggUwMIIEGKADAgECAhAECRgbX9W7
# ZnVTQ7VvlVAIMA0GCSqGSIb3DQEBCwUAMGUxCzAJBgNVBAYTAlVTMRUwEwYDVQQK
# EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xJDAiBgNV
# BAMTG0RpZ2lDZXJ0IEFzc3VyZWQgSUQgUm9vdCBDQTAeFw0xMzEwMjIxMjAwMDBa
# Fw0yODEwMjIxMjAwMDBaMHIxCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2Vy
# dCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xMTAvBgNVBAMTKERpZ2lD
# ZXJ0IFNIQTIgQXNzdXJlZCBJRCBDb2RlIFNpZ25pbmcgQ0EwggEiMA0GCSqGSIb3
# DQEBAQUAA4IBDwAwggEKAoIBAQD407Mcfw4Rr2d3B9MLMUkZz9D7RZmxOttE9X/l
# qJ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s8CWdBMeZn0YHu206sLxfAiVGiKbPnD+PEfoJT8sdSYuALxS/iUF
# obpf1nIyonYs5gpFkSdI3wO40n0wzYu7ZJPdplGtJ8muGf9zpXNJZmEvcs2Er4/W
# qpg9GD3LSllBrDydsY5UgrA+IXSjPGTIBaKYiFTRXKyk+KITkRSnuhzSabS18aGC
# Ag8wggILBgkqhkiG9w0BCQYxggH8MIIB+AIBATB2MGIxCzAJBgNVBAYTAlVTMRUw
# EwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20x
# ITAfBgNVBAMTGERpZ2lDZXJ0IEFzc3VyZWQgSUQgQ0EtMQIQAwGaAjr/WLFr1tXq
# 5hfwZjAJBgUrDgMCGgUAoF0wGAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAcBgkq
# hkiG9w0BCQUxDxcNMTYwNjEyMTg1MjEzWjAjBgkqhkiG9w0BCQQxFgQUqR6sHOBv
# ewj4qecZmYofVlpUOqEwDQYJKoZIhvcNAQEBBQAEggEAdUBCIt6T5x2T3qGM2J8v
# h9nab4Q1oZeQK/WHvUbS09g+kQds07eyaWolL6rbdTBjeFNo1vQUsmQusnajT0MO
# uLy/b9rlrob3FFXCgqYIoSvfkHZl52b8fhq3u5fZDyu9l8iEnEyarlZtCf0KIkcp
# AHKhpzMfj51b5oXj1NR1Rwcc0OIVR1VoGyEncRLCsmsI16n3kPkIWD8KcgWFqd0n
# J6JUjevPF2uhhEKjvDn4Xl1j6VKfOTmFBrxICOGKyAKyaOAX87j+OedFnKBia2u3
# Op/2dmMn++lojhHGSiJ7j1xyuO0LlBvgupHE2GtMQQtvftiBGpQyDUFHhUSGrssE
# nw==
# SIG # End signature block
tools\chocolateyInstall\helpers\functions\Install-ChocolateyExplorerMenuItem.ps1
# Copyright 2011 - Present 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-Debug "Running 'Install-ChocolateyExplorerMenuItem' with menuKey:'$menuKey', menuLabel:'$menuLabel', command:'$command', type '$type'"
  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
# MIIcrQYJKoZIhvcNAQcCoIIcnjCCHJoCAQExDzANBglghkgBZQMEAgEFADB5Bgor
# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCAN6SfDSBxP/B3p
# 6OM68Gk0Lyhsar8SCwOouKJXtxVvjqCCF7cwggUwMII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AEggEAdwSVpH0Gn7aqSpzvKQ1z
# gW+/fsKNe5WU41LHlCX8p/aFuZcHzjiF+hd6TvuEd6JR2lIG/y5YfwQAPc6NSCW2
# ljAD9GAZwLErRSf0shDg0vxX+KFYfcicF787cLrzFxrviGoUusU7Egii2HN5s+pl
# tD6YPzyt6flpboWjsspKA7SngXLLIhFzTh6DUF40b1jHFvSChIy1OehXJjQbVwl7
# 2QunDBkkM9eaEQ74hJGbF9eCS1RM5vcGtrxvGXar6ZwoJcMAT0aA+lEULAnPLC3j
# pu0f96WPYNzouvVa97MzykiD2GwWRM0qtjtTCN2TkP3d9pTPy6qJ0+yImMFzHeGn
# DA==
# SIG # End signature block
tools\chocolateyInstall\helpers\functions\Install-ChocolateyFileAssociation.ps1
# Copyright 2011 - Present 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-Debug "Running 'Install-ChocolateyFileAssociation' associating $extension with `'$executable`'";
  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
# MIIcrQYJKoZIhvcNAQcCoIIcnjCCHJoCAQExDzANBglghkgBZQMEAgEFADB5Bgor
# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCA5aiBxsbtOiYd2
# cd/lev1OVXuge95qdXEGx0/tHeG49KCCF7cwggUwMIIEGKADAgECAhAECRgbX9W7
# ZnVTQ7VvlVAIMA0GCSqGSIb3DQEBCwUAMGUxCzAJBgNVBAYTAlVTMRUwEwYDVQQK
# EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xJDAiBgNV
# BAMTG0RpZ2lDZXJ0IEFzc3VyZWQgSUQgUm9vdCBDQTAeFw0xMzEwM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VrbVjNYW7808GE9Hx8F0kTaH5wfsg1X1j5nobzhc9O3+nIR6j1NvrctT
# 8wpkTX/gsVyjIjtnIyVWt2plY5ITdfUkl/k3KSDVQfzAtRPp0bLunF/A1cWWYoK0
# LQ==
# SIG # End signature block
tools\chocolateyInstall\helpers\functions\Install-ChocolateyInstallPackage.ps1
# Copyright 2011 - Present 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"`

.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
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 = '',
  [parameter(Mandatory=$true, Position=3)][string] $file,
  [parameter(Mandatory=$false)] $validExitCodes = @(0),
  [parameter(Mandatory=$false)]
  [alias("useOnlyPackageSilentArgs")][switch] $useOnlyPackageSilentArguments = $false,
  [parameter(ValueFromRemainingArguments = $true)][Object[]] $ignoredArguments
)
  Write-Debug "Running 'Install-ChocolateyInstallPackage' for $packageName with file:`'$file`', args: `'$silentArgs`', fileType: `'$fileType`', validExitCodes: `'$validExitCodes`', useOnlyPackageSilentArguments: '$($useOnlyPackageSilentArguments.IsPresent)'";
  $installMessage = "Installing $packageName..."
  Write-Host $installMessage

  if ($file -eq '' -or $file -eq $null) {
    throw 'Package parameters incorrect, File cannot be empty.'
  }

  if ($fileType -eq '' -or $fileType -eq $null) {
    Write-Debug 'No FileType supplied. Using the file extension to determine FileType'
    $fileType = [System.IO.Path]::GetExtension("$file").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'
  }

  $ignoreFile = $file + '.ignore'
  try {
    '' | out-file $ignoreFile
  } catch {
    Write-Warning "Unable to generate `'$ignoreFile`'"
  }

  $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;

  if ($fileType -like 'msi') {
    $msiArgs = "/i `"$file`""
    if ($overrideArguments) {
      $msiArgs = "$msiArgs $additionalInstallArgs";
      Write-Host "Overriding package arguments with `'$additionalInstallArgs`'";
    } else {
      $msiArgs = "$msiArgs $silentArgs $additionalInstallArgs";
    }

    $env:ChocolateyExitCode = Start-ChocolateyProcessAsAdmin "$msiArgs" "$($env:SystemRoot)\System32\msiexec.exe" -validExitCodes $validExitCodes
  }

  if ($fileType -like 'exe') {
    if ($overrideArguments) {
      $env:ChocolateyExitCode = Start-ChocolateyProcessAsAdmin "$additionalInstallArgs" $file -validExitCodes $validExitCodes
      write-host "Overriding package arguments with `'$additionalInstallArgs`'";
    } else {
      $env:ChocolateyExitCode = Start-ChocolateyProcessAsAdmin "$silentArgs $additionalInstallArgs" $file -validExitCodes $validExitCodes
    }
  }

  if($fileType -like 'msu') {

    if ($overrideArguments) {
      $msuArgs = "$file $additionalInstallArgs"
    } else {
      $msuArgs = "$file $silentArgs $additionalInstallArgs"
    }
    $env:ChocolateyExitCode = Start-ChocolateyProcessAsAdmin "$msuArgs" "$($env:SystemRoot)\System32\wusa.exe" -validExitCodes $validExitCodes
  }

  write-host "$packageName has been installed."
}

# SIG # Begin signature block
# MIIcrQYJKoZIhvcNAQcCoIIcnjCCHJoCAQExDzANBglghkgBZQMEAgEFADB5Bgor
# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCBgoAXePHBXRb9k
# 7m8gnnStqJ2IhXQITDetlCi6+sgI+aCCF7cwggUwMIIEGKADAgECAhAECRgbX9W7
# ZnVTQ7VvlVAIMA0GCSqGSIb3DQEBCwU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vuTFEunCH0xue0rVLzaHvsG3lNkE5WOLHDcJ
# 67T8mdG0prERkFSEtKOS6vfiwVE02IW29gXJnwDcg3EfBjuNni4NOX93Eg4bhGbY
# BpM021SKHr0NepvdUX4BogOSUff0krTqxHpjW4oeV1ExUb3y1g9uSMfxhZygOa2y
# b0ZuK1RwSJJoMT2oHDEuCkS1Dge/LS/w1CuMH5DmsXr15cf0Ew8ePC/s4XX4XON7
# 7qOxjQjuxLHoqYNf9nF89YKbI4HdFwlqjqB5uY6Q17WAMzpfItGQF7nCRHcdCpV8
# AA==
# SIG # End signature block
tools\chocolateyInstall\helpers\functions\Install-ChocolateyPackage.ps1
# Copyright 2011 - Present 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
OPTIONAL (Highly recommended) - 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.

.PARAMETER ChecksumType
OPTIONAL - 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.

.PARAMETER Checksum64
OPTIONAL (Highly recommended) - 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.

.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.

.PARAMETER Options
OPTIONAL - Specify custom headers. Available in 0.9.10+.

.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)"
$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  = 'sha1'
  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
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=@{}},
  [parameter(Mandatory=$false)]
  [alias("useOnlyPackageSilentArgs")][switch] $useOnlyPackageSilentArguments = $false,
  [parameter(ValueFromRemainingArguments = $true)][Object[]] $ignoredArguments
)

  Write-Debug "Running 'Install-ChocolateyPackage' for $packageName with url:`'$url`', args: `'$silentArgs`', fileType: `'$fileType`', url64bit: `'$url64bit`', checksum: `'$checksum`', checksumType: `'$checksumType`', checksum64: `'$checksum64`', checksumType64: `'$checksumType64`', validExitCodes: `'$validExitCodes`' ";

  $chocTempDir = $env:TEMP
  $tempDir = Join-Path $chocTempDir "$($env:chocolateyPackageName)"
  if ($env:chocolateyPackageVersion -ne $null) {$tempDir = Join-Path $tempDir "$($env:chocolateyPackageVersion)"; }

  if (![System.IO.Directory]::Exists($tempDir)) { [System.IO.Directory]::CreateDirectory($tempDir) | Out-Null }
  $file = Join-Path $tempDir "$($packageName)Install.$fileType"

  $filePath = Get-ChocolateyWebFile $packageName $file $url $url64bit -checksum $checksum -checksumType $checksumType -checksum64 $checksum64 -checksumType64 $checksumType64 -options $options -getOriginalFileName
  Install-ChocolateyInstallPackage $packageName $fileType $silentArgs $filePath -validExitCodes $validExitCodes -UseOnlyPackageSilentArguments:$useOnlyPackageSilentArguments
}

# SIG # Begin signature block
# MIIcrQYJKoZIhvcNAQcCoIIcnjCCHJoCAQExDzANBglghkgBZQMEAgEFADB5Bgor
# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCAje3QpMUhLNr3n
# BYmrxCkj3ifD9mrtKBHbsq2J3/flp6CCF7cwggUwMIIEGKADAgECAhAECRgbX9W7
# ZnVTQ7VvlVAIMA0GCSqGSIb3DQEBCwUAMGUxCzAJBgNVBAYTAlVTMRUwEwYDVQQK
# EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xJDAiBgNV
# BAMTG0RpZ2lDZXJ0IEFzc3VyZWQgSUQgUm9vdCBDQTAeFw0xMzEwMjIxMjAwMDBa
# Fw0yODEwMjIxMjAwMDBaMHIxCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2Vy
# dCBJbmMxGTAXBg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scbZr7L/+z439myIt3DLYR4QaN/bfi3h75CuKfi
# Xw==
# SIG # End signature block
tools\chocolateyInstall\helpers\functions\Install-ChocolateyPath.ps1
# Copyright 2011 - Present 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-Debug "Running 'Install-ChocolateyPath' with pathToInstall:`'$pathToInstall`'";
  $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
# MIIcrQYJKoZIhvcNAQcCoIIcnjCCHJoCAQExDzANBglghkgBZQMEAgEFADB5Bgor
# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCDsRUGmxc3iKx7U
# 8v2xtTO3OaeqLc7VXOhVZu+zDtEg2aCC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YJKoZIhvcNAQEBBQAEggEAiQ4G3XbTG0sBSPqyzN1r
# YwNuaAwUCnFAtuclloO4dtNfOWVXm3T62/MCM8K8zVm++xZGxbot9OxArkrxXSAW
# 6A2TCTnNvaliKWbxy5MNBqAltT08eVUKWOgstE4c5RJvCh5dYF5SVambDmbkRmad
# TfIHSSs+yEUikEJCHranHBXsiTk9kDyuMr/MzVBhO/yF9vsUx80qhiRCATcFZrpW
# YMVVoYF/l1xQGvSo7vl+pXXm7Lx85sWmr9QOQ4zEu91WHap5saSkF1tDhSOZeF0j
# 7dXYiWrdm00+qISgfe5j+PRqc0uiWHbZQYT3lBwoVVezYJOES6eW7/uTiUVlQtXh
# jg==
# SIG # End signature block
tools\chocolateyInstall\helpers\functions\Install-ChocolateyPinnedTaskBarItem.ps1
# Copyright 2011 - Present 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-Debug "Running 'Install-ChocolateyPinnedTaskBarItem' with targetFilePath:`'$targetFilePath`'";

  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
# MIIcrQYJKoZIhvcNAQcCoIIcnjCCHJoCAQExDzANBglghkgBZQMEAgEFADB5Bgor
# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCD9dglJzxU+4Y5+
# zpfzwJUYxB/gZTVpZaIpB/fkEoKo9KCCF7cwggUwMIIEGKADAgECAhAECRgbX9W7
# ZnVTQ7VvlVAIMA0GCSqGSIb3DQEBCwUAMGUxCzAJBgNVBAYTAlVTMRUwEwYDVQQK
# EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xJDAiBgNV
# BAMTG0RpZ2lDZXJ0IEFzc3VyZWQgSUQgUm9vdCBDQTAeFw0xMzEwMjIxMjAwMDBa
# Fw0yODEwMjIxMjAwMDBaMHIxCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2Vy
# dCBJbmMxGTAX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3r1N1IAvfNMU/X4hxV67LQ8T9JUiBIS+zCYV8LXyBi+YuJuhFdMKh4
# kQ==
# SIG # End signature block
tools\chocolateyInstall\helpers\functions\Install-ChocolateyPowershellCommand.ps1
# Copyright 2011 - Present 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"`

.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 Checksum
OPTIONAL (Highly recommended) - 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.

.PARAMETER ChecksumType
OPTIONAL - 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.

.PARAMETER Checksum64
OPTIONAL (Highly recommended) - 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.

.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.

.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,
  [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-Debug "Running 'Install-ChocolateyPowershellCommand' for $packageName with psFileFullPath:`'$psFileFullPath`', url: `'$url`', url64bit:`'$url64bit`', checkSum: `'$checksum`', checksumType: `'$checksumType`', checkSum64: `'$checksum64`', checksumType64: `'$checksumType64`' ";

  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
# MIIcrQYJKoZIhvcNAQcCoIIcnjCCHJoCAQExDzANBglghkgBZQMEAgEFADB5Bgor
# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCCH7BfqoVRTG2S2
# TQtcEyZtx9tnQNObWhepYpIZwXlHRKCCF7cwggUwMIIEGKADAgECAhAECRgbX9W7
# ZnVTQ7VvlVAIMA0GCSqGSIb3DQEBCwUAMGUxCzAJBgNVBAYTAlVTMRUwEwYDVQQK
# EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xJDAiBgNV
# BAMTG0RpZ2lDZXJ0IEFzc3VyZWQgSUQgUm9vdCBDQTAeFw0xMzEwMjIxMjAwMDBa
# Fw0yODEwMjIxMjAwMDBaMHIxCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2Vy
# dCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xMTAvBgNVBAMTKERpZ2lD
# ZXJ0IFNIQTIgQXNzdXJlZCBJRCBDb2RlIFNpZ25pbmcgQ0EwggEiMA0GCSqGSIb3
# DQEBAQUAA4IBDwAwggEKAoIBAQD407Mcfw4Rr2d3B9MLMUkZz9D7RZmxOttE9X/l
# qJ3bMtdx6nadBS63j/qSQ8Cl+YnUNxnXtqrwnIal2CWsDnkoOn7p0WfTxvspJ8fT
# eyOU5JEjlpB3gvmhhCNmElQzUHSxKCa7JGnCwlLyFGeKiUXULaGj6YgsIJWuHEqH
# CN8M9eJNYBi+qsSyrnAxZjNxPqxwoqvOf+l8y5Kh5TsxHM/q8grkV7tKtel05iv+
# bMt+dDk2DZDv5LVOpKnqagqrhPOsZ061xPeM0SAlI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AlVTMRUw
# EwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20x
# ITAfBgNVBAMTGERpZ2lDZXJ0IEFzc3VyZWQgSUQgQ0EtMQIQAwGaAjr/WLFr1tXq
# 5hfwZjAJBgUrDgMCGgUAoF0wGAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAcBgkq
# hkiG9w0BCQUxDxcNMTYwNjEyMTg1MjE1WjAjBgkqhkiG9w0BCQQxFgQUfJCrNafA
# 97eAKGtdsj39HdeKd50wDQYJKoZIhvcNAQEBBQAEggEAeR+ZvBaEQ5y36ObEdJeR
# cDPeu9YVUzp8LfWo1g5AUUGKCC+h9tNh3z/AoH9VTbndXOmGvIy0pe4IWlq39Oi9
# NYAhabeg20iAmHyZoRR6N88gAnbBisfuJ3V6SR4VuBzg2IovTSHyM+Ed01M4/uuZ
# cD89ckqk/zUS2Qdt6HbPSutIwbCvu5KrjacpKVku/whsWcQR5RtbmHvyhyY3QcCV
# 00UcCOqixfVqwuDLmAk6VA8xyZjPTdkbg44dg7IgqiCb/kERy65hCAYvsEgoZvVD
# H7PuihZvsQ4Xos2E8VT0mJDvXcfMrvF8Hoiy5D4S1XgfCKQSuSVvXTc5pm7JqZKI
# QQ==
# SIG # End signature block
tools\chocolateyInstall\helpers\functions\Install-ChocolateyShortcut.ps1
# Copyright 2011 - Present 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-Debug "Running 'Install-ChocolateyShortcut' with parameters ShortcutFilePath: `'$shortcutFilePath`', TargetPath: `'$targetPath`', WorkingDirectory: `'$workingDirectory`', Arguments: `'$arguments`', IconLocation: `'$iconLocation`', Description: `'$description`', WindowStyle: `'$windowStyle`', RunAsAdmin: `'$runAsAdmin`', PinToTaskbar: `'$pinToTaskbar`'";

	# 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
# MIIcrQYJKoZIhvcNAQcCoIIcnjCCHJoCAQExDzANBglghkgBZQMEAgEFADB5Bgor
# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCBC4sSffi/MyHAu
# xn9Ktsxdbbr5Xe3TtmOM9LovcpawCqCCF7cwggUwMIIEGKADAgECAhAECRgbX9W7
# ZnVTQ7VvlVAIMA0GCSqGSIb3DQEBCwUAMGUxCzAJBgNVBAYTAlVTMRUwEwYDVQQK
# EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xJDAiBgNV
# BAMTG0RpZ2lDZXJ0IEFzc3VyZWQgSUQgUm9vdCBDQTAeFw0xMzEwMjIxMjAwMDBa
# Fw0yODEwMjIxMjAwMDBaMHIxCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2Vy
# dCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xMTAvBgNVBAMTKERpZ2lD
# ZXJ0IFNIQTIgQXNzdXJlZCBJRCBDb2RlIFNpZ25pbmcgQ0EwggEiMA0GCSqGSIb3
# DQEBAQUAA4IBDwAwggEKAoIBAQD407Mcfw4Rr2d3B9MLMUkZz9D7RZmxOttE9X/l
# qJ3bMtdx6nadBS63j/qSQ8Cl+YnUNxnXtqrwnIal2CWsDnkoOn7p0WfTxvspJ8fT
# eyOU5JEjlpB3gvmhhCNmElQzUHSxKCa7JGnCwlLyFGeKiUXULaGj6YgsIJWuHEqH
# CN8M9eJNYBi+qsSyrnAxZjNxPqxwoqvOf+l8y5Kh5TsxHM/q8grkV7tKtel05iv+
# b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9w0BCQYxggH8MIIB+AIBATB2MGIxCzAJBgNVBAYTAlVTMRUw
# EwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20x
# ITAfBgNVBAMTGERpZ2lDZXJ0IEFzc3VyZWQgSUQgQ0EtMQIQAwGaAjr/WLFr1tXq
# 5hfwZjAJBgUrDgMCGgUAoF0wGAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAcBgkq
# hkiG9w0BCQUxDxcNMTYwNjEyMTg1MjE1WjAjBgkqhkiG9w0BCQQxFgQUqZQF89s4
# Bp7B+PIJUOeQObWw0WcwDQYJKoZIhvcNAQEBBQAEggEAh3D81NF4nm72JsospjNE
# Kwi5v1PpPqqzDV125eD4RBsz8YI+2sr7rQXT3CuNyZZzEDwCYnPeerYCknsyMcYC
# QeqV/xcY2RpbiFnbHpLGW+XRcQtApdWYZjRsaSbDeZBXY1d7S5+KQa29VDQmHLmg
# WMkYyYeWXUujN9DizelyTEvEe/iUqmdwV+FxfCQYpckI/zyIBDSpvWMO5VIWL81H
# SUQK2BNH3yvrknI5T2JcYdBx40iMpMkZiS+vfsKLm/tDgMl8DES90rEZAp7ifd6u
# ty9Tnd4Qs1O4AlmVai0+vHbJpa9bot2bhIyaLFkwr/7gSdMzrLIYy1+dHHnoji00
# uA==
# SIG # End signature block
tools\chocolateyInstall\helpers\functions\Install-ChocolateyVsixPackage.ps1
# Copyright 2011 - Present 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.

.PARAMETER VsixUrl
The URL of the package to be installed.

Prefer HTTPS when available. Can be HTTP, FTP, or File URIs.

.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.

.PARAMETER Checksum
OPTIONAL (Highly recommended) - 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.

.PARAMETER ChecksumType
OPTIONAL - 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.

.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
>
# 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(
  [parameter(Mandatory=$true, Position=0)][string] $packageName,
  [parameter(Mandatory=$false, Position=1)][string] $vsixUrl,
  [parameter(Mandatory=$false, Position=2)][int] $vsVersion = 0,
  [parameter(Mandatory=$false)][string] $checksum = '',
  [parameter(Mandatory=$false)][string] $checksumType = '',
  [parameter(Mandatory=$false)][hashtable] $options = @{Headers=@{}},
  [parameter(ValueFromRemainingArguments = $true)][Object[]] $ignoredArguments
)
    Write-Debug "Running 'Install-ChocolateyVsixPackage' for $packageName with vsixUrl:`'$vsixUrl`', vsVersion: `'$vsVersion`', checksum: `'$checksum`', checksumType: `'$checksumType`' ";
    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
# MIIcrQYJKoZIhvcNAQcCoIIcnjCCHJoCAQExDzANBglghkgBZQMEAgEFADB5Bgor
# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCCvpAXfLxLcwmT2
# PWW6nCMKnQbItii4jeZWuzWrBbtTO6CCF7cwggUwMIIEGKADAgECAhAECRgbX9W7
# ZnVTQ7VvlVAIMA0GCSqGSIb3DQEBCwUAMGUxCzAJBgNVBAYTAlVTMRUwEwYDVQQK
# EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xJDAiBgNV
# BAMTG0RpZ2lDZXJ0IEFzc3VyZWQgSUQgUm9vdCBDQTAeFw0xMzEwMjIxMjAwMDBa
# Fw0yODEw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PKf0p3AeuGgo1Fh+KsccEt2EvcqmXxsw2Jjs4
# Y/Pt6DYXqmTAnwSSfUNBmu91dPMHT0ErI1ycdl7gzFzGNSUGsKxYnsYXuLAuW5Sf
# 8g==
# SIG # End signature block
tools\chocolateyInstall\helpers\functions\Install-ChocolateyZipPackage.ps1
# Copyright 2011 - Present 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
OPTIONAL (Highly recommended) - 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.

.PARAMETER ChecksumType
OPTIONAL - 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.

.PARAMETER Checksum64
OPTIONAL (Highly recommended) - 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.

.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.

.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
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=@{}},
  [parameter(ValueFromRemainingArguments = $true)][Object[]] $ignoredArguments
)
  Write-Debug "Running 'Install-ChocolateyZipPackage' for $packageName with url:`'$url`', unzipLocation: `'$unzipLocation`', url64bit: `'$url64bit`', specificFolder: `'$specificFolder`', checksum: `'$checksum`', checksumType: `'$checksumType`', checksum64: `'$checksum64`', checksumType64: `'$checksumType64`' ";

  $fileType = 'zip'

  $chocTempDir = $env:TEMP
  $tempDir = Join-Path $chocTempDir "$($env:chocolateyPackageName)"
  if ($env:chocolateyPackageVersion -ne $null) {$tempDir = Join-Path $tempDir "$($env:chocolateyPackageVersion)"; }

  if (![System.IO.Directory]::Exists($tempDir)) {[System.IO.Directory]::CreateDirectory($tempDir) | Out-Null}
  $file = Join-Path $tempDir "$($packageName)Install.$fileType"

  $filePath = Get-ChocolateyWebFile $packageName $file $url $url64bit -checkSum $checkSum -checksumType $checksumType -checkSum64 $checkSum64 -checksumType64 $checksumType64 -options $options -getOriginalFileName
  Get-ChocolateyUnzip "$filePath" $unzipLocation $specificFolder $packageName
}

# SIG # Begin signature block
# MIIcrQYJKoZIhvcNAQcCoIIcnjCCHJoCAQExDzANBglghkgBZQMEAgEFADB5Bgor
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Fr1tXq
# 5hfwZjAJBgUrDgMCGgUAoF0wGAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAcBgkq
# hkiG9w0BCQUxDxcNMTYwNjEyMTg1MjE1WjAjBgkqhkiG9w0BCQQxFgQU1Dp563SF
# bJBaZMYWRiHteKVBTOkwDQYJKoZIhvcNAQEBBQAEggEAowPWCjmL58L99W/xijn4
# mH49sNlTzonX9gDfhjTpK6teWEw2fmab4AtAL1xnIxiYzNYuXw5SgDFg1aMKYYHD
# iFF/X2GUnscrOCBNXvp9E0XRnzAEtIl1PMptHXc69Anz0IwuKR4cV5ZhtLFmxoAS
# 2zXj9wjjUEyLc+Vzdt/EeiGSCLpxMkMD5XlP2F6LNSF29Q0kEpvCbcZ8k8Wuc5Ac
# HPgWB72NiP4pQ/M2yTnELzvFDNyubaJ3YEYiauu8iHB5Ixk0qt95hASmouj+Syst
# xAhxMQouCBYs9HMPG8k3TXgnyrmSUUDZ0cWco206Aywbvn0E1NzedwAZ7A/Akm45
# WA==
# SIG # End signature block
tools\chocolateyInstall\helpers\functions\Install-Vsix.ps1
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-Debug "Running 'Install-Vsix' with installer:'$installer', installFile: '$installFile'";

  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
# MIIcrQYJKoZIhvcNAQcCoIIcnjCCHJoCAQExDzANBglghkgBZQMEAgEFADB5Bgor
# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCCJTo+kHQXcC3i8
# Shy2t1pDRlvhwclQUAxllxARVHMVhKCCF7cwggUwMIIEGKADAgECAhAECRgbX9W7
# ZnVTQ7VvlVAIMA0GCSqGSIb3DQEBCwUAMGUxCzAJBgNVBAYTAlVTMRUwEwYDVQQK
# EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xJDAiBgNV
# BAMTG0RpZ2lDZXJ0IEFzc3VyZWQgSUQgUm9vdCBDQTAeFw0xMzEwMjIxMjAwMDBa
# Fw0yODEwMjIxMjAwMDBaMHIxCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2Vy
# dCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xMTAvBgNVBAMTKERpZ2lD
# ZXJ0IFNIQTIgQXNzdXJlZCBJRCBDb2RlIFNpZ25pbmcgQ0EwggEiMA0GCSqGSIb3
# DQEBAQUAA4IBDwAwggEKAoIBAQD407Mcfw4Rr2d3B9MLMUkZz9D7RZmxOttE9X/l
# qJ3bMtdx6nadBS63j/qSQ8Cl+YnUNxnXtqrwnIal2CWsDnkoOn7p0WfTxvspJ8fT
# eyOU5JEjlpB3gvmhhCNmElQzUHSxKCa7JGnCwlLyFGeKiUXULaGj6YgsIJWuHEqH
# CN8M9eJNYBi+qsSyrnAxZjNxPqxwoq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nytcbR9ihKGC
# Ag8wggILBgkqhkiG9w0BCQYxggH8MIIB+AIBATB2MGIxCzAJBgNVBAYTAlVTMRUw
# EwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20x
# ITAfBgNVBAMTGERpZ2lDZXJ0IEFzc3VyZWQgSUQgQ0EtMQIQAwGaAjr/WLFr1tXq
# 5hfwZjAJBgUrDgMCGgUAoF0wGAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAcBgkq
# hkiG9w0BCQUxDxcNMTYwNjEyMTg1MjE2WjAjBgkqhkiG9w0BCQQxFgQUSPrrfTd7
# nyMv0OZM40BuSQoZybwwDQYJKoZIhvcNAQEBBQAEggEAg8p+012mw6CKwX5cBXI2
# EVrFjMCzEohx43gJg3DAprJ48Ow5G9+yaCDKIeHGYHbaSnADCD2rq2ezC1ANBEvY
# hrqgpDhiOuPuroW/RKcca4jnwV9GAdj/bZiwR7jgELVu0KzoETi6W+HQkl34ZekC
# AQsvT5211pnmKAwyTVrOfGYi7ziTNBqE1mox0z1gerM9u9syGoAlc5NnS7oo28gT
# bvpDqYfYZ4DebiPY0BVxLw4xlVWIhGy6tx6hG5PT7XFmfUW/cGKC3E/MIE78e8dg
# AEcWvbFAcpkykwCtH90RnCiO5HTIknNF+yesnrU/i6tFPyTZqBDQx/1tia1agPWl
# bg==
# SIG # End signature block
tools\chocolateyInstall\helpers\functions\Set-EnvironmentVariable.ps1
# Copyright 2011 - Present 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-Debug "Calling Set-EnvironmentVariable with `$Name = '$Name', `$Value = '$Value', `$Scope = '$Scope'"

  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 {
    $registryType = $reg.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
# MIIcrQYJKoZIhvcNAQcCoIIcnjCCHJoCAQExDzANBglghkgBZQMEAgEFADB5Bgor
# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCDnzfFLtXQX/lp4
# lmLjZ2ktrxnDTq3btpdqZMI2vzm/WaCCF7cwggUwMIIEGKADAgECAhAECRgbX9W7
# ZnVTQ7VvlVAIMA0GCSqGSIb3DQEBCwUAMGUxCzAJBgNVBAYTAlVTMRUwEwYDVQQK
# EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5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764YWoIxIBGa8CkL2m
# QuISlB45ZvgHt0cbFKU7C9PKRIT2fmcWOcw42nkyxh6Np0RIofGnIGFpRpdgIaiV
# NA9E3JIONLF7jvu0Bjo0Q1fWdvtDLbxz1ZFzwzsyKa+HUfEEWiJ8XyfiqlLREep3
# HYvU/rneD3n2/FhjUa0D5Efi1x2B3+ulCpHkOWX2hp/zQA1OYTI8gmNw9/aRClBm
# qw==
# SIG # End signature block
tools\chocolateyInstall\helpers\functions\Set-PowerShellExitCode.ps1
# Copyright © 2011 - Present 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=$true, Position=0)][int] $exitCode,
  [parameter(ValueFromRemainingArguments = $true)][Object[]] $ignoredArguments
)

  $host.SetShouldExit($exitCode);
  $env:ChocolateyExitCode = $exitCode;
}

# SIG # Begin signature block
# MIIcrQYJKoZIhvcNAQcCoIIcnjCCHJoCAQExDzANBglghkgBZQMEAgEFADB5Bgor
# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCAlaIt0/C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BCQQxFgQUmBaer8lJ
# dlfMJAfUPMGlEL/1PIwwDQYJKoZIhvcNAQEBBQAEggEAS+I7DgS/GUKwazQ/CfLz
# 9FNV68KJokAJRaCec/k+jwJIUXo97I+440amYW26S4qErlUD6/CEdfnAQm44o6TE
# FSZ34xxP7xXOUvWOfyDaCL8QJEEdRTLT/J5JlItXgMEYEwTtMXKIcsif6ihO6jJh
# reeMc9HY4n6a2ERBzPVbC8MIOGpObaSfkkr3cv5rJ2ml3YchbrmQ8HV5oNPYZM1H
# vu8R6x6XrlSCHBTzOPeZudtunjW7B12MzUpY5H6O3RC4YPtfVaFsVruq9FRolKCt
# eykORki0YILzmkRSmz2yDSCRwoxUWwnZO6QRBXpn3RkX6I3zoPEpoKGp0wmPl/sm
# +w==
# SIG # End signature block
tools\chocolateyInstall\helpers\functions\Start-ChocolateyProcessAsAdmin.ps1
# Copyright 2011 - Present 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.

.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 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 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`'"

.LINK
Install-ChocolateyPackage

.LINK
Install-ChocolateyInstallPackage
#>
param(
  [parameter(Mandatory=$true, Position=0)][string] $statements,
  [parameter(Mandatory=$false, Position=1)][string] $exeToRun = 'powershell',
  [parameter(Mandatory=$false)][switch] $minimized,
  [parameter(Mandatory=$false)][switch] $noSleep,
  [parameter(Mandatory=$false)] $validExitCodes = @(0),
  [parameter(ValueFromRemainingArguments = $true)][Object[]] $ignoredArguments
)
  Write-Debug "Running 'Start-ChocolateyProcessAsAdmin' with exeToRun:`'$exeToRun`', statements: `'$statements`' ";

  $wrappedStatements = $statements
  if ($wrappedStatements -eq $null) { $wrappedStatements = ''}

  if ($exeToRun -eq 'powershell') {
    $exeToRun = "$($env:SystemRoot)\System32\WindowsPowerShell\v1.0\powershell.exe"
    $importChocolateyHelpers = ""
    Get-ChildItem "$helpersPath" -Filter *.psm1 | ForEach-Object { $importChocolateyHelpers = "& import-module -name  `'$($_.FullName)`';$importChocolateyHelpers" };
    $block = @"
      `$noSleep = `$$noSleep
      $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 = "-NoProfile -ExecutionPolicy bypass -EncodedCommand $encoded"
    $dbgMessage = @"
Elevating Permissions and running powershell block:
$block
This may take a while, depending on the statements.
"@
  }
  else
  {
    $dbgMessage = @"
Elevating Permissions and running [`"$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-Host "$($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"
  }
  $process.StartInfo =  $psi

  # process start info
  $process.StartInfo.RedirectStandardOutput = $true
  $process.StartInfo.RedirectStandardError = $true
  $process.StartInfo.UseShellExecute = $false
  $process.StartInfo.WorkingDirectory = Get-Location
  if ([Environment]::OSVersion.Version -ge (New-Object 'Version' 6,0)){
    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"

  $exitCode = $process.ExitCode
  $process.Dispose()

  Write-Debug "Command [`"$exeToRun`" $wrappedStatements] exited with `'$exitCode`'."
  if ($validExitCodes -notcontains $exitCode) {
    Set-PowerShellExitCode $exitCode
    throw "Running [`"$exeToRun`" $statements] was not successful. Exit code was '$exitCode'. See log for possible error messages."
  }

  Write-Debug "Finishing 'Start-ChocolateyProcessAsAdmin'"

  return $exitCode
}

# SIG # Begin signature block
# MIIcrQYJKoZIhvcNAQcCoIIcnjCCHJoCAQExDzANBglghkgBZQMEAgEFADB5Bgor
# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCAi814cGyfVTITf
# TYeIwrdRHIyVKvnDEuNdRvTaOR3dzKCCF7cwggUwMIIEGKADAgECAhAECRgbX9W7
# ZnVTQ7VvlVAIMA0GCSqGSIb3DQEBCwUAMGUxCzAJBgNVBAYTAlVTMRUwEwYDVQQK
# EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xJDAiBgNV
# BAMTG0RpZ2lDZXJ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A+Djey1aShx888P8zXsL836xraa3O81tFrv6gh8l1+sXwCn+ovJAP7E
# 3jOMKFOtDb4ypgn6/PKkhJ2bo7dPTnGtZaP/cs6eGtkjx6xbBp2Q175Qt10cwH7A
# TRhEtpwc+pSVEC5RNYNxF3z2ItM31pqyYNedhZpBrDCH39pEWwAE41uL6bmfFIgl
# cg==
# SIG # End signature block
tools\chocolateyInstall\helpers\functions\Test-ProcessAdminRights.ps1
# Copyright 2011 - Present 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
#>

  $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
# MIIcrQYJKoZIhvcNAQcCoIIcnjCCHJoCAQExDzANBglghkgBZQMEAgEFADB5Bgor
# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
# KX7zUQIBAAIBAAIBAAIBAAIBADA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MTYwNjEyMTg1MjE3WjAjBgkqhkiG9w0BCQQxFgQU5ZC6MccU
# idbB0f7xjD9cfc3SdbwwDQYJKoZIhvcNAQEBBQAEggEALaTVZsYdRvNaDxcQdd3K
# 8u19su2PMn0ymMXo9t2FkHSGKxwPceWxGjRI6KnBmkE3LE+o8mI75LUzc7OxDERm
# M20hP4y3q7hs9gk3nWX1Wit/xnQBV/OGNfANHTqIORJeMRa7G76WHZ/ybNy50dUa
# wwgZCrs42rbVES+cxQ/P1e7amw1oDUBMtOQQBfFWsept7Q9giilyQ8K4oQgq1f44
# /sZKIZf2/QvQ4WWgtz40aUuSU0XG84cRNYoDfw+1UzmbnwiikRqI+T/Q3o5M6M1s
# RTFQg4fld+74OymBPn5LGvtDhjD7qrHmuHkgTxWTmd0sF+5WTqtHnLHgOw+FQPM+
# MQ==
# SIG # End signature block
tools\chocolateyInstall\helpers\functions\Uninstall-BinFile.ps1
# Copyright 2011 - Present 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-Debug "Running 'Uninstall-BinFile' for $name with path:`'$path`'";

  $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
# MIIcrQYJKoZIhvcNAQcCoIIcnjCCHJoCAQExDzANBglghkgBZQMEAgEFADB5Bgor
# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH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sGCSqGSIb3DQEHATAcBgkq
# hkiG9w0BCQUxDxcNMTYwNjEyMTg1MjE3WjAjBgkqhkiG9w0BCQQxFgQU/ucgGXQm
# ddY7wqYqUVPMnY/3ICkwDQYJKoZIhvcNAQEBBQAEggEAQ4dNkzvoSeMrOmXbS295
# FLv/fmv+1lFLCqNMtWj7VMon0QzVW3R9imE6/7OxEI1Ni3aiG1kEjZv9coTQaieQ
# rDUJj6at89TSis/INflZXKohDwyyejucZS18/pkTpuHm7SkM9SWcprTq1kQ/FPJz
# S7o5yqJdFKgkxWIjP7jiYxGBmGeUXrJyCDp3HmkvX8FI0kPEuEfrSFE82Po+vRb3
# ZkFGIPutuYc4v5qKZ7IYaxeyK20PJKFBN8w0Zy3QUFCX+yIO5T79Y5v6bLjA3Ik+
# nn0NUkojKurSVbZ+V4F1G9VS31rizzdgWG80PM/YS8cEaMzCif8BAu8hbR2Qz2YW
# 3g==
# SIG # End signature block
tools\chocolateyInstall\helpers\functions\Uninstall-ChocolateyEnvironmentVariable.ps1
# Copyright 2011 - Present 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-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-Debug "Running 'Uninstall-ChocolateyEnvironmentVariable' with variableName:'$variableName' and variableType:'$variableType'";

  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
# MIIcrQYJKoZIhvcNAQcCoIIcnjCCHJoCAQExDzANBglghkgBZQMEAgEFADB5Bgor
# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCDAbs5J2AeI7kyx
# 9W1B/kRQ2zzY826UlHPNrSZzuupKKqCCF7cwggUwMIIEGK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ggEAeVH6jXHUBS6KvINSeaw5
# V5jBH5vfcs3BJkiaC38DFO3JfrE3ugGmzF2XworyWdTgA2jmmtSXZQ3pEohwAn++
# JUXsrVepPdRjQvOrYfqDCR/jtqPGIvgAJoerdIB9K5IovpZCC6a4nbRAlm4a3rX1
# ehgXAfMiEWPn0JQvRoRMGkGJ/MPDPHPtQZ9/rFEYbY+v+F9tAZgtjhfWq4ZVpXKz
# IGshtAAqzM0b/KaiU/qcVDCWqSp9mRq1athVTdYHgpiqv41t9A8JT88TZB08BkZe
# ovHzKzqdAemb5qmMG86TUS9PMSnfjr4IiFFD37MVTDrQM+25NASdGuRqSVjUF+iF
# eQ==
# SIG # End signature block
tools\chocolateyInstall\helpers\functions\Uninstall-ChocolateyPackage.ps1
# Copyright 2011 - Present 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.

.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
#>
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
)
  Write-Debug "Running 'Uninstall-ChocolateyPackage' for $packageName with fileType:`'$fileType`', silentArgs: `'$silentArgs`', file: `'$file`'";

  $installMessage = "Uninstalling $packageName..."
  write-host $installMessage

  $additionalInstallArgs = $env:chocolateyInstallArguments;
  if ($additionalInstallArgs -eq $null) { $additionalInstallArgs = ''; }
  $overrideArguments = $env:chocolateyInstallOverride;

  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."
  #cutStart-Sleep 3
}

# SIG # Begin signature block
# MIIcrQYJKoZIhvcNAQcCoIIcnjCCHJoCAQExDzANBglghkgBZQMEAgEFADB5Bgor
# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCA7gInBDmczdzZI
# ygiOJvqZilq/W9H0sBLiep6kf3CrL6CCF7cwggUwMIIEGKADAgECAhAECRgbX9W7
# ZnVTQ7VvlVAIMA0GCSqGSIb3DQEBCwUAMGUxCzAJBgNVBAYTAlVTMRUwEwYDVQQK
# EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xJDAiBgNV
# BAMTG0RpZ2lDZXJ0IEFzc3VyZWQgSUQgUm9vdCBDQTAeFw0xMzEwMjIxMjAwMDBa
# Fw0yODEwMjIxM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kseplmlJbbbe4K19QnueOz363OL6ArI8y1MqRuLx6lDHcJLg26jq
# UaANXb2nPK2rPUZslauorHs4uQyeO6WdO0BApoCoziNTHudpxok4h4fqzuxxhTrK
# VA==
# SIG # End signature block
tools\chocolateyInstall\helpers\functions\UnInstall-ChocolateyZipPackage.ps1
# Copyright 2011 - Present 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-Debug "Running 'UnInstall-ChocolateyZipPackage' for $packageName $zipFileName "

  $packagelibPath=$env:chocolateyPackageFolder
  $zipContentFile=(join-path $packagelibPath $zipFileName) + ".txt"
  if ((Test-Path -path $zipContentFile)) {
    $zipContentFile
    $zipContents=get-content $zipContentFile
    foreach ($fileInZip in $zipContents) {
      remove-item -Path "$fileInZip" -ErrorAction SilentlyContinue -Recurse -Force
    }
  }
}

# SIG # Begin signature block
# MIIcrQYJKoZIhvcNAQcCoIIcnjCCHJoCAQExDzANBglghkgBZQMEAgEFADB5Bgor
# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCAHkARbtmSI0u/k
# i/GpZTWlW8a7jqw+K6Cq4RULTRzFp6CCF7cwggUwMIIEGKADAgECAhAECRgbX9W7
# ZnVTQ7VvlVAIMA0GCSqGSIb3DQEBCwUAMGUxCzAJBgNVBAYTAlVTMRUwEwYDVQQK
# EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xJDAiBgNV
# BAMTG0RpZ2lDZXJ0IEFzc3VyZWQgSUQgUm9vdCBDQTAeFw0xMzEwMjIxMjAwMDBa
# Fw0yODEwMjIxMjAwMDBaMHIxCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2Vy
# dCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xMTAvBgNVBAMTKERpZ2lD
# ZXJ0IFNIQTIgQXNzdXJlZCBJRCBDb2RlIFNpZ25pbmcgQ0EwggEiMA0GCSqGSIb3
# DQEBAQUAA4IBDwAwggEKAoIBAQD407Mcfw4Rr2d3B9MLMUkZz9D7RZmxOttE9X/l
# qJ3bMtdx6nadBS63j/qSQ8Cl+YnUNxnXtqrwnIal2CWsDnkoOn7p0WfTxvspJ8fT
# eyOU5JEjlpB3gvmhhCNmElQzUHSxKCa7JGnCwlLyFGeKiUXULaGj6YgsIJWuHEqH
# CN8M9eJNYBi+qsSyrnAxZjNxPqxwoqvOf+l8y5Kh5TsxHM/q8grkV7tKtel05iv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ILBgkqhkiG9w0BCQYxggH8MIIB+AIBATB2MGIxCzAJBgNVBAYTAlVTMRUw
# EwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20x
# ITAfBgNVBAMTGERpZ2lDZXJ0IEFzc3VyZWQgSUQgQ0EtMQIQAwGaAjr/WLFr1tXq
# 5hfwZjAJBgUrDgMCGgUAoF0wGAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAcBgkq
# hkiG9w0BCQUxDxcNMTYwNjEyMTg1MjE3WjAjBgkqhkiG9w0BCQQxFgQUA+nKjp0x
# E2aCGwVXh6Tn/a+GYWwwDQYJKoZIhvcNAQEBBQAEggEAcb3xP7FgnhshkNVvL+24
# GBkyu2QikXI1JUIvqeKJ6p6hqiPFjGP8LCX6vTu6TWhey8tv6mqee79sruXocQBp
# XL32zIvBHQpsqw95cbGivLIu9LV4wRrGM9oKsXs4ZtyP01wvXx1xgC8jhBeu5BB5
# kvVEmo1AQsTDcyYRAjFd3mNppg641bmoEqN7x+7GrEcibGG1qXpMcFCM15LqhBwz
# diE4NJPxWyubSpgvtueiDAbCjNXAjD4rVTOoHgEjKkSJcZGeNe2pFf4H6ZEgc8My
# /AHoE4zLcaNUpVYPoSSHzvNQYklGOu7p0AVz9xzIoth4HALgbZNZ09iVIfjspiMn
# Xg==
# SIG # End signature block
tools\chocolateyInstall\helpers\functions\Update-SessionEnvironment.ps1
# Copyright 2011 - Present 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-Debug "Running 'Update-SessionEnvironment'"
  $refreshEnv = $false
  $invocation = $MyInvocation
  if ($invocation.InvocationName -eq 'refreshenv') {
    $refreshEnv = $true
  }

  if ($refreshEnv) {
    Write-Output "Refreshing environment variables from the registry..."
  } else {
    Write-Verbose "Refreshing environment variables from the registry."
  }

  $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

  if ($refreshEnv) {
    Write-Output "Finished"
  }
}

Set-Alias refreshenv Update-SessionEnvironment

# SIG # Begin signature block
# MIIcrQYJKoZIhvcNAQcCoIIcnjCCHJoCAQExDzANBglghkgBZQMEAgEFADB5Bgor
# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCAd3Wfxp++xoX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xFgQU35HB1mnK
# LiGAvKpJAlHcjMuQ2lswDQYJKoZIhvcNAQEBBQAEggEABbksMXz0WUCCF/aHetNY
# IjHp0SoI+nXObyKUcDXECmfBlYPkGoq8o5S3gN/AwOTkb0uH8dVmmm9tbOJQDGcK
# F4NnRedXNMzIxYjVeFKsFcoTn34je5rNXGC0OGcpf1G4Jsk/igR+h16iWA5P1+S2
# P1pQW6UfelBDy61+37DVs/Y6LhuyEUp3OH3/oGqP9bKL/NEyDy1nEVu8LsaG0Rv3
# ZA9ZmjbscKElVqSKpchOp2SKn/ilv9uLQfjzluzbyBb4AHI5Tj5cz1DhwdQ3kGZL
# dORbvRe7dt6gUuH+H0EgoCvF+CjBcyuCLxKGd5QQ3FbQkAc+SdXGQ73HGTLzrQCl
# vw==
# SIG # End signature block
tools\chocolateyInstall\helpers\functions\Write-ChocolateyFailure.ps1
# Copyright 2011 - Present 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-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
# MIIcrQYJKoZIhvcNAQcCoIIcnjCCHJoCAQExDzANBglghkgBZQMEAgEFADB5Bgor
# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCDY0ex0CrYE/lmc
# XIP4d9OY4qSzk4EYE7LV2gEjOWOdU6CCF7cwggUwMIIEGKADAgECAhAECRgbX9W7
# ZnVTQ7VvlVAIMA0GCSqGSIb3DQEBCwUAMGUxCzAJBgNVBAYTAlVTMRUwEwYDVQQK
# EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xJDAiBgNV
# BAMTG0RpZ2lDZXJ0IEFzc3VyZWQgSUQgUm9vdCBDQTAeFw0xMzEwMjIxMjAwMDBa
# Fw0yODEwMjIxMjAwMDBaMHIxCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2Vy
# dCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xMTAvBgNVBAMTKERpZ2lD
# ZXJ0IFNIQTIgQXNzdXJlZCBJRCBDb2RlIFNpZ25pbmcgQ0EwggEiMA0GCSqGSIb3
# DQEBAQUAA4IBDwAwggEKAoIBAQD407Mcfw4Rr2d3B9MLMUkZz9D7RZmxOttE9X/l
# qJ3bMtdx6nadBS63j/qSQ8Cl+YnUNxnXtqrwnIal2CWsDnkoOn7p0WfTxvspJ8fT
# eyOU5JEjlpB3gvmhhCNmElQzUHSxKCa7JGnCwlLyFGeKiUXULaGj6YgsIJWuHEqH
# CN8M9eJNYBi+qsSyrnAxZjNxPqxwoqvOf+l8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eFbOss0gvi97KGC
# Ag8wggILBgkqhkiG9w0BCQYxggH8MIIB+AIBATB2MGIxCzAJBgNVBAYTAlVTMRUw
# EwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20x
# ITAfBgNVBAMTGERpZ2lDZXJ0IEFzc3VyZWQgSUQgQ0EtMQIQAwGaAjr/WLFr1tXq
# 5hfwZjAJBgUrDgMCGgUAoF0wGAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAcBgkq
# hkiG9w0BCQUxDxcNMTYwNjEyMTg1MjE4WjAjBgkqhkiG9w0BCQQxFgQUGWDKzX2Y
# +b6jPZs0pQzMDVuV+TwwDQYJKoZIhvcNAQEBBQAEggEAdglUUCO0cHqtsi73bnWx
# itrYBmruXPYCllWyzcgqTeFADWxP2J2aarDQCt6F8XUcSui7Q/IRnyHW+WWxd8VW
# Zj6M8jjqMxBrkm9BV2S7cZUi4hw1biDg03E7dBIE4wG1Iypj06JKjhOR2Eng4P8G
# hv4619+vv9C09X9MDm4mFNF7VAlLoPWs8prF1eR8+/61ij0sC64WjwhneUPh+IFa
# McBj7cNt30iMdoW2Un2DHooDGSaTr3ZhEw6YMMFxNOtJIy6JQEBXjfBgK3qtB1Xa
# ASA2pi26o2jgW6mYE9pHhub4MnWjX+KjZfrkAmkcJmwRzZSAvLN8QZz/zZABbf9o
# DA==
# SIG # End signature block
tools\chocolateyInstall\helpers\functions\Write-ChocolateySuccess.ps1
# Copyright 2011 - Present 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-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
# MIIcrQYJKoZIhvcNAQcCoIIcnjCCHJoCAQExDzANBglghkgBZQMEAgEFADB5Bgor
# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCAFYZ3tC1+reht5
# XKsfX5pmexw5BKgzeFtRhxsFHuSN+KCCF7cwggUwMIIEGKADAgECAhAECRgbX9W7
# ZnVTQ7VvlVAIMA0GCSqGSIb3DQEBCwUAMGUxCzAJBgNVBAYTAlVTMRUwEwYDVQQK
# EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xJDAiBgNV
# BAMTG0RpZ2lDZXJ0IEFzc3VyZWQgSUQgUm9vdCBDQTAeFw0xMzEwMjIxMjAwMDBa
# Fw0yODEwMjIxMjAwMDBaMHIxCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2Vy
# dCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xMTAvBgNVBAMTKERpZ2lD
# ZXJ0IFNIQTIgQXNzdXJlZCBJRCBDb2RlIFNpZ25pbmcgQ0EwggEiMA0GCSqG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vXOBOgDhBLpNR0SG9ksD25ms+2mt5N3EgTalFBoSMg2pf/p1Q5qy2HA6PB+UiBE+
# uyWoHMKkoFWUqrysfIm7Td/PAPI/MN7qOIOoHh13diLemJaQifqwGfP+48IDHRSl
# xUZ0XUwVSfhXqrOLtL8Jc+lBsoEqx0kqO15r6dpsZsETCWSGXfOdeouCHKNPnStP
# PTwgv5p0na9GfxoPCkt8iDJnIRIR4sAleZ0KoFPn8vL4ua+0DW6xxTgzESDZ6KGC
# Ag8wggILBgkqhkiG9w0BCQYxggH8MIIB+AIBATB2MGIxCzAJBgNVBAYTAlVTMRUw
# EwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20x
# ITAfBgNVBAMTGERpZ2lDZXJ0IEFzc3VyZWQgSUQgQ0EtMQIQAwGaAjr/WLFr1tXq
# 5hfwZjAJBgUrDgMCGgUAoF0wGAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAcBgkq
# hkiG9w0BCQUxDxcNMTYwNjEyMTg1MjE4WjAjBgkqhkiG9w0BCQQxFgQUnHbgyWlj
# svSYnwbFigs1it6HphIwDQYJKoZIhvcNAQEBBQAEggEAV8nZDvBs5mN3PqSgpAPe
# 0qXJelQOTz1pF78+3mrJ8HYzQ2DIgAV48fNtmJoBBZVfQjMV+hJzh4g6nhcwQQi3
# GqEfMC8HqekzZkKPbqjA5UcOj2iVSAobbv0lahfuaGQAys2k1h+vUJ8D+CybRV4a
# 0Y1G3WR1O+07BytQAIa0/QktdQ3fWZLy3VtTsKmbF+Xx1ji7M3mZGZ4k4iCEEJCS
# DeNtXHlTBu/yHz9g0uMaQ7oINmenQoq2DhlXTJSCSxKEmlxh10n3bYPMBLEaURIR
# 3ceIZz6y77Y+H8IdNeqBHauwyGMZElYYoCtdncKStY1enfiNDN95qkAZte7uj1qI
# Lg==
# SIG # End signature block
tools\chocolateyInstall\helpers\functions\Write-FileUpdateLog.ps1
# Copyright 2011 - Present 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-Debug "Running 'Write-FileUpdateLog' with logFilePath:`'$logFilePath`'', locationToMonitor:$locationToMonitor, Operation: `'$scriptToRun`'";

  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
# MIIcrQYJKoZIhvcNAQcCoIIcnjCCHJoCAQExDzANBglghkgBZQMEAgEFADB5Bgor
# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCA8o6NffeipoOhy
# Ho7JQkT/caQVAqTmqJJVdsI1IvlzDKCCF7cwggUwMIIEGKADAgECAhAECRgbX9W7
# ZnVTQ7VvlVAIMA0GCSqGSIb3DQEBCwUAMGUxCzAJBgNVBAYTAlVTMRUwEwYDVQQK
# EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xJDAiBgNV
# BAMTG0RpZ2lDZXJ0IEFzc3VyZWQgSUQgUm9vdCBDQTAeFw0xMzEwMjIxMjAwMDBa
# Fw0yODEwMjIxMjAwMDBaMHIxCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2Vy
# dCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xMTAvBgNVBAMTKERpZ2lD
# ZXJ0IFNIQTIgQXNzdXJlZCBJRCBDb2RlIFNpZ25pbmcgQ0EwggEiMA0GCSqGSIb3
# DQEBAQUAA4IBDwAwggEKAoIBAQD407Mcfw4Rr2d3B9MLMUkZz9D7RZmxOttE9X/l
# qJ3bMtdx6nadBS63j/qSQ8Cl+YnUNxnXtqrwnIal2CWsDnkoOn7p0WfTxvspJ8fT
# eyOU5JEjlpB3gvmhhCNmElQzUHSxKCa7JG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7qMAflYDoJYXiGFT
# OQtaDWM6oPiNcr8k6oHA9itfNvOkUwJGa5/ekwF9AbyIoAZ4yOEazEMeWu/14qGC
# Ag8wggILBgkqhkiG9w0BCQYxggH8MIIB+AIBATB2MGIxCzAJBgNVBAYTAlVTMRUw
# EwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20x
# ITAfBgNVBAMTGERpZ2lDZXJ0IEFzc3VyZWQgSUQgQ0EtMQIQAwGaAjr/WLFr1tXq
# 5hfwZjAJBgUrDgMCGgUAoF0wGAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAcBgkq
# hkiG9w0BCQUxDxcNMTYwNjEyMTg1MjE4WjAjBgkqhkiG9w0BCQQxFgQUaa5S1Vko
# H92SVYlJFd74hUCDzREwDQYJKoZIhvcNAQEBBQAEggEAi1csZUKpSae4Wd9v8iuP
# I6kJkPegS0+M16pEcSTCmOCK9EsNonLv+FNJ1RxUqPOCdznwpcgdyGC3gcMaBRJL
# E/VhKIyQZw91RlGkuQKCq2Q3KAMvvbQ5GEw4pS1sB71lQIrhN8yDUbuTxQwSUnSW
# H41yabFJH4DzRdfO9VJmd2LScAY6QjQuEooO2VoukQtxu/749SK73f6zWgSIgy8D
# zzlokkjC5b5UVG+gfRMvwt7w3NdvbcsjyMBjtpQQfVvIfAl438T4dKRj6LUqTykp
# Df46ybH3bFkPum+zVUoJYWQEXg/0uXToqoyP0mR0wipoijaOEKD7qPT3AWaWCiiw
# Bg==
# SIG # End signature block
tools\chocolateyInstall\LICENSE.txt
   Copyright 2011 - Present 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
md5: BA1F8A8FF03417D077EA5E1712920BBE | sha1: 467722B64CE29E65451B946264BFA4D540EA8B65 | sha256: 177E04B6B1C10F08B346C9B1B7A731F45318B97616F30F4D1E9A539346F460DC | sha512: BE80097B823981FC2388D5B810B27B03E456A8966CFD3D879EF531135B5FF9FBCB2663CBD4BEAFB949582C47943D9D54384A14C6F79B738A1BC901355138C7F6
tools\chocolateyInstall\redirects\choco.exe.ignore
 
tools\chocolateyInstall\redirects\chocolatey.exe
md5: 8A920674698B3FA92625A6B82C2236CD | sha1: 76962A70CBC073F50919BEAEE309E18C7E1B9E49 | sha256: BA40EBBFAA192F242FDA5E24AAFAF42429AEB0516AD071995C91A665647C903E | sha512: FB18A4654814CB2BE4B35AA52802BDB502BCAF03BDE26E4703791FC82AB27D7FF52AB2D1DB6AC2BDCE130C0862CD2DD869DD9F9F80CDA845A157120DA5DA1453
tools\chocolateyInstall\redirects\chocolatey.exe.ignore
 
tools\chocolateyInstall\redirects\cinst.exe
md5: A1F89476E65B2A1E11896EA25645D29C | sha1: 5AEF21C3F74B21AA56C3EF441A816523CEB51CE2 | sha256: 4F45DBB647098A574CAF189962F9FBB4D67491B7BEDA50E3AA679AB1733F0134 | sha512: 62DF223061BDD3C39054B19A651B83027F7541E6F59C14CC116ECC612BA0E7CD45A72B555FF3B8690B278DE3E069851F512156E920D5DA1257304E0034BA3A2B
tools\chocolateyInstall\redirects\cinst.exe.ignore
 
tools\chocolateyInstall\redirects\clist.exe
md5: E4688ECA7FD2F0B8EA04BC7EF460D86E | sha1: 218E0DB0DB5416CD9EC7EFCD52F26BB7AAD5E6CB | sha256: FD0326B18A82CDD26CBB8CCCDCFCC6349396FDD8A3FAABAE2FC0D7BDF595DD93 | sha512: 911A81FE7690495C56466578A6152712794F8D989EC8EECA0B34C61915256305437CA88B835D17CC855EE7ADB5B9077EE508330E4D913DA3649177EE37AE7AA9
tools\chocolateyInstall\redirects\clist.exe.ignore
 
tools\chocolateyInstall\redirects\cpack.exe
md5: 05A5D1B330A232CB49529ECC27AE5FA5 | sha1: C5EA0D45E65226D31AE6B429718D7158FCE9BAAE | sha256: 204569B1B16C0C28B7FAC835F5308260462D82911597E99D012B6E2249B0873F | sha512: 98D8F0A60BC1C09B4E0EA596CC60C65CC9563C3940B9C8C93CE90DB70F7E4F9C7943715311095E61199393F76DE00E8DFCC7FB6516BE87C6A396FDC689381DBB
tools\chocolateyInstall\redirects\cpack.exe.ignore
 
tools\chocolateyInstall\redirects\cpush.exe
md5: 686592562E9D19DD33CDEDF5996CDC56 | sha1: C559C731C3A58602042C4C417CA49A6A258D0EDE | sha256: 2CF05E97BCDEFE78D46F6DD265BAD448C96E7053FDC1FA638ABACDB33757F6D1 | sha512: FB96E03F7046127CDE251D5A35358440473A26A38A63BC5F2AD5A1356AE077F9DA83EC90B63A64A436931689FDF56CF0A56830F4E6315E4C174A9E02A89164B9
tools\chocolateyInstall\redirects\cpush.exe.ignore
 
tools\chocolateyInstall\redirects\cuninst.exe
md5: E90BD82705CDC0AA393B98136A33C111 | sha1: 0735934B6CEED5F1BE1ADA80E5C02DCFB116D4C8 | sha256: B39F7B83FB66460DBBEC6C9C8EEC95416C969AFEF1A5BCB14582B78ED9808AEE | sha512: F8CB29E9B06F0E2819422198981403ED4E095C2F66976332340121C8E1FFA53AB6A216DB1790A05987765CAD6C8FD0AADF41A7EC9F034F7FE034EDD6C5FB25B7
tools\chocolateyInstall\redirects\cuninst.exe.ignore
 
tools\chocolateyInstall\redirects\cup.exe
md5: 89B734174CE1952C448AD39DE4DE3AF9 | sha1: C3BECCF8DF088F89CAE68F309D38A7BAD09EC62C | sha256: C1514EEE8178D73024B3CA25556D2815E3AE2703E4562A07817C12CB5E7873E2 | sha512: 20371FED226911B2EE95C3277EC6773E1DA2BF1E6D18FCD1C73BCF27B25E34D5EA4D1B4AC1AB1F5BE7E88BA67FE442C1FAC530BCD4ADDAF98945A9A284FDBA62
tools\chocolateyInstall\redirects\cup.exe.ignore
 
tools\chocolateyInstall\redirects\cver.exe
md5: B5661C37B22BDA8317CF6E7FC4327D10 | sha1: 1CF2C9BBF25EA9FA58A9EF520F8AE52A0E344037 | sha256: 4C0A3F3239424D9334D57731D883DA1CCAD323DE7E1A08BF355466CD16EFF85A | sha512: 56A5964A5B25D400E76B2C81A212C6B00D919562ECD172D480251D45D09DDA1696A3EA95C26FFD92DEB761384E93E4A1FE8C2914454BF68E1FA131DE531FE871
tools\chocolateyInstall\redirects\cver.exe.ignore
 
tools\chocolateyInstall\redirects\RefreshEnv.cmd
@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 | set /p dummy="Reading environment variables from registry. 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
    echo/@echo 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

    :: Set these variables
    call "%TEMP%\_env.cmd"

    echo | set /p dummy="Done"
    echo .
tools\chocolateyInstall\tools\7za.exe
md5: 42BADC1D2F03A8B1E4875740D3D49336 | sha1: CEE178DA1FB05F99AF7A3547093122893BD1EB46 | sha256: C136B1467D669A725478A6110EBAAAB3CB88A3D389DFA688E06173C066B76FCF | sha512: 6BC519A7368EE6BD8C8F69F2D634DD18799B4CA31FBC284D2580BA625F3A88B6A52D2BC17BEA0E75E63CA11C10356C47EE00C2C500294ABCB5141424FC5DC71C
tools\chocolateyInstall\tools\7za.exe.ignore
 
tools\chocolateyInstall\tools\7za.exe.manifest
 
tools\chocolateyInstall\tools\7zip.license.txt
      7-Zip Extra
      ~~~~~~~~~~~
      License for use and distribution
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

      Copyright (C) 1999-2015 Igor Pavlov.

      7-Zip Extra files are under the GNU LGPL license.

      
      Notes: 
        You can use 7-Zip Extra 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/
tools\chocolateyInstall\tools\checksum.exe
md5: B4A458E3A39BC981FA4CA5C0AA294840 | sha1: AC339979C3B1B2ACBE2915CDA2015846039D5C1F | sha256: EB62FE976149F5A33A87D38CBD86589F9D4E5399DC75C8C8A84A9A3BCD1E6959 | sha512: 7AAB88D96E7BBE3EAD6A4E367C1289BE302A0E4B07B6F21A76C224522CCA1FAB8FAEC6AE3FCFBB38A1D1B9B97723631DA519C5BEF65E0748FDE52CDA8BF12EA9
tools\chocolateyInstall\tools\checksum.exe.config
<?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
CheckSum is licensed as Apache v2 - https://raw.github.com/ferventcoder/checksum/master/LICENSE
tools\chocolateyInstall\tools\detector.zip
md5: 2D607C9E6AAC0334ECA99A2FF02C179A | sha1: 8F744E72E0E7F25A7B4CB155AE82A98DD56C578E | sha256: 907F5FED113A746BFECBECF861F226927376EC457B88F16C2E56B99C8594EA19 | sha512: 28A38549BD56B3D50DC683420C54F658E8BC790563809B4F9E7712CE650367A457EA16B7A9300C1BBDD366A771D7A55F221547FC48390D86056F2985A2C0E9B6
tools\chocolateyInstall\tools\shimgen.exe
md5: A1010AD6DCB2BCBC7E91F4DC8563E759 | sha1: ABB335F43053D2970ABFD3CA15CBCC8CC4B5FE4A | sha256: A69B9354D8ED1B957E366F89BB2050A4FF9B44CD5014BCB99AC11EA051112A9D | sha512: ADBCF3D402AD6276C74530045D5BCB368C829F489276E0B82505D2183BA7DABA00DC271183CC954C2BD05CD1F67D1675721172BD386338D1C9619F4C9D45CD22
tools\chocolateyInstall\tools\shimgen.exe.ignore
 
tools\chocolateyInstall\tools\shimgen.license.txt
Shim Generator - shimgen.exe
Copyright (C) 2013-Present 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.  If you would like to distribute this software, 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 you 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), you agree to be bound by the terms of this EULA. If you do 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 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 Developer End User and each Build Machine Running the SOFTWARE PRODUCT(S) within your organization from RDS or its authorized resellers. Both Virtual and Physical Build 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
tools\chocolateysetup.psm1
$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-UserPermissions $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

@"
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 Ensure-UserPermissions {
param(
  [string]$folder
)
  Write-Debug "Ensure-UserPermissions"

  if (!(Test-ProcessAdminRights)) {
    Write-ChocolateyWarning "User is not running elevated, cannot set user permissions."
    return
  }

  $currentEA = $ErrorActionPreference
  $ErrorActionPreference = 'Stop'
  try {
    # get current user
    $currentUser = [Security.Principal.WindowsIdentity]::GetCurrent()
    # get current acl
    $acl = Get-Acl $folder

    # define rule to set
    $rights = "Modify"
    $userAccessRule = New-Object System.Security.AccessControl.FileSystemAccessRule($currentUser.Name, $rights, "Allow")

    # this is idempotent
    Write-Output "Adding Modify permission for current user to '$folder'"
    $acl.SetAccessRuleProtection($false,$true)
    $acl.SetAccessRule($userAccessRule)
    Set-Acl $folder $acl
  } catch {
    Write-ChocolateyWarning "Not able to set permissions for user."
  }
  $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"
    $profileDirectory = (Split-Path -Parent $profileFile)

    if (!(Test-Path($profileDirectory))) {
      Write-Debug "Creating '$profileDirectory'"
      New-Item "$profileDirectory" -Type Directory -Force -ErrorAction SilentlyContinue | Out-Null
    }

    if (!(Test-Path($profileFile))) {
      Write-Debug "Creating '$profileFile'"
      "" | Out-File $profileFile -Encoding UTF8

    }

    $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 = 'http://download.microsoft.com/download/5/6/2/562A10F9-C9F4-4313-A044-9C94E0A8FAC8/dotNetFx40_Client_x86_x64.exe'
  $NetFx4FullUrl = 'http://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
# MIIcrQYJKoZIhvcNAQcCoIIcnjCCHJoCAQExDzANBglghkgBZQMEAgEFADB5Bgor
# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCDKYWZiAxeBE023
# rz0qaKCRtqcclssOCYNeRdPUax+sGaCCF7cwggUwMIIEGKADAgECAhAECRgbX9W7
# ZnVTQ7VvlVAIMA0GCSqGSIb3DQEBCwUAMGUxCzAJBgNVBAYTAlVTMRUwEwYDVQQK
# EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsT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Lhbzvfar5CGzujkDZ7hoO08tfhNpYEDB
# y5EyI636z9z4NApWITtJhK5+q8+H8u534fkj+JkpXPm/4grt+PZWYC2/O2EUBGa1
# cQMODHFMpBXQQHQtqAidoj5vcClQ8Twu6E1YFPgOrSh4Cj1VoCOGtb0wxm1me3Y2
# VFOImcHqJcNFqDorVePX0RziDaB7nL5CFxyUi3rkVjtpbXGp2HDKylG/R45M/o8f
# xA==
# SIG # End signature block
tools\init.ps1
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 Initiliaze-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

Log in or click on link to see number of positives.

In cases where actual malware is found, the packages are subject to removal. Software sometimes has false positives. Moderators do not necessarily validate the safety of the underlying software, only that a package retrieves software from the official distribution point and/or validate embedded software against official distribution point (where distribution rights allow redistribution).

Chocolatey Pro provides runtime protection from possible malware.

Version Downloads Last Updated Status
Chocolatey 2.3.0 8889113 Wednesday, June 5, 2024 Approved
Chocolatey 2.2.2 25326526 Tuesday, August 8, 2023 Approved
Chocolatey 2.2.0 3347075 Wednesday, July 26, 2023 Exempted
Chocolatey 2.1.0 6328446 Thursday, June 29, 2023 Exempted
Chocolatey 2.1.0-alpha-20230614 2195 Wednesday, June 14, 2023 Exempted
Chocolatey 2.1.0-alpha-20230608 994 Thursday, June 8, 2023 Exempted
Chocolatey 2.0.0 9675301 Wednesday, May 31, 2023 Exempted
Chocolatey 2.0.0-beta-20230426 4116 Wednesday, April 26, 2023 Exempted
Chocolatey 2.0.0-beta-20230412 1750 Wednesday, April 12, 2023 Exempted
Chocolatey 2.0.0-beta-20230321 2043 Tuesday, March 21, 2023 Exempted
Chocolatey 2.0.0-alpha-20230307 1328 Tuesday, March 7, 2023 Exempted
Chocolatey 2.0.0-alpha-20230221 1155 Tuesday, February 21, 2023 Exempted
Chocolatey 2.0.0-alpha-20230124 1183 Tuesday, January 24, 2023 Exempted
Chocolatey 1.4.0 2789376 Wednesday, May 10, 2023 Exempted
Chocolatey 1.3.1 5214463 Tuesday, March 14, 2023 Exempted
Chocolatey 1.3.0 3246281 Wednesday, February 15, 2023 Exempted
Chocolatey 1.2.1 6479161 Tuesday, December 6, 2022 Approved
Chocolatey 1.2.0 1723545 Wednesday, October 19, 2022 Approved
Chocolatey 1.1.0 8370479 Wednesday, March 30, 2022 Exempted
Chocolatey 1.0.1 1055705 Thursday, March 24, 2022 Exempted
Chocolatey 1.0.0 872772 Monday, March 21, 2022 Exempted
Chocolatey 0.12.1 4191214 Tuesday, January 25, 2022 Exempted
Chocolatey 0.12.0 1089165 Tuesday, January 18, 2022 Exempted
Chocolatey 0.11.3 5643810 Wednesday, October 27, 2021 Exempted
Chocolatey 0.11.2 6979550 Thursday, September 23, 2021 Exempted
Chocolatey 0.11.1 3908011 Thursday, September 2, 2021 Exempted
Chocolatey 0.10.16-beta-20200806 15139 Thursday, August 6, 2020 Approved
Chocolatey 0.10.15 71775088 Monday, June 3, 2019 Approved
Chocolatey 0.10.15-beta-20190531 1228 Friday, May 31, 2019 Approved
Chocolatey 0.10.14 510574 Thursday, May 30, 2019 Approved
Chocolatey 0.10.14-beta-20190418 5619 Thursday, April 18, 2019 Approved
Chocolatey 0.10.14-beta-20190402 3077 Tuesday, April 2, 2019 Approved
Chocolatey 0.10.14-beta-20190321 2606 Friday, March 22, 2019 Approved
Chocolatey 0.10.13 7774018 Friday, March 15, 2019 Approved
Chocolatey 0.10.12 152517 Friday, March 15, 2019 Approved
Chocolatey 0.10.12-beta-20181011 15390 Friday, October 12, 2018 Approved
Chocolatey 0.10.12-beta-20181009 935 Tuesday, October 9, 2018 Approved
Chocolatey 0.10.11 29155716 Friday, May 4, 2018 Approved
Chocolatey 0.10.10 2954432 Thursday, April 12, 2018 Approved
Chocolatey 0.10.9 5427014 Sunday, March 25, 2018 Approved
Chocolatey 0.10.9-beta-20180223 3790 Friday, February 23, 2018 Approved
Chocolatey 0.10.8 24666980 Wednesday, August 30, 2017 Approved
Chocolatey 0.10.8-beta-20170806 5285 Monday, August 7, 2017 Approved
Chocolatey 0.10.7 18322134 Thursday, June 8, 2017 Approved
Chocolatey 0.10.6.1 847879 Saturday, June 3, 2017 Approved
Chocolatey 0.10.6 413351 Thursday, June 1, 2017 Approved
Chocolatey 0.10.6-beta-20170531 1054 Thursday, June 1, 2017 Approved
Chocolatey 0.10.6-beta-20170503 8275 Wednesday, May 3, 2017 Approved
Chocolatey 0.10.5 18050501 Thursday, March 30, 2017 Approved
Chocolatey 0.10.4 174324 Thursday, March 30, 2017 Approved
Chocolatey 0.10.4-beta1-20170326 936 Sunday, March 26, 2017 Approved
Chocolatey 0.10.4-beta1-20170323 788 Thursday, March 23, 2017 Approved
Chocolatey 0.10.3 25541805 Friday, October 7, 2016 Approved
Chocolatey 0.10.2 686079 Friday, September 30, 2016 Approved
Chocolatey 0.10.1 2005652 Monday, September 19, 2016 Approved
Chocolatey 0.10.0 3815925 Thursday, August 11, 2016 Approved
Chocolatey 0.9.10.3 1920551 Thursday, June 23, 2016 Approved
Chocolatey 0.9.10.2 3034 Sunday, June 19, 2016 Approved
Chocolatey 0.9.10.1 962 Saturday, June 18, 2016 Approved
Chocolatey 0.9.10 2401 Friday, June 17, 2016 Approved
Chocolatey 0.9.10-rc1 713 Monday, June 13, 2016 Approved
Chocolatey 0.9.10-beta-20160612 688 Sunday, June 12, 2016 Approved
Chocolatey 0.9.10-beta-20160531 675 Tuesday, May 31, 2016 Approved
Chocolatey 0.9.10-beta-20160528 637 Saturday, May 28, 2016 Approved
Chocolatey 0.9.10-beta-20160527 715 Friday, May 27, 2016 Approved
Chocolatey 0.9.10-beta-20160524 685 Wednesday, May 25, 2016 Approved
Chocolatey 0.9.10-beta-20160509 789 Monday, May 9, 2016 Approved
Chocolatey 0.9.10-beta-20160506 687 Friday, May 6, 2016 Approved
Chocolatey 0.9.10-beta-20160505 639 Thursday, May 5, 2016 Approved
Chocolatey 0.9.10-beta-20160503 673 Tuesday, May 3, 2016 Approved
Chocolatey 0.9.10-beta-20160422 1049 Friday, April 22, 2016 Approved
Chocolatey 0.9.10-beta-20160411 1206 Monday, April 11, 2016 Approved
Chocolatey 0.9.10-beta-20160402 1118 Saturday, April 2, 2016 Approved
Chocolatey 0.9.10-beta-20160330 690 Thursday, March 31, 2016 Exempted
Chocolatey 0.9.10-beta-20160328 820 Tuesday, March 29, 2016 Approved
Chocolatey 0.9.10-beta-20160325 845 Friday, March 25, 2016 Approved
Chocolatey 0.9.10-beta-20160323 890 Wednesday, March 23, 2016 Approved
Chocolatey 0.9.10-beta-20160322 651 Wednesday, March 23, 2016 Approved
Chocolatey 0.9.10-beta-20160320 860 Sunday, March 20, 2016 Approved
Chocolatey 0.9.10-beta-20160318 749 Friday, March 18, 2016 Approved
Chocolatey 0.9.10-beta-20160314 890 Monday, March 14, 2016 Approved
Chocolatey 0.9.10-beta-20160311 836 Friday, March 11, 2016 Approved
Chocolatey 0.9.10-beta-20160302 1029 Wednesday, March 2, 2016 Approved
Chocolatey 0.9.10-beta-20160215 1175 Monday, February 15, 2016 Approved
Chocolatey 0.9.10-beta-20160212 975 Friday, February 12, 2016 Approved
Chocolatey 0.9.10-beta-20160205 1079 Friday, February 5, 2016 Approved
Chocolatey 0.9.9.12 387279 Friday, March 18, 2016 Approved
Chocolatey 0.9.9.11 8574137 Tuesday, October 6, 2015 Approved
Chocolatey 0.9.9.10 382233 Saturday, October 3, 2015 Approved
Chocolatey 0.9.9.9 1252750 Friday, October 2, 2015 Approved
Chocolatey 0.9.9.8 5627977 Saturday, June 27, 2015 Approved
Chocolatey 0.9.9.7 194953 Saturday, June 20, 2015 Approved
Chocolatey 0.9.9.6 831227 Sunday, May 17, 2015 Approved
Chocolatey 0.9.9.5 546997 Monday, April 20, 2015 Approved
Chocolatey 0.9.9.4 515987 Monday, March 30, 2015 Approved
Chocolatey 0.9.9.3 3579 Sunday, March 29, 2015 Approved
Chocolatey 0.9.9.2 25833 Saturday, March 7, 2015 Approved
Chocolatey 0.9.9.1 8555 Tuesday, March 3, 2015 Approved
Chocolatey 0.9.9 14643 Tuesday, March 3, 2015 Approved
Chocolatey 0.9.9-rc9 877 Saturday, February 28, 2015 Approved
Chocolatey 0.9.9-rc8 927 Tuesday, February 24, 2015 Approved
Chocolatey 0.9.9-rc5 1112 Monday, February 9, 2015 Approved
Chocolatey 0.9.9-rc4 787 Sunday, February 8, 2015 Approved
Chocolatey 0.9.9-rc3 763 Saturday, February 7, 2015 Approved
Chocolatey 0.9.9-rc2 727 Friday, February 6, 2015 Approved
Chocolatey 0.9.9-rc1 754 Wednesday, February 4, 2015 Approved
Chocolatey 0.9.9-beta3-20150204 702 Wednesday, February 4, 2015 Approved
Chocolatey 0.9.9-beta2-20150202 768 Monday, February 2, 2015 Approved
Chocolatey 0.9.9-beta-20150201 735 Sunday, February 1, 2015 Approved
Chocolatey 0.9.9-alpha-20150201 737 Sunday, February 1, 2015 Approved
Chocolatey 0.9.9-alpha-20150125 945 Sunday, January 25, 2015 Approved
Chocolatey 0.9.8.33 1795253 Wednesday, February 11, 2015 Approved
Chocolatey 0.9.8.32 263390 Thursday, January 22, 2015 Approved
Chocolatey 0.9.8.31 190575 Wednesday, January 7, 2015 Approved
Chocolatey 0.9.8.31-beta2 756 Wednesday, January 7, 2015 Approved
Chocolatey 0.9.8.31-beta1 681 Tuesday, January 6, 2015 Approved
Chocolatey 0.9.8.30-beta1 665 Tuesday, January 6, 2015 Approved
Chocolatey 0.9.8.29 57042 Friday, January 2, 2015 Approved
Chocolatey 0.9.8.29-beta2 678 Friday, January 2, 2015 Exempted
Chocolatey 0.9.8.29-beta1 681 Friday, January 2, 2015 Exempted
Chocolatey 0.9.8.29-alpha1 726 Friday, January 2, 2015 Exempted
Chocolatey 0.9.8.28 812266 Tuesday, November 4, 2014 Approved
Chocolatey 0.9.8.28-rc1 687 Sunday, November 2, 2014 Exempted
Chocolatey 0.9.8.28-alpha3 1233 Monday, October 6, 2014 Approved
Chocolatey 0.9.8.28-alpha2 1539 Friday, August 1, 2014 Approved
Chocolatey 0.9.8.28-alpha1 769 Wednesday, July 30, 2014 Approved
Chocolatey 0.9.8.27 1382144 Monday, July 14, 2014 Approved
Chocolatey 0.9.8.27-beta1 699 Sunday, July 13, 2014 Approved
Chocolatey 0.9.8.26 991 Saturday, July 12, 2014 Approved
Chocolatey 0.9.8.26-alpha2 746 Friday, July 11, 2014 Approved
Chocolatey 0.9.8.26-alpha1 762 Friday, July 11, 2014 Approved
Chocolatey 0.9.8.25 39040 Monday, July 7, 2014 Approved
Chocolatey 0.9.8.25-alpha1 782 Saturday, July 5, 2014 Approved
Chocolatey 0.9.8.24 14027 Thursday, July 3, 2014 Approved
Chocolatey 0.9.8.24-rc2 766 Monday, June 30, 2014 Approved
Chocolatey 0.9.8.24-rc1 803 Wednesday, June 25, 2014 Approved
Chocolatey 0.9.8.24-beta2 935 Sunday, June 8, 2014 Approved
Chocolatey 0.9.8.24-beta1 1577 Thursday, April 3, 2014 Approved
Chocolatey 0.9.8.24-alpha2 1009 Sunday, March 2, 2014 Approved
Chocolatey 0.9.8.24-alpha1 868 Tuesday, February 11, 2014 Approved
Chocolatey 0.9.8.23 525896 Monday, November 11, 2013 Approved
Chocolatey 0.9.8.22 1504 Monday, November 11, 2013 Approved
Chocolatey 0.9.8.22-alpha1 770 Saturday, November 9, 2013 Approved
Chocolatey 0.9.8.21 4404 Friday, November 8, 2013 Approved
Chocolatey 0.9.8.21-beta2 748 Friday, November 8, 2013 Approved
Chocolatey 0.9.8.21-alpha7 1049 Friday, August 23, 2013 Approved
Chocolatey 0.9.8.21-alpha6 747 Thursday, August 22, 2013 Approved
Chocolatey 0.9.8.21-alpha5 731 Wednesday, August 21, 2013 Approved
Chocolatey 0.9.8.21-alpha4 711 Wednesday, August 21, 2013 Approved
Chocolatey 0.9.8.21-alpha3 888 Tuesday, July 23, 2013 Approved
Chocolatey 0.9.8.21-alpha2 868 Thursday, June 27, 2013 Approved
Chocolatey 0.9.8.21-alpha1 878 Thursday, May 30, 2013 Approved
Chocolatey 0.9.8.20 331614 Tuesday, December 11, 2012 Approved
Chocolatey 0.9.8.20-beta1 828 Wednesday, December 5, 2012 Approved
Chocolatey 0.9.8.20-alpha3 844 Friday, November 16, 2012 Approved
Chocolatey 0.9.8.20-alpha2 805 Tuesday, October 16, 2012 Approved
Chocolatey 0.9.8.20-alpha1 841 Sunday, September 16, 2012 Approved
Chocolatey 0.9.8.19 29993 Monday, July 2, 2012 Approved
Chocolatey 0.9.8.19-alpha1 786 Thursday, June 28, 2012 Approved
Chocolatey 0.9.8.18 2255 Saturday, June 16, 2012 Approved
Chocolatey 0.9.8.17 1136 Friday, June 15, 2012 Approved
Chocolatey 0.9.8.17-rc2 938 Wednesday, June 13, 2012 Approved
Chocolatey 0.9.8.17-rc1 948 Wednesday, June 13, 2012 Approved
Chocolatey 0.9.8.17-beta1 919 Thursday, June 7, 2012 Approved
Chocolatey 0.9.8.16 7399 Monday, February 27, 2012 Approved
Chocolatey 0.9.8.15 974 Monday, February 27, 2012 Approved
Chocolatey 0.9.8.15-beta2 986 Saturday, February 25, 2012 Approved
Chocolatey 0.9.8.14 2374 Monday, February 6, 2012 Approved
Chocolatey 0.9.8.13 1931 Sunday, January 8, 2012 Approved
Chocolatey 0.9.8.12 2093 Sunday, November 20, 2011 Approved
Chocolatey 0.9.8.11 1943 Friday, October 14, 2011 Approved
Chocolatey 0.9.8.10 1795 Saturday, September 17, 2011 Approved
Chocolatey 0.9.8.9 1058 Saturday, September 10, 2011 Approved
Chocolatey 0.9.8.8 914 Saturday, September 10, 2011 Approved
Chocolatey 0.9.8.7 974 Friday, September 2, 2011 Approved
Chocolatey 0.9.8.6 1809 Tuesday, August 23, 2011 Approved
Chocolatey 0.9.8.5 956 Tuesday, August 23, 2011 Approved
Chocolatey 0.9.8.4 1115 Tuesday, August 23, 2011 Approved
Chocolatey 0.9.8.3 970 Tuesday, August 23, 2011 Approved
Chocolatey 0.9.8.2 1172 Tuesday, August 23, 2011 Approved
Chocolatey 0.9.8.1 968 Tuesday, August 23, 2011 Approved
Chocolatey 0.9.8 4058 Tuesday, August 23, 2011 Approved
Chocolatey 0.9.7.3 1042 Tuesday, August 23, 2011 Approved
Chocolatey 0.9.7.2 1006 Tuesday, August 23, 2011 Approved
Chocolatey 0.9.7.1 1000 Tuesday, August 23, 2011 Approved
Chocolatey 0.9.7 1018 Tuesday, August 23, 2011 Approved
Chocolatey 0.9.6.4 966 Tuesday, August 23, 2011 Approved
Chocolatey 0.9.6.3 955 Tuesday, August 23, 2011 Approved
Chocolatey 0.9.6.2 991 Tuesday, August 23, 2011 Approved
Chocolatey 0.9.6.1 1007 Tuesday, August 23, 2011 Approved
Chocolatey 0.9.6.0 983 Tuesday, August 23, 2011 Approved
Chocolatey 0.9.5.0 1034 Tuesday, August 23, 2011 Approved
Chocolatey 0.9.4.0 1059 Tuesday, August 23, 2011 Approved
Chocolatey 0.9.3.0 1003 Tuesday, August 23, 2011 Approved
Chocolatey 0.9.2.0 983 Tuesday, August 23, 2011 Approved
Chocolatey 0.9.1.0 1033 Tuesday, August 23, 2011 Approved
Chocolatey 0.9.0.0 987 Tuesday, August 23, 2011 Approved
Chocolatey 0.8.0.0 1067 Tuesday, August 23, 2011 Approved
Chocolatey 0.7.0.0 1390 Tuesday, August 23, 2011 Approved

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

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.

What will be highlighted:

  • Introduce managing package templates, reintroduce extensions.
  • Talk a little about what's coming with pro

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.

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
  • 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

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
  • 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
  • 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

This package has no dependencies.

Discussion for the Chocolatey Package

Ground Rules:

  • This discussion is only about Chocolatey and the Chocolatey package. If you have feedback for Chocolatey, please contact the Google Group.
  • This discussion will carry over multiple versions. If you have a comment about a particular version, please note that in your comments.
  • The maintainers of this Chocolatey Package will be notified about new comments that are posted to this Disqus thread, however, it is NOT a guarantee that you will get a response. If you do not hear back from the maintainers after posting a message below, please follow up by using the link on the left side of this page or follow this link to contact maintainers. If you still hear nothing back, please follow the package triage process.
  • Tell us what you love about the package or Chocolatey, or tell us what needs improvement.
  • Share your experiences with the package, or extra configuration or gotchas that you've found.
  • If you use a url, the comment will be flagged for moderation until you've been whitelisted. Disqus moderated comments are approved on a weekly schedule if not sooner. It could take between 1-5 days for your comment to show up.
comments powered by Disqus