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,307,852

Downloads of v 0.9.10-beta-20160527:

714

Last Update:

27 May 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-20160527 | Updated: 27 May 2016

Downloads:

345,307,852

Downloads of v 0.9.10-beta-20160527:

714

Software Author(s):

  • Rob Reynolds
  • The Chocolatey Team

Chocolatey 0.9.10-beta-20160527

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 27 May 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 sticky! Wiki!

In that mess there is a link to the Helper 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+YnUNxnXtqrwnIal2CWsDnkoOn7p0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Z22TNc0
# BrOkQkBVe2bWVSPA0j91fAI7LMGFT4E4Uv25TaptZrkf7tKtpr36t2DAPzkTxIKR
# T67deZZo/PVItQeUzHD2vSXX+uyOrIn+EdRblRspbCeIMEoSD0h3SwRUX1iBA6GC
# Ag8wggILBgkqhkiG9w0BCQYxggH8MIIB+AIBATB2MGIxCzAJBgNVBAYTAlVTMRUw
# EwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20x
# ITAfBgNVBAMTGERpZ2lDZXJ0IEFzc3VyZWQgSUQgQ0EtMQIQAwGaAjr/WLFr1tXq
# 5hfwZjAJBgUrDgMCGgUAoF0wGAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAcBgkq
# hkiG9w0BCQUxDxcNMTYwNTI3MTUxNTM0WjAjBgkqhkiG9w0BCQQxFgQUOybKjvBK
# jOiOudQrjCk4Z5WAUP4wDQYJKoZIhvcNAQEBBQAEggEAoKlCWORFCJU0E8SGKDat
# 3kG8SjtCIsOns+2lAoq5DzaKBNaTlfXaDStQSlY60XmORoWf1chZJ7a/5YbIYM0/
# kgfCDiHRc6Eh13GDREMFz11wpS5Jn/OnLP/FwnkBVdy9XqkYu9EgeeZ2KI0uyO0F
# ps4SD7CkTPMH1ugZl0wT3v3BplQ6uLlZvV5Fhc/Obh70DcyS3hMWF8Th03uFrqj8
# d+TuJpJu1i8GjXOLWeNPIo26YM0LxPPy/PT4QbhxyQvuACic+IGfK7fnBAn8tfrD
# otVP5/+kN0YZndeP43UUYawXFc1KNqIdZMOGEmFHiJz0vcAgGdJ3Y9Rp/FGSvk97
# tg==
# SIG # End signature block
tools\chocolateyInstall\choco.exe
md5: 4EB17746164C7A0E359B7F0C961B1089 | sha1: D405DEA1E53605A46D0256C3235D7F2ED92740B6 | sha256: B0EDADE7E092AA0A550359C969CCC88211E66F9D222E7EE841D1518052D34857 | sha512: 4443F1CC77E755ACE3D859A5E7EA86C242B794CCD76C027F535FDBD159F83CDBC160BC3A57195C330CF043AF846485928897D16EC9B83C86B5418F5E54C627DE
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-Host "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
# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCDm2GxRvUSqJw9K
# 8wrraQchf4rvQ3JTYWIg7XQmp/Des6CCF7cwggUwMIIEGKADAgECAhAECRgbX9W7
# ZnVTQ7VvlVAIMA0GCSqGSIb3DQEBCwUAMGUxCzAJBgNVBAYTAlVTMRUwEwYDVQQK
# EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xJDAiBgNV
# BAMTG0RpZ2lDZXJ0IEFzc3VyZWQgSUQgUm9vdCBDQTAeFw0xMzEwMjIxMjAwMDBa
# Fw0yODEwMjIxMjAwMDBaMHIxCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2Vy
# dCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xMTAvBgNVBAMTKERpZ2lD
# ZXJ0IFNIQTIgQXNzdXJlZCBJRCBDb2RlIFNpZ25pbmcgQ0EwggEiMA0GCSqGSIb3
# DQEBA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HdxiVAJPFbOUhcFHEOItlMSQzQF7bQqqWACp56b8Gqj6ZYGYaRbLl26+y
# 84tnQkAiaqF/M2+sJVVzKTeFhLFzbxI5p+3VmKwEiqhoZIvd/D5M2ai+qa011t/f
# o3rLRz9TQR8952OC/oqYdZE3T3zrVChkxwgucNyoWbBIlSvzJYbnPg0w0BvC1cWQ
# 3qqRgD+RgWTJeutVqhUlvj1GEiufB5K66ckW5btimUdEAcxVCjZr79wZJIEukKGC
# Ag8wggILBgkqhkiG9w0BCQYxggH8MIIB+AIBATB2MGIxCzAJBgNVBAYTAlVTMRUw
# EwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20x
# ITAfBgNVBAMTGERpZ2lDZXJ0IEFzc3VyZWQgSUQgQ0EtMQIQAwGaAjr/WLFr1tXq
# 5hfwZjAJBgUrDgMCGgUAoF0wGAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAcBgkq
# hkiG9w0BCQUxDxcNMTYwNTI3MTUxNTMyWjAjBgkqhkiG9w0BCQQxFgQUoR7XOJad
# m5yEbg2S4Id0DUpdsA8wDQYJKoZIhvcNAQEBBQAEggEAQvd06OCl3c6/LJ1LtWzy
# /HEimMDPXTFfY12mGdEuk6lAN3sCIL9JJCKKpf/LHZeeuDh5ces4O5kCp76y7Zy5
# /zzjfl+kEPnhfcTwalNXs8GsstvKNUBeGWNudlNB45Jf3wS5SfhbYD605czN7bpa
# Rl3jFoAy9b32+j8rYwlGcRbR6DuKFyVG+99xgretPap6pKLSouQF6WfaiSh8imj9
# TJ8n1voQZnvM7ll/fJZdx9njmKfRbDdXYn2zWKF2jMkwHb2ldUn1kKA4YhKmS9UF
# IZ71VHZl88ASf78if+2fcriJ22SricOgKQ3y6Jc/0ePfdWammuOF+01LGee9cKv2
# 9w==
# 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
# ZXJ0IFNIQTIgQXNzdXJlZC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all\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/q8grkV7t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
# Ag8wggILBgkqhkiG9w0BCQYxggH8MIIB+AIBATB2MGIxCzAJBgNVBAYTAlVTMRUw
# EwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20x
# ITAfBgNVBAMTGERpZ2lDZXJ0IEFzc3VyZWQgSUQgQ0EtMQIQAwGaAjr/WLFr1tXq
# 5hfwZjAJBgUrDgMCGgUAoF0wGAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAcBgkq
# hkiG9w0BCQUxDxcNMTYwNTI3MTUxNTMyWjAjBgkqhkiG9w0BCQQxFgQUxW4ytZl4
# S4MtnZqj3lMgCM3dkXAwDQYJKoZIhvcNAQEBBQAEggEAkZhPXCDtSbRXlD1oKBIy
# 2AvLnTX//3R1HqJ1MALPlsD0nhs+ogTqGIS8AeFkPMTI6ikhmV9rr9v6YJwoZzxH
# ALqgE5GNKkb03O9wqbQE2rvJQCG7Zo8imkZkJHbzmkFoHMaBu1gbJfmdmXALtCHs
# BfAozeWo6FGVXSYjzA6HzhvKcTf1uPCyDOk/Qb4TqS56E2QssjwPBTPnE8I+DhUY
# Me+bS+vuYpvPBX6LNFjkRUZiNYKUamQXMCRQYKEx9e1hPfr1YDKJnA6hgTOGg8uz
# 4VN1kl8mQcIZ+rU4Y/mCJk60EwBiD6adtX4yl9XNF+OCszCjpnD9nGMC6lLKE93l
# DQ==
# 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" + $allcommands
  new = "--template-name= --file='Biz editions only' --automaticpackage --version= --maintainer='' packageversion= maintainername='' maintainerrepo='' installertype= url='' url64='' silentargs='' -?" + $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
# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCCCRt/R4VM1IaTz
# ciEGsVNbpWyx04KoLnwiyJCtMeywYqCCF7cwggUwMIIEGKADAgECAhAECR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aUzugxeRjgnNE+ht
# gPB3DA3g2o4+4VhKkQKLveonTxtAu+4zbs/xtELC77V1TwCqiikvLXiFiveRDflG
# OoVlihZg4sYXusGgc0dZX+hWQfrxncGVUgPYMrlbggJ5hicA3SIdf9igsqi1E1o1
# /TdjAUVwMpK/BiBYb+aYJ4u8GfuvasYG79j7FMI1NqkZ4Q2WV5REHvxFywPb67QX
# iDvdTlHA7iJ52sYevoFkQ1cHx9xJraAtQUbq6/BW+act8VvSODD9vJRqJpvPH2Rc
# Z+TPt40t1GY0UGm75QbnBgfazUFKbiDuDAV/8s4nX3Ib0Gbpb/W6SaQ1PqBy9e2K
# Kw==
# 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() {
    Param ([double]$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
# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCDzlbRskLZDJn9S
# ICcXd8Gn72T6EWnCOrxPedwBcio6mqCCF7cwggUwMIIEGKADAgECAhAECRgbX9W7
#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Te0txmU48TG/
# WIpe/Rl7hMljpXIr1uGG7H3CJJy+xEM7qQq25nRtDTvoo5u9cwMfLkECfxotNsuX
# rdSMC21TGiCaPbvCAqck0nSEygcudz4Pstl+3HNIFOLZOTqnyERRWB/8IKHgAy3R
# ftGI1dl2XoPtPEvUrQub1UuXnJZwuBZaXQcAGEO1rymnHJvPOKiMiAaY7daFwC24
# z1712SNCqNxikhERvr2+KY3qxdq4kchnEn7TJgpYmcK8IHmTKaxYaSc+/YQNSszp
# 3Y7U+ujJHIvVKvBbRG+q3NVmtd8Dwo9xleIXrBo9t1Ke3126+rcruNVBAGiouEi/
# Tw==
# 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 {
param(
  [string] $file,
  [string] $checksum = '',
  [string] $checksumType = 'md5'
)
  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
# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCBp8170G0mVxeTS
# LFQviaOAEjeyizoiuwAqx2PDT3PpqqCCF7cwggUwMIIEGKADAgECAhAECRgbX9W7
# ZnVTQ7VvlVAIMA0GCSqGSIb3DQEBCwUAMGUxCzAJBgNVBAYTAlVTMRUwEwYDVQQK
# EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xJDAiBgNV
# BAMTG0RpZ2lDZXJ0IEFzc3VyZWQgSUQgUm9vdCBDQTAeFw0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se4QJ8cBhKJuyeveqe9
# V9/6U81oulAZD42FW9l1gsF+dApPhcE0aJ+pxDuu/vVHGD4SCPLNfZL7ifvKHM68
# i36m46C42i3Q9t9QAFxVqOyfsbQUlBbgHHTR2hNa9GHyZqIdgYvkNM1PB0U1TLS5
# mg==
# 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, Z and tar.

.PARAMETER FileFullPath
This is the full path to your zip file.

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

.EXAMPLE
$scriptPath = (Split-Path -parent $MyInvocation.MyCommand.Definition)
Get-ChocolateyUnzip "c:\someFile.zip" $scriptPath somedirinzip\somedirinzip

.OUTPUTS
Returns the passed in $destination.

.NOTES
This helper reduces the number of lines one would have to write to unzip a file to 1 line.
If extraction fails, an exception is thrown.

#>
param(
  [string] $fileFullPath,
  [string] $destination,
  [string] $specificFolder,
  [string] $packageName
)
  $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)" }
  }

  return $destination
}

# SIG # Begin signature block
# MIIcrQYJKoZIhvcNAQcCoIIcnjCCHJoCAQExDzANBglghkgBZQMEAgEFADB5Bgor
# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCC7zQr2BFqxYzXH
# xjD1azXkmq7ugPgdPLBeOqqufTml0qCCF7cwggUwMIIEGKADAgECAhAECRgbX9W7
# ZnVTQ7VvlVAIMA0GCSqGSIb3DQEBCwUAMGUxCzAJBgNVBAYTAlVTMRUwEwYDVQQK
# EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xJDAiBgNV
# BAMTG0RpZ2lDZXJ0IEFzc3VyZWQgSUQgUm9vdCBDQTAeFw0xMzEwMjIxMjAwMDBa
# Fw0yODEwMjIxMjAwMDBaMHIxCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2Vy
# dCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xMTAvBgNVBAMTKERpZ2lD
# ZXJ0IFNIQTIgQXNzdXJlZCBJRCBDb2RlIFNpZ25pbmcgQ0EwggEiMA0GCSqGSIb3
# DQEBAQUAA4IBDwAwggEKAoIBAQD407Mcfw4Rr2d3B9MLMUkZz9D7RZmxOttE9X/l
# qJ3bMtdx6nadBS63j/qSQ8Cl+YnUNxnXtqrwnIal2CWsDnkoOn7p0WfTxvspJ8fT
# eyOU5JEjlpB3gvmhhCNmElQzUHSxKCa7JGnCwlLyFGeKiUXULaGj6YgsIJWuHEqH
# CN8M9eJNYBi+qsSyrnAxZjNxPqxwoqvOf+l8y5Kh5TsxHM/q8grkV7tKtel05iv+
# bMt+dDk2DZDv5LVOpKnqagqrhPOsZ061xPeM0SAlI+sIZD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TMRUw
# EwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20x
# ITAfBgNVBAMTGERpZ2lDZXJ0IEFzc3VyZWQgSUQgQ0EtMQIQAwGaAjr/WLFr1tXq
# 5hfwZjAJBgUrDgMCGgUAoF0wGAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAcBgkq
# hkiG9w0BCQUxDxcNMTYwNTI3MTUxNTI0WjAjBgkqhkiG9w0BCQQxFgQUVFoFb4uC
# w+OLb6cIt3ILZ3nrHN0wDQYJKoZIhvcNAQEBBQAEggEALJxFE+YLEvR03alh5TJO
# 1chgaNDbxMYrvYWsn3+S1xECBdxTO76xzxI+UosOaCbSWVVKWhiCgi3Kj7ziaB5v
# AfwVT6blVDdlHIUiRnRs/kCQ93stpSM6eRBGmJ1NpID1+ta+5SR8AfsbW673zcRw
# 96Z1X8r+mN3wnkR5cdstQQ7po8lJc/htFDLmBFrHX6GZIDAlV1/vzNqEpnAMYQ46
# yR+oMJIZVex2NcS2WDKQUH1EdPJH4vP6k+fDPXx+rV2P/HIztUyF0G8D3v60kkWb
# Ly0ljVoc00t83Ol8BW9Yt8II0REnZMxw1boAQb3LW8f56DizKWo31CSPcKDHrLPZ
# 2Q==
# 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.

.PARAMETER PackageName
The name of the package we want to download - this is arbitrary, call it whatever you want.
It's recommended you call it the same as your nuget package id.

.PARAMETER FileFullPath
This is the full path of the resulting file name.

.PARAMETER Url
This is the url to download the file from.

.PARAMETER Url64bit
OPTIONAL - If there is an x64 installer to download, please include it here. If not, delete this parameter

.PARAMETER Checksum
OPTIONAL (Right now) - This allows a checksum to be validated for files that are not local

.PARAMETER Checksum64
OPTIONAL (Right now) - This allows a checksum to be validated for files that are not local

.PARAMETER ChecksumType
OPTIONAL (Right now) - 'md5', 'sha1', 'sha256' or 'sha512' - defaults to 'md5'

.PARAMETER ChecksumType64
OPTIONAL (Right now) - 'md5', 'sha1', 'sha256' or 'sha512' - defaults to ChecksumType

.PARAMETER options
OPTIONAL - Specify custom headers

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 'package' 'https://somelocation.com/thefile.exe' -options $options

.PARAMETER GetOriginalFileName
OPTIONAL switch to allow Chocolatey to determine the original file name from the url
  
.EXAMPLE
Get-ChocolateyWebFile '__NAME__' 'C:\somepath\somename.exe' 'URL' '64BIT_URL_DELETE_IF_NO_64BIT'

.NOTES
This helper reduces the number of lines one would have to write to download a file to 1 line.
There is no error handling built into this method.

.LINK
Install-ChocolateyPackage
#>
param(
  [string] $packageName,
  [string] $fileFullPath,
  [string] $url,
  [string] $url64bit = '',
  [string] $checksum = '',
  [string] $checksumType = '',
  [string] $checksum64 = '',
  [string] $checksumType64 = $checksumType,
  [hashtable] $options = @{Headers=@{}},
  [switch]$getOriginalFileName
)
  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 ($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
# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCAkcTubtAv2tfc3
# QjpEPgPfCqTpytn94cgUZGsze1SL6aCCF7cwggUwMIIEGKADAgECAhAECRgbX9W7
# ZnVTQ7VvlVAIMA0GCSqGSIb3DQEBCwUAMGUxCzAJBgNVBAYTAlVTMRUwEwYDVQQK
# EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xJDAiBgNV
# BAMTG0RpZ2lDZXJ0IEFzc3VyZWQgSUQgUm9vdCBDQTAeFw0xMzEwMjIxMjAwMDBa
# Fw0yODEwMjIxMjAwMDBaMHIxCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2Vy
# dCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xMTAvBgNVBAMTKERpZ2lD
# ZXJ0IFNIQTIgQXNzdXJlZCBJRCBDb2RlIFNpZ25pbmcgQ0EwggEiMA0GCSqGSIb3
# DQEBAQUAA4IBDwAwggEKAoIBAQD407Mcfw4Rr2d3B9MLMUkZz9D7RZmxOttE9X/l
# qJ3bMtdx6nadBS63j/qSQ8Cl+YnUNxnXtqrwnIal2CWsDnkoOn7p0WfTxvspJ8fT
# eyOU5JEjlpB3gvmhhCNmElQzUHSxKCa7JGnCwlLyFGeKiUXULaGj6YgsIJWuHE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AsLf33oV15oMcLd8sIVvFLnFO8DBOkAhYs1DbFSX8E+0Y296GC
# Ag8wggILBgkqhkiG9w0BCQYxggH8MIIB+AIBATB2MGIxCzAJBgNVBAYTAlVTMRUw
# EwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20x
# ITAfBgNVBAMTGERpZ2lDZXJ0IEFzc3VyZWQgSUQgQ0EtMQIQAwGaAjr/WLFr1tXq
# 5hfwZjAJBgUrDgMCGgUAoF0wGAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAcBgkq
# hkiG9w0BCQUxDxcNMTYwNTI3MTUxNTI1WjAjBgkqhkiG9w0BCQQxFgQUiHcPRIRB
# ubQVPGABQ/3Uke5RpxMwDQYJKoZIhvcNAQEBBQAEggEAEemW1lDjTVMnKbLAI+xR
# U+FgfUMkDQz46AqY9cOF9geNEGEa4/4dwNvYAQ+HzPRArC+H6BqdI8OMtSypD2JC
# W9Vv1c6hsKuk7ZGsxhriexA6+GDiSpI6/CbVa35cbXwAXVc/Z1ziPDDm1ET/WfLi
# 6oHL+DNbz+ZMRNEH0aY5gpaQNHLGCgxA1bs4XrfE5GbYPTLq8DvS3zCJrpE3X3Fk
# 88mxvRtWEuj8pMnzkB3WtZMdxfbyhWL9vwMzF9Md3rqO3HrwjeowRJoiEjauGNZf
# 4Pl5cZVeIOIXGXdPXFajcJTsiOvJZSXTm0/T+H/X15+0K+yP8T2nweGgMTrd17DO
# Wg==
# 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).

.PARAMETER Name
The environemnt variable you want to get the value from.

.PARAMETER Scope
The environemnt variable target scope.

.PARAMETER PreserveVariables
A switch parameter stating whether you want to expand the variables or not. Defaults to false.

.EXAMPLE
Get-EnvironmentVariable 'TEMP' User -PreserveVariables

.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.
#>
[CmdletBinding()]
[OutputType([string])]
param(
  [Parameter(Mandatory=$true)]
  [string] $Name, 
  [Parameter(Mandatory=$true)]
  [System.EnvironmentVariableTarget] $Scope, 
  [Parameter(Mandatory=$false)]
  [switch] $PreserveVariables = $false
)
  [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()
  }

  return $environmentVariableValue
}
# SIG # Begin signature block
# MIIcrQYJKoZIhvcNAQcCoIIcnjCCHJoCAQExDzANBglghkgBZQMEAgEFADB5Bgor
# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCBNzNt0ljL87orU
# gHSMgZYefPGqOxeW7vcvMmfR9BC2DKCCF7cwggUwMIIEGKADAgECAhAECRgbX9W7
# ZnVTQ7VvlVAIMA0GCSqGSIb3DQEBCwUAMGUxCzAJBgNVBAYTAlVTMRUwEwYDVQQK
# EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xJDAiBgNV
# BAMTG0RpZ2lDZXJ0IEFzc3VyZWQgSUQgUm9vdCBDQTAeFw0xMzEwMjIxMjAwMDBa
# Fw0yODEwMjIxMjAwMDBaMHIxCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2Vy
# dCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xMTAvBgNVBAMTKERpZ2lD
# ZXJ0IFNIQTIgQXNzdXJlZCBJRCBDb2RlIFNpZ25pbmcgQ0EwggEiMA0GCSqGSIb3
# DQEBAQUAA4IBDwAwggEKAoIBAQD407Mcfw4Rr2d3B9MLMUkZz9D7RZmxOttE9X/l
# qJ3bMtdx6nadBS63j/qSQ8Cl+YnUNxnXtqrwnIal2CWsDnkoOn7p0WfTxvspJ8fT
# eyOU5JEjlpB3gvmhhCNmElQzUHSxKCa7JGnCwlLyFGeKiUXULaGj6YgsIJWuHEqH
# CN8M9eJNYBi+qsSyrnAxZjNxP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psFNLubBaGC
# Ag8wggILBgkqhkiG9w0BCQYxggH8MIIB+AIBATB2MGIxCzAJBgNVBAYTAlVTMRUw
# EwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20x
# ITAfBgNVBAMTGERpZ2lDZXJ0IEFzc3VyZWQgSUQgQ0EtMQIQAwGaAjr/WLFr1tXq
# 5hfwZjAJBgUrDgMCGgUAoF0wGAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAcBgkq
# hkiG9w0BCQUxDxcNMTYwNTI3MTUxNTI1WjAjBgkqhkiG9w0BCQQxFgQUZgbob4L8
# +kNC4G8TvssnVLgeGvwwDQYJKoZIhvcNAQEBBQAEggEACNQobgY41aitLYqWOHdD
# hSPDLViUa7Bdf+lF226Z9Bb0dSyQw05mqE45Gzspo/thugElfCkZoZ1FgYWC5OEg
# vta1knuZwAPM43KCHunsan++9Fi4g8dTVPJH6G1JHe6YFMi1/lN2ODeMa8Xb26zZ
# oNvUA8AXEubrzwOVUWu/EBmq0RUj9HlVRFzu27EajNvDj6jaDBDfQjZMtO6/VkQy
# jgx4fm5k+Jg3w5g/KPgUi64J+Z1GB7T/8guNioQL9bq0QZVnmBcjzRoP4ui67ncb
# PnO1QToWeqpXGlc4NRIHtcNQIOkgq4BY4Fa1sGmzIqutIhGmbpZOfxE7kLh/0qLX
# ug==
# 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) {
    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
# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCDfSoWGZA+jQ0Fu
# cz515bG9l0eBVgJHHikWLJ1/4CHwaaCCF7cwggUwMIIEGKADAgECAhAECRgbX9W7
# ZnVTQ7VvlVAIMA0GCSqGSIb3DQEBCwUAMGUxCzAJBgNVBAYTAlVTMRUwEwYDVQQK
# EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xJDAiBgNV
# BAMTG0RpZ2lDZXJ0IEFzc3VyZWQgSUQgUm9vdCBDQTAeFw0xMzEwMjIxMjAwMDBa
# Fw0yODEwMjIxMjAwMDBaMHIxCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2Vy
# dCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xMTAvBgNVBAMTKERpZ2lD
# ZXJ0IFNIQTIgQXNzdXJlZCBJRCBDb2RlIFNpZ25pbmcgQ0EwggEiMA0GCSqGSIb3
# DQEBAQUAA4IBDwAwggEKAoIBAQD407Mcfw4Rr2d3B9MLMUkZz9D7RZmxOttE9X/l
# qJ3bMtdx6nadBS63j/qSQ8Cl+YnUNxnXtqrwnIal2CWsDnkoOn7p0WfTxvspJ8fT
# eyOU5JEjlpB3gvmhh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iAGCYGvBt1WSnhKEDH7SjLJSD50GsB0AaPL2egt
# klM3hJVvp3+q71wTuKy6u5YNeDAP0RMw4vamsNh8yZbhHqcksZjVWRifjS+LkaGC
# Ag8wggILBgkqhkiG9w0BCQYxggH8MIIB+AIBATB2MGIxCzAJBgNVBAYTAlVTMRUw
# EwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20x
# ITAfBgNVBAMTGERpZ2lDZXJ0IEFzc3VyZWQgSUQgQ0EtMQIQAwGaAjr/WLFr1tXq
# 5hfwZjAJBgUrDgMCGgUAoF0wGAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAcBgkq
# hkiG9w0BCQUxDxcNMTYwNTI3MTUxNTI1WjAjBgkqhkiG9w0BCQQxFgQUDjDJBggt
# tiQqZnWIOtfPfHX3PxcwDQYJKoZIhvcNAQEBBQAEggEAlgNnMooa7V2KRlhJVouq
# bUBacfuYZAlDOhiNB3Z5QzGaZzWRaC1qKf+a92OtNb0YvoRUwGesQbJZnXo/4+pY
# X352pgGOSil1nyYprs4MzLSW2qA+XsLDW5YS1pSDrpTuZlxT333eMP50u8t4yXSn
# SpBN+hiyUjQNItL23UIIBXqNGYYh4xD0tfxYijvOJS1IN/lRqyN/BhbHGEf4d0Fu
# Pq3Ynznh9JcNG8mmk47iRzmk2v+mlExt19iou3YW9Jb2o1e+iqo8PvNKOMoE800p
# 6fV8S+oI1JglYF+x9hP23/FBLD/o4nT62PcPh4bOrJflcz1lWz4U1XcsETuSZ2n/
# NA==
# 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
##############################################################################################################
function Get-FtpFile {
param(
  $url = '', #(Read-Host "The URL to download"),
  $fileName = $null,
  $username = $null,
  $password = $null,
  [switch]$quiet
)
  # Create a FTPWebRequest object to handle the connection to the ftp server
  $ftprequest = [System.Net.FtpWebRequest]::create($url)

  # 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

  # 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

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

  $writer.Flush()
  $writer.close()
}

# SIG # Begin signature block
# MIIcrQYJKoZIhvcNAQcCoIIcnjCCHJoCAQExDzANBglghkgBZQMEAgEFADB5Bgor
# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCAtc7zAE6no9XmX
# rii82+vvkpZ1ZU0nK/Q9/cOewOIJ6qCCF7cwggUwMIIEGKADA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kZVb+BkSpH0hGAbPTvk
# sy3mi8E2TNFvWZLqOv1ZzFbdk2HlIv7gDaBXDOpp0udNF6axXLMZjaEdl3o6PLSL
# 8ppCcF0hoN76hAajC0RGfvuzmJS9leA0qj8BUL5LmKn+IBKUs+Futnbp6JzsV6mR
# l0HOPoqM1dq3VvcWzb2BTQJePFYMw//hf10LF3/ktz42a9a4eYRPJ6Uk2fLmrPgk
# k1DS/eHldq6wlgCRVTmQGg1z+bESjK4r6R2qrU2BfE1aZ7zIXg6Azczqk4axOOx4
# lA2A50xV5imMRrW9s1SfbfezseJyYPO1WoeSfukPUc3EwCUntOLktANCWJ3G4kWp
# cw==
# SIG # End signature block
tools\chocolateyInstall\helpers\functions\Get-ProcessorBits.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-ProcessorBits {
<#
.SYNOPSIS
Get the system architecture address width.

.DESCRIPTION
This will return the system architecture address width (probably 32 or 64 bit).

.PARAMETER compare
This optional parameter causes the function to return $True or $False, depending on wether or not the bitwidth matches.

.NOTES
When your installation script has to know what architecture it is run on, this simple function comes in handy.
#>
param(
  $compare # You can optionally pass a value to compare the system architecture and receive $True or $False in stead of 32|64|nn
)
  Write-Debug "Running 'Get-ProcessorBits'"

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

# SIG # Begin signature block
# MIIcrQYJKoZIhvcNAQcCoIIcnjCCHJ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3VyZWQgSUQgQ0EtMQIQAwGaAjr/WLFr1tXq
# 5hfwZjAJBgUrDgMCGgUAoF0wGAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAcBgkq
# hkiG9w0BCQUxDxcNMTYwNTI3MTUxNTI1WjAjBgkqhkiG9w0BCQQxFgQUFJ2vqhmW
# 7irRRVNoZH7VBP4cyJswDQYJKoZIhvcNAQEBBQAEggEAg58iwHoey74Fgv//llvB
# SlWmvfwjWh/X812FpMpq6BS6uWUgP0Sfo7ZB/h/uXyE3jFf9rHTxlrPFJYhpYKhW
# kGIksWSxxxmMlAEXT2VDqzzhsU0k9o/MoeGfUkM9w32s4McChqBCqrjQyggV3Kt1
# mCsIoutFBQTw1evve41HbyR3/6j6mg+K4/ZOiAUDncRsHXe0pkOyGaIwbPUCDXHH
# C63FEpUvjTuHgOkpwGdA1Bz89+GfpCydRNdxoFxRU5/aV1f6CdvZ9mOFfP97AopV
# dtMEKDggoMMwPERlEbieYJk+0+R0W2T7HFi1rcQYvP+0d3I0vw1OmFmPagH1hmwS
# gA==
# 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 {
  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
# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCB1ZYgvJ4okPkUQ
# exi4DnBk7w/GQc5izoBOfS3diABLsqCCF7cwggUwMIIEGKADAgECAhAECRgbX9W7
# ZnVTQ7VvlVAIMA0GCSqGSIb3DQEBCwUAMGUxCzAJBgNVBAYTAlVTMRUwEwYDVQQK
# EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xJDAiBgNV
# BAMTG0RpZ2lDZXJ0IEFzc3VyZWQgSUQgUm9vdCBDQTAeFw0xMzEwMjIxMjAwMDBa
# Fw0yODEwMjIxMjAwMDBaMHIxCzAJBgNVBAYTAlV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M4jbqKiYth7bTUSMevULG1X9+zHU9eox
# dhfVxklAz69eDB3nXf4XTJ8PBKUV9o7qea+AROUS2yNk4J7Sf0LzqatSOYHqtD+n
# JA==
# 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 {
  $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
# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCBtHcfcIufxuMON
# ejyeA8M/iMKzMumam13vwTNidCMqxKCCF7cwggUwMIIEGKADAgECAhAECRgbX9W7
# ZnVTQ7VvlVAIMA0GCSqGSIb3DQEBCwUAMGUxCz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ghtulnEz8s6/vzOvxHWIh6mK
# +6bSwSqzS7HJ5d2AaiWEgqtCrAOxdR9cQWzG5Wu/C73k0SHOZBx0I8nLuyHRFcgb
# yQVM2Tyab5AU0GweTuOM0jrSUWT9ypYSfHMEj+Z5mVpP6b+fDOFBZWu/kJBIlfCe
# KxAnmaHwZKKgNrx9FTP+aRs1LeDuhyKGuUSxC3anzb7uQBEnCjqhKmSTqmj76y1N
# gltwSumbxIu74FYfSXzwW6HF4DfxH+SwoI8oEndRQeKDpZggEUenf1kOXJGPh4v7
# 2w==
# 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 {
param(
  [string] $url,
  [string] $file = ''
)
  Write-Debug "No virus checking built into FOSS Chocolatey."
  #Write-Debug "Running 'Get-VirusCheckValid' with url:`'$url`', file: `'$file`'";
}

# SIG # Begin signature block
# MIIcrQYJKoZIhvcNAQcCoIIcnjCCHJoCAQExDzANBglghkgBZQMEAgEFADB5Bgor
# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCDs0fuawZ8rgZhr
# 4XBPVuE8bY9sUiMp2U+sLkrxjLkinqCCF7cwggUwMIIEGKADAgECAhAECRgbX9W7
# ZnVTQ7VvlVAIMA0GCSqGSIb3DQEBCwUAMGUxCzAJBgNVBAYTAlVTMRUwEwYDVQQK
# E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/UArj
# 20rU8B53+y7VkmruZtftyThJ03/m/F7WKnvrPFUdSJic5NI/c1PvuNXfB2OmjZmI
# sDMww2sT1eQn+b8O3afqiRxdSYyHpF4XRtNSPl/+eIwYerKzLLg/Y77aZSvDmP2b
# RBuHgJSCrV+wyx1B2XU9TQgjMZQMC+KsaQJLMhDaI9iPwJNhPKi8k24D1Ax+HzWO
# feEmxlTVtEW2drpQ5KOkrgJaOb6r1bLmkbw0Zbzqo65O3AkjVJT3g0q4aYYh3xjT
# sA==
# 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)
##############################################################################################################
function Get-WebFile {
param(
  $url = '', #(Read-Host "The URL to download"),
  $fileName = $null,
  $userAgent = 'chocolatey command line',
  [switch]$Passthru,
  [switch]$quiet,
  [hashtable] $options = @{Headers=@{}}
)
  Write-Debug "Running 'Get-WebFile' for $fileName with url:`'$url`', userAgent: `'$userAgent`' ";
  #if ($url -eq '' return)
  $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
    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
# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCDZ+z0+in66mdzG
# 61Uoz0FEp7v/4PZvDza16FEkbuSfOaCCF7cwggUwMIIEGKADAgECAhAECRgbX9W7
# ZnVTQ7VvlVAIMA0GCSqGSIb3DQEBCwUAMGUxCzAJBgNVBAYTAlVTMRUwEwYDVQQK
# EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xJDAiBgNV
# BAMTG0RpZ2lDZXJ0IEFzc3VyZWQgSUQgUm9vdCBDQTAeFw0xMzEwMjIxMjAwMDBa
# Fw0yODEwMjIxMjAwMDBaMHIxCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2Vy
# dCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xMTAvBgNVBAMTKERpZ2lD
# ZXJ0IFNIQTIgQXNzdXJlZCBJRCBDb2RlIFNpZ25pbmcgQ0EwggEiMA0GCSqGSIb3
# DQEBAQUAA4IBDwAwggEKAoIBAQD407Mcfw4Rr2d3B9MLMUkZz9D7RZmxOttE9X/l
# qJ3bMtdx6nadBS63j/qSQ8Cl+YnUNxnXtqrwnIal2CWsDnkoOn7p0WfTxvspJ8fT
# eyOU5JEjlpB3gvmhhCNmElQzUHSxKCa7JGnCwlLyFGeKiUXULaGj6YgsIJWuHEqH
# CN8M9eJNYBi+qsSyrnAxZjNxPqxwoqvOf+l8y5Kh5TsxHM/q8grkV7tKtel05iv+
# bMt+dDk2DZDv5LVOpKnqagqrhPOsZ061xPeM0SAlI+sIZD5SlsHyDxL0xY4Pw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dpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20x
# ITAfBgNVBAMTGERpZ2lDZXJ0IEFzc3VyZWQgSUQgQ0EtMQIQAwGaAjr/WLFr1tXq
# 5hfwZjAJBgUrDgMCGgUAoF0wGAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAcBgkq
# hkiG9w0BCQUxDxcNMTYwNTI3MTUxNTI2WjAjBgkqhkiG9w0BCQQxFgQUVkgFZ60z
# nhFShJZ7QaAj0tgd7SMwDQYJKoZIhvcNAQEBBQAEggEAi5uTF1TS0KZuEoEW9m3m
# lNpeeTGN+24A/QQFaRNwC37+F9U7/GZiTGQVAemI/AtbrGxfQqXYvUwy5XyZE020
# zOkXui2Aa3qsf+wjp+zCYTuLzVs27BkVdIoNZ8SY94d7VvPqjpn2EFdzQ2q9zPy/
# +GHt8d+/6BzDmQEHrwMyLM85dV07YYIyxHV1AeTY42l3qE2Tauwe8VsNUue8h9Uc
# 0Nm6bh3GJoCxsPEIQuOOEsHUe0S/cr0N4NE+e+uGUJYpVGI99RJrNzGnI/XQ7+AS
# SZiDoen9bTDw/5NvuUBNwOptqGwmOhQhYZjKX57bpA812BO8wFGBCpiBzEJMbhKd
# aA==
# 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 {
param(
  [string]$url = '',
  [string]$defaultName,
  $userAgent = 'chocolatey command line'
)

  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
  }

  $request = [System.Net.HttpWebRequest]::Create($url)
  if ($request -eq $null) { 
    $request.Close()
    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
  
  try
  {
    [System.Net.HttpWebResponse]$response = $request.GetResponse()
    if ($response -eq $null) {
      $response.Close()
      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 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)
      }
    }

    #$containsQuery = [System.IO.Path]::GetFileName($url).Contains('?')
    #$containsEquals = [System.IO.Path]::GetFileName($url).Contains('=')

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

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

    [System.Text.RegularExpressions.Regex]$containsABadCharacter = New-Object Regex("[" + [System.Text.RegularExpressions.Regex]::Escape([System.IO.Path]::GetInvalidFileNameChars()) + "]", [System.Text.RegularExpressions.RegexOptions]::IgnorePatternWhitespace);

    # 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
# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCCes1uzTavKct0D
# AvHsb34Lr5+dkB7zjsWMQixhFX7m0KCCF7cwggUwMIIEGKADAgECAhAECRgbX9W7
# ZnVTQ7VvlVAIMA0GCSqGSIb3DQEBCwUAMGUxCzAJBgNVBAYTAlVTMRUwEwYDVQQK
# EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xJDAiBgNV
# BAMTG0RpZ2lDZXJ0IEFzc3VyZWQgSUQgUm9vdCBDQTAeFw0xMzEwMjIxMjAwMDBa
# Fw0yODEwMjIxMjAwMDBaMHIxCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2Vy
# dCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xMTAvBgNVBAMTKERpZ2lD
# ZXJ0IFNIQTIgQXNzdXJlZCBJRCB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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 {
param(
  $url = '',
  $userAgent = 'chocolatey command line'
)
  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
# KX7zUQIBA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xDxcNMTYwNTI3MTUxNTI2WjAjBgkqhkiG9w0BCQQxFgQU9Cje8uaz
# t4JCBtoVdBKMM0jb+AEwDQYJKoZIhvcNAQEBBQAEggEAkuPKoaGU+3zBl/U9kjq3
# JA2zAhKbBVGykLNsyOyGRboLUYV2gw/BAICkFoSSMI+6/xUL3sMz+2dzwKpLQLWU
# 7nvC8mK0dQ68gdhU+7PRzfBe3Ytl1EY2e82vKXUXKqKEPRWW/bYs2yCxe/O1jPq9
# FD87tGqd6UE6F9nCbjoj9+bnZiRq/Hyx+DI5zMKOsWSFu1KipTI/kRT3nziLSIcR
# nc5Tw+Buh3beHp1hDGjII8bg4vpGppqOq5amFjW9P5Ck2G+3Q/yrD0Cgrtz43EYj
# pGmRhj1bz+oyAKnjw1rdYx73Owo2qiZoss8nc56Oezit45TLh1LTC+6tqNFzsYhu
# xA==
# 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 {
param(
  [string] $name,
  [string] $path,
  [switch] $useStart,
  [string] $command = ''
)
  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
# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCAeOELkO/6Rhb1v
# HvGr2kOlV5WZjWkD77L9XF4zUeSK2KCCF7cwggUwMIIEGKADAgECAhAECRgbX9W7
# ZnVTQ7VvlVAIMA0GCSqGSIb3DQEBCwUAMGUxCzAJBgNVBAYTAlVTMRUwEwYDVQQK
# EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xJDAiBgNV
# BAMTG0RpZ2lDZXJ0IEFzc3VyZWQgSUQgUm9vdCBDQTAeFw0xMzEwMjIxMjAwMDBa
# Fw0yODEwMjIxMjAwMDBaMHIxCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2Vy
# dCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xMTAvBgNVBAMTKERpZ2lD
# ZXJ0IFNIQTIgQXNzdXJlZCBJRCBDb2RlIFNpZ25pbmcgQ0EwggEiMA0GCSqGSIb3
# DQEBAQUAA4IBDwAwggEKAoIBA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X5+rspgrYP9WZnRtxhGziqwrHhHFZ6V
# uiin+HfKCtxF/P9dlRUvtyodolmw2Tmh1ngMNDwTsYb/YniwTawbyQLyAqOyQICg
# EgRTUnG+1nrS2mlLoK/gBgM8yN7hHL6FLkDCzTeSbIFF04fwNIlQi6rfeSW0qGra
# 4gqA0DBdPRUG0P+AfbqqovdU7ORjFqvVaaaSWdN45+yiALqYovmsjhu9k9jWAaGC
# Ag8wggILBgkqhkiG9w0BCQYxggH8MIIB+AIBATB2MGIxCzAJBgNVBAYTAlVTMRUw
# EwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20x
# ITAfBgNVBAMTGERpZ2lDZXJ0IEFzc3VyZWQgSUQgQ0EtMQIQAwGaAjr/WLFr1tXq
# 5hfwZjAJBgUrDgMCGgUAoF0wGAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAcBgkq
# hkiG9w0BCQUxDxcNMTYwNTI3MTUxNTI2WjAjBgkqhkiG9w0BCQQxFgQU5ME6UPHq
# k8DIfIvTkfZk48DjA5IwDQYJKoZIhvcNAQEBBQAEggEALj03U3g4zCJaMXUv8+4O
# uT94V53vB9kDB12pUPD8yiz4FdLRMrNBrdGe2T6uqNQ7vFeJd919SAy9JvtqXNeZ
# epsQZERRvqkQYXNTCaWge3aGb/qXfts5XxAFfQQ1d4tcUF0PWyEYjGvRAdXSKXYd
# Q0gyAQbljNJnn3jF0jLJ2SDil0lP03TFZEJltttRJsB5++r+OXvAhtiz7IKCQiBX
# 6wD8jqnpShBUfiUxF6dz7zE7CySsilaJ/cRc/D8Q+v6P5t81QOv3d6+boIuxGjZW
# 1aXBWRxY+1y3aC1QaaJQNXmSV9BOGnHOc83caFtMeY8ZoLBoORNs02qpIAKLzyTs
# 2Q==
# 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
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 accross 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 comand is
elevated to an administrative session.

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

.EXAMPLE
Install-ChocolateyEnvironmentVariable "JAVA_HOME" "d:\oracle\jdk\bin"
Creates a User environmet variable "JAVA_HOME" pointing to
"d:\oracle\jdk\bin".

.EXAMPLE
Install-ChocolateyEnvironmentVariable "_NT_SYMBOL_PATH" "symsrv*symsrv.dll*f:\localsymbols*http://msdl.microsoft.com/download/symbols" Machine
Creates a User environmet 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.

#>
param(
  [string] $variableName,
  [string] $variableValue,
  [System.EnvironmentVariableTarget] $variableType = [System.EnvironmentVariableTarget]::User
)
  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
# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCAZ8Q1k9kLsZq4g
# 6NjGJQCu9WfjMEZ5ha6Sb8BX8IN3e6CCF7cwggUwMIIEGKADAgECAhAECRgbX9W7
# ZnVTQ7VvlVAIMA0GCSqGSIb3DQEBCwUAMGUxCzAJBgNVBAYTAlVTMRUwEwYDVQQK
# EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xJDAiBgNV
# BAMTG0RpZ2lDZXJ0IEFzc3VyZWQgSUQgUm9vdCBDQTAeFw0xMzEwMjIxMjAwMDBa
# Fw0yODEwMjIxMjAwMDBaMHIxCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2Vy
# dCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xMTAvBgNVBAMTKERpZ2lD
# ZXJ0IFNIQTIgQXNzdXJlZCBJRCBDb2RlIFNpZ25pbmcgQ0EwggEiMA0GCSqGSIb3
# DQEBAQUAA4IBDwAwggEKAoIBAQD407Mcfw4Rr2d3B9MLMUkZz9D7RZmxOttE9X/l
# qJ3bMtdx6nadBS63j/qSQ8Cl+YnUNxnXtqrwnIal2CWsDnkoOn7p0WfTxvspJ8fT
# eyOU5JEjlpB3gvmhhCNmElQzUHSxKCa7JGnCwlLyFGeKiUXULaGj6YgsIJWuHEqH
# CN8M9eJNYBi+qsSyrnAx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JmbOgnxikLxLRIjN8kBLk5kz0ctdRfqGC
# Ag8wggILBgkqhkiG9w0BCQYxggH8MIIB+AIBATB2MGIxCzAJBgNVBAYTAlVTMRUw
# EwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20x
# ITAfBgNVBAMTGERpZ2lDZXJ0IEFzc3VyZWQgSUQgQ0EtMQIQAwGaAjr/WLFr1tXq
# 5hfwZjAJBgUrDgMCGgUAoF0wGAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAcBgkq
# hkiG9w0BCQUxDxcNMTYwNTI3MTUxNTI3WjAjBgkqhkiG9w0BCQQxFgQU1L6HL7Op
# INSrLG2Eg+pMyeGVfpUwDQYJKoZIhvcNAQEBBQAEggEABTQPXH7k3F+UR5tllbPm
# +gSgDtS4U1PDS8uLH4wgQDIkui6Ev0v69luNzZNKMe3GpTl4P3x5VrHiLLZb9rjj
# zLoNw8xPUwGpjctfrmxipJIiCf144FpjsDPiB1702YffgKYz69BtQCs/ath9UUar
# 8CTPjisAEcwRH476Hs0rGjcVdxMu0VE/uwdfFq8SM+efs/fvjOyM8flAadivQ+08
# I2RywQjIpwMucCjp2lW8i4lvti8IPmoQVXfvXGtHrwv3+9LfzKRHMrVOLZkTL5dz
# gIVEIkrNsO84PMK+N//XtfVKSdDXliI7mAE5X/dCB7etIkOl8JCHVCZ5qRspb5V8
# nA==
# 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
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.

.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

.EXAMPLE
C:\PS>$sublimeDir = (Get-ChildItem $env:ALLUSERSPROFILE\chocolatey\lib\sublimetext* | select $_.last)
C:\PS>$sublimeExe = "$sublimeDir\tools\sublime_text.exe"
C:\PS>Install-ChocolateyExplorerMenuItem "sublime" "Open with Sublime Text 2" $sublimeExe

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.
.EXAMPLE
C:\PS>$sublimeDir = (Get-ChildItem $env:ALLUSERSPROFILE\chocolatey\lib\sublimetext* | select $_.last)
C:\PS>$sublimeExe = "$sublimeDir\tools\sublime_text.exe"
C:\PS>Install-ChocolateyExplorerMenuItem "sublime" "Open with Sublime Text 2" $sublimeExe "directory"

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.

.NOTES
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.
#>
param(
  [string]$menuKey,
  [string]$menuLabel,
  [string]$command,
  [ValidateSet('file','directory')]
  [string]$type = "file"
)
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
# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCAX+ba4nLyN/Mqj
# XPKtWco6PwoC1lvDAVSpU59JYb/KgKCCF7cwggUwMIIEGKADAgECAhAECRgbX9W7
# ZnVTQ7VvlVAIMA0GCSqGSIb3DQEBCwUAMGUxCzAJBgNVBAYTAlVTMRUwEwYDVQQK
# EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xJDAiBgNV
# BAMTG0RpZ2lDZXJ0IEFzc3VyZWQgSUQgUm9vdCBDQTAeFw0xMzEwMjIxMjAwMDBa
# Fw0yODEwMjIxMjAwMDBaMHIxCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2Vy
# dCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xMTAvBgNVBAMTKERpZ2lD
# ZXJ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ature 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
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.

This command will run with elevated privileges.

.PARAMETER Extension
The file extension to be associated.

.PARAMETER Executable
The path to the application's executable to be associated.

.EXAMPLE
C:\PS>$sublimeDir = (Get-ChildItem $env:ALLUSERSPROFILE\chocolatey\lib\sublimetext* | select $_.last)
C:\PS>$sublimeExe = "$sublimeDir\tools\sublime_text.exe"
C:\PS>Install-ChocolateyFileAssociation ".txt" $sublimeExe

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.

#>
param(
  [string] $extension,
  [string] $executable
)
  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
# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCAoYpmWOeWeyC4O
# EAZsniLgdFtp2HeybQBTkj98Q22tFaCCF7cwggUwMIIEGKADAgECAhAECRgbX9W7
# ZnVTQ7VvlVAIMA0GCSqGSIb3DQEBCwUAMGUxCzAJBgNVBAYTAlVTMRUwEwYDVQQK
# EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xJDAiBgNV
# BAMTG0RpZ2lDZXJ0IEFzc3VyZWQgSUQgUm9vdCBDQTAeFw0xMzEwMjIxMjAwMDBa
# Fw0yODEwMjIxMjAwMDBaMHIxCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2Vy
# dCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xMTAvBgNVBAMTKERpZ2lD
# ZXJ0IFNIQTIgQXNzdXJlZCBJRCBDb2RlIFNpZ25pbmcgQ0EwggEiMA0GCSqGSIb3
# DQEBAQUAA4IBDwAwggEKAoIBAQD407Mcfw4Rr2d3B9MLMUkZz9D7RZmxOttE9X/l
# qJ3bMtdx6nadBS63j/qSQ8Cl+YnUNxnXtqrwnIal2CWsDnkoOn7p0WfTxvspJ8fT
# eyOU5JEjlpB3gvmhhCNmElQzUHSxKCa7JGnCwlLyFGeKiUXULaGj6YgsIJWuHEqH
# CN8M9eJNYBi+qsSyrnAxZjNxPqxwoqvOf+l8y5Kh5TsxHM/q8grkV7tKtel05iv+
# bMt+dDk2DZDv5LVOpKnqagqrhPOsZ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BgNVBAYTAlVTMRUw
# EwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20x
# ITAfBgNVBAMTGERpZ2lDZXJ0IEFzc3VyZWQgSUQgQ0EtMQIQAwGaAjr/WLFr1tXq
# 5hfwZjAJBgUrDgMCGgUAoF0wGAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAcBgkq
# hkiG9w0BCQUxDxcNMTYwNTI3MTUxNTI3WjAjBgkqhkiG9w0BCQQxFgQUD8pmhMmw
# TIXa7ng9l5p4E1aDnd8wDQYJKoZIhvcNAQEBBQAEggEAl3znzlX+IRmdOuBMY4S+
# 84+A8ge19eU7kCzYKPGXCYcDZk9CUtBxiyaJSaaZL8/hEWlkIlKpa4ptIBdDCPER
# mVPIjr+EyJbYGpxDcmyMlKXSMpycKL0MiAQkbqOdgDTZFrMAWIPyGjZ6gV1THOoK
# ix7ymKXqyOEmzKFfoEyVYU+QJB6M4Ou5zKAdS3Y+SRnYje+y5I5uvoDVs8N8Mbc1
# X+P9yy36ttXzAUnl7K5nZFepHA6C2phSe1sZAfZlCmqyhPs8OCIRJZEcINbqyQpR
# MZAAupGNkNViurh05v0EJy7xUus38cWG8A64urtxB3TzhNYEaM05s3R1HFEcYZ4K
# Dg==
# 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
Installs a package

.DESCRIPTION
This will run an installer (local file) on your machine.

.PARAMETER PackageName
The name of the package - this is arbitrary, call it whatever you want.
It's recommended you call it the same as your nuget 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 installer.
Try any of these to get the silent installer - /s /S /q /Q /quiet /silent /SILENT /VERYSILENT
With msi it is always /quiet.
If you don't pass anything it will invoke the installer with out any arguments. That means a nonsilent installer.

Please include the notSilent tag in your chocolatey nuget package if you are not setting up a silent package.

.PARAMETER File
The full path to the native installer to run

.EXAMPLE
Install-ChocolateyInstallPackage '__NAME__' 'EXE_OR_MSI' 'SILENT_ARGS' 'FilePath'

.OUTPUTS
None

.NOTES
This helper reduces the number of lines one would have to write to run an installer to 1 line.
There is no error handling built into this method.

.LINK
Install-ChocolateyPackage
#>
param(
  [string] $packageName,
  [alias("installerType")][string] $fileType = 'exe',
  [string] $silentArgs = '',
  [string] $file,
  $validExitCodes = @(0),
  [switch] $onlyUsePackageSilentArgs
)
  Write-Debug "Running 'Install-ChocolateyInstallPackage' for $packageName with file:`'$file`', args: `'$silentArgs`', fileType: `'$fileType`', validExitCodes: `'$validExitCodes`' ";
  $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) {
    throw 'Package parameters incorrect, FileType cannot be empty.'
  }
  $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`'"
  }

  $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
# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCApGQKsVCz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xFgQUldoiWnUr
# /BxV2RXW2terE03nZ8owDQYJKoZIhvcNAQEBBQAEggEAm+J90ZDaBI41V1ZHsR4H
# CGCEPC7kdPltgpmXsGBR3bEIdElCZUAbIlJAIXlWT5+UXSs7kLvhN1bsxgva0qXg
# lvnZzDh+neNkmz3yR2JNiyZgMdGtyUBJBnArAKK+5y4EM/ISBsR/14aRQfTpCKeL
# cYAamPyaNpbeOv6s6843vPiOCe5jOv93OxqHV1YzelVCIKnw61w1PebVRL4uZgjB
# Z4p7MueUAKS8XCIvAoZ5X3MdG5c1zuG6HVGPpULBUWb8J++Hzb0tn4zXcAV0DH9M
# pDLMIZuRM+3KjaP7wPS60YpCHrEdwggFVq2Dz6iVF0eoiPSPLsQi0FvCTCVtI8I4
# aQ==
# 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
Installs a package

.DESCRIPTION
This will download a file from a url and install it on your machine.

.PARAMETER PackageName
The name of the package we want to download - this is arbitrary, call it whatever you want.
It's recommended you call it the same as your nuget 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 installer.
Try any of these 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 will invoke the installer with out any arguments. That means a nonsilent installer.

Please include the notSilent tag in your chocolatey nuget package if you are not setting up a silent package.

.PARAMETER Url
This is the url to download the file from.

.PARAMETER Url64bit
OPTIONAL - If there is an x64 installer to download, please include it here. If not, delete this parameter

.PARAMETER Checksum
OPTIONAL (Right now) - This allows a checksum to be validated for files that are not local

.PARAMETER Checksum64
OPTIONAL (Right now) - This allows a checksum to be validated for files that are not local

.PARAMETER ChecksumType
OPTIONAL (Right now) - 'md5', 'sha1', 'sha256' or 'sha512' - defaults to 'md5'

.PARAMETER ChecksumType64
OPTIONAL (Right now) - 'md5', 'sha1', 'sha256' or 'sha512' - defaults to ChecksumType

.PARAMETER options
OPTIONAL - Specify custom headers

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 'package' 'https://somelocation.com/thefile.exe' -options $options

.EXAMPLE
Install-ChocolateyPackage '__NAME__' 'EXE_OR_MSI' 'SILENT_ARGS' 'URL' '64BIT_URL_DELETE_IF_NO_64BIT'

.OUTPUTS
None

.NOTES
This helper reduces the number of lines one would have to write to download and install a file to 1 line.
This method has error handling built into it.

.LINK
Get-ChocolateyWebFile
Install-ChocolateyInstallPackage
#>
param(
  [string] $packageName,
  [alias("installerType")][string] $fileType = 'exe',
  [string] $silentArgs = '',
  [string] $url,
  [alias("url64")][string] $url64bit = '',
  $validExitCodes = @(0),
  [string] $checksum = '',
  [string] $checksumType = '',
  [string] $checksum64 = '',
  [string] $checksumType64 = '',
  [hashtable] $options = @{Headers=@{}}
)

  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
}

# SIG # Begin signature block
# MIIcrQYJKoZIhvcNAQcCoIIcnjCCHJoCAQExDzANBglghkgBZQMEAgEFADB5Bgor
# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCDEdPoOEXs046IP
# 2mUvutoDwJTryX1WfDrO0TvGdRTEpqCCF7cwggUwMIIEGKADAgECAhAECRgbX9W7
# ZnVTQ7VvlVAIMA0GCSqGSIb3DQEBCwUAMGUxCzAJBgNVBAYTAlVTMRUwEwYDVQQK
# EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xJDAiBgNV
# BAMTG0RpZ2lDZXJ0IEFzc3VyZWQgSUQgUm9vdCBDQTAeFw0xMzEwMjIxMjAwMDBa
# Fw0yODEwMjIxMjAwMDBaMHIxCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2Vy
# dCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xMTAvBgNVBAMTKERpZ2lD
# ZXJ0IFNIQTIgQXNzdXJlZCBJRCBDb2RlIFNpZ25pbmcgQ0EwggEiMA0GCSqGSIb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d+gIILdDQTkN54GJO831mdF57iHwCpZf+NsksvpywbngOpyyEop9q1Bn1B
# txwK8egKG/jCCwLB5pvbYXlwQSGuv+gNbYp49/HO3M6/ED61th1YBG/P1zb+VC7z
# VxpDu8rZCnpOh1Adc9pePSiPRxmurvHk0EuAOhB5GPOrzKbWnTbw3/p/5KEjkdXH
# ZCcKtrvok+583tUPMA6EDnaYlkeHP944KIXAx8J8yj48Q6GfqTpiJSqw9HbOl6GC
# Ag8wggILBgkqhkiG9w0BCQYxggH8MIIB+AIBATB2MGIxCzAJBgNVBAYTAlVTMRUw
# EwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20x
# ITAfBgNVBAMTGERpZ2lDZXJ0IEFzc3VyZWQgSUQgQ0EtMQIQAwGaAjr/WLFr1tXq
# 5hfwZjAJBgUrDgMCGgUAoF0wGAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAcBgkq
# hkiG9w0BCQUxDxcNMTYwNTI3MTUxNTI3WjAjBgkqhkiG9w0BCQQxFgQUZYnvkCyE
# F/oOZuXRDksn5k00Dp8wDQYJKoZIhvcNAQEBBQAEggEAPcaQDP9rFQfTKUQeJwt8
# PP6oAHTpQgSfSaYOj5VxdmN7vFfAejsJbDvFdrho5D4/Zl+Itr+kZfeY4AHDIAkR
# eOz4pPRBt2LtY2c/sJSwcf04fqgLQGc1dSyVrZQ9m4sTrjTXL6cblhZP9iZCjQyE
# uv6jtS8L1F6SzfJZxISbBEw8a5UnAQMI1RjdV3+iK1sVkScGKO752RB00nAbqInK
# 5zO+N5b+IriBV8dKJNsyTBGA8u1TrRIW0uVGRQRg0tfmpGHJJBApD4aJREHloIME
# MvXButNoRHiDqr6a59kA0XSyoLWDCWdnud+63vMQcR34bxW4ql9i6vcMs9xLMrD/
# 7w==
# 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 {
param(
  [string] $pathToInstall,
  [System.EnvironmentVariableTarget] $pathType = [System.EnvironmentVariableTarget]::User
)
  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
# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCA7FWVtHpwkeqEd
# yII3zAvd8g4jgGGeSeVnyUY0zlinmqCCF7cwggUwMIIEGKADAgECAhAECRgbX9W7
# ZnVTQ7VvlVAIMA0GCSqGSIb3DQEBCwUAMGUxCzAJBgNVBAYTAlVTMRUwEwYDVQQK
# EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xJDAiBgNV
# BAMTG0RpZ2lDZXJ0IEFzc3VyZWQgSUQgUm9vdCBDQTAeFw0xMzEwMjIxMjAwMDBa
# Fw0yODEwMjIxMjAwMDBaMHIxCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2Vy
# dCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xMTAvBgNVBAMTKERpZ2lD
# ZXJ0IFNIQTIgQXNzdXJlZCBJRCBDb2RlIFNpZ25pbmcgQ0EwggEiMA0GCSqGSIb3
# DQEBAQUAA4IBDwAwggEKAoIBAQD407Mcfw4Rr2d3B9MLMUkZz9D7RZmxOttE9X/l
# qJ3bMtdx6nadBS63j/qSQ8Cl+YnUNxnXtqrwnIal2CWsDnkoOn7p0WfTxvspJ8fT
# eyOU5JEjlpB3gvmhhCNmElQzUHSxKCa7JGnCwlLyFGeKiUXULaGj6YgsIJWuHEqH
# CN8M9eJNYBi+qsSyrnAxZjNxPqxwoqvOf+l8y5Kh5TsxHM/q8grkV7tKtel05iv+
# bMt+dDk2DZDv5LVOpKnqag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8MIIB+AIBATB2MGIxCzAJBgNVBAYTAlVTMRUw
# EwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20x
# ITAfBgNVBAMTGERpZ2lDZXJ0IEFzc3VyZWQgSUQgQ0EtMQIQAwGaAjr/WLFr1tXq
# 5hfwZjAJBgUrDgMCGgUAoF0wGAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAcBgkq
# hkiG9w0BCQUxDxcNMTYwNTI3MTUxNTI3WjAjBgkqhkiG9w0BCQQxFgQUVm0peCoE
# ojpcDz9s5P2TyFHY19UwDQYJKoZIhvcNAQEBBQAEggEATRlHjS/iIBUKI6ni5N5Q
# CmBsGzzO5JmVirKC4H0Yo+w5vpkg4wS+JZvQjU4kbgJAF/AK5PDV6/JeI8iiqmGW
# TpLeLpzkrtgH5N9OMGiTnYLTQXDVUXowf282p4IFTQFu7RhUoWLpIUyzaH9g76Qy
# 3onpjXO0pGLpnMvWRiXzyT0IPwZEOsqooyLXIQ3MmJbASKYaKPsuTO/r03QuncT/
# vnxcJZ79sPsimBKHd2JQIEtEhaepi8GY8vM7pExg4Aequ13hklv7HzhZ6S4mLixw
# GdB3kKkf0rxMvxLEOtVSmrXusfzC9QriP8x3gt9yTk50WTvRD3zTEGcXr64iuKkH
# OA==
# 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.

.PARAMETER TargetFilePath
The path to the application that should be launched when clicking on the task bar icon.

.EXAMPLE
Install-ChocolateyPinnedTaskBarItem "${env:ProgramFiles(x86)}\Microsoft Visual Studio 11.0\Common7\IDE\devenv.exe"

This will create a Visual Studio task bar icon.

#>
param(
  [string] $targetFilePath
)

  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
# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCBtRy94W/nrUb6J
# vtbsI9RHHsHYuNkUJjOQxGVMELiig6CCF7cwggUwMIIEGKADAgECAhAECRgbX9W7
# ZnVTQ7VvlVAIMA0GCSqGSIb3DQEBCwUAMGUxCzAJBgNVBAYTAlVTMRUwEwYDVQQK
# EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xJDAiBgNV
# BAMTG0RpZ2l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VZEi17hKz4RF2JO68qpxtcogvCZo6T7xPNIYzyQWWp+CSeakl2rz9h
# 2OsNUfVGH6YtJMPBP5th+SLLaH360cRHQJrlRhcqbWSp9+5pKaQNHTcorGippxOO
# OiPtuZ1EWHQJKoLAsq6Y2lB6IkIeu8yS4+cwcF1kNxCEV7jYZDUDXnCwD6R78B6C
# Uw==
# 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 {
param(
  [string] $packageName,
  [string] $psFileFullPath,
  [string] $url ='',
  [alias("url64")][string] $url64bit = '',
  [string] $checksum = '',
  [string] $checksumType = '',
  [string] $checksum64 = '',
  [string] $checksumType64 = ''
)
  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
  }

  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
# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCC2uR0R+7oU8KEA
# qRsTRiEEWR02kr6SyM/LlwyJcNAKK6CCF7cwggUwMIIEGKADAgECAhAECRgbX9W7
# ZnVTQ7VvlVAIMA0GCSqGSIb3DQEBCwUAMGUxCzAJBgNVBAYTAlVTMRUwEwYDVQQK
# EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xJDAiBgNV
# BAMTG0RpZ2lDZXJ0IEFzc3VyZWQgSUQgUm9vdCBDQTAeFw0xMzEwMjIxMjAwMDBa
# Fw0yODEwMjIxMjAwMDBaMHIxCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2Vy
# dCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xMTAvBgNVBAMTKERpZ2lD
# ZXJ0IFNIQTIgQXNzdXJlZCBJRCBDb2RlIFNpZ25pbmcgQ0EwggEiMA0GCSqGSIb3
# DQEBAQUAA4IBDwAwggEKAoIBAQD407Mcfw4Rr2d3B9MLMUkZz9D7RZmxOttE9X/l
# qJ3bMtdx6nadBS63j/qSQ8Cl+YnUNxnXtqrwnIal2CWsDnkoOn7p0WfTxvspJ8fT
# eyOU5JEjlpB3gvmhhCNmElQzUHSxKCa7JGnCwlLyFGeKiUXULaGj6YgsIJWuHEqH
# C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c9Nro87mCZ4V8xNCfXEcxZBHR6q8KnG53cm0fwY6BTfarGd6qGC
# Ag8wggILBgkqhkiG9w0BCQYxggH8MIIB+AIBATB2MGIxCzAJBgNVBAYTAlVTMRUw
# EwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20x
# ITAfBgNVBAMTGERpZ2lDZXJ0IEFzc3VyZWQgSUQgQ0EtMQIQAwGaAjr/WLFr1tXq
# 5hfwZjAJBgUrDgMCGgUAoF0wGAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAcBgkq
# hkiG9w0BCQUxDxcNMTYwNTI3MTUxNTI4WjAjBgkqhkiG9w0BCQQxFgQU35f2G/FL
# WzEwShCjY2GvTlqBTxgwDQYJKoZIhvcNAQEBBQAEggEAXyuGQI1Q8XNMdqSTBVDX
# Nca2gXBmi6OT7vRKLw0t8E6gMvRSOycx1P/clvN0uUwPk3FD8KFPLq3fcTtn92Us
# xLCV5Ru9pAcqdAN+vxEPAqPfl6m8f7dVFdYEEV4fx339cqXB07d2Q/4+SbTbw6/N
# IXcQxoD+4Evq6UrgeOFTAqbhbvYAsU7gtD19L3XQTJmgfM1giq/jv1axSIt/ATw+
# 7l5GJMJzqyQQ8uEtdrEOT1UUdKvL6APsxRpjof3IfQhxty/Cj96Jx2SGZNTHa/Hb
# iSfsq3Au/Ig7VefLfr7hZ7A9MuIet00N7ryu40089W2Jjv2gqX0fQtWEmEbSTxUt
# eQ==
# 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
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.

.PARAMETER ShortcutFilePath
The full absolute path to where the shortcut should be created.  This is mandatory.

.PARAMETER TargetPath
The full absolute path to the target for new shortcut.  This is mandatory.

.PARAMETER WorkingDirectory
The full absolute path of the Working Directory that will be used by 
the new shortcut.  This is optional

.PARAMETER Arguments
Additonal arguments that should be passed along to the new shortcut.  This 
is optional.

.PARAMETER IconLocation
The full absolute path to an icon file to be used for the new shortcut.  This
is optional.

.PARAMETER Description
A text description to be associated with the new description.  This is optional.

.EXAMPLE
Install-ChocolateyShortcut -shortcutFilePath "C:\test.lnk" -targetPath "C:\test.exe"

This will create a new shortcut at the location of "C:\test.lnk" and link to the file
located at "C:\text.exe"

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

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.

#>
	param(
	  [string] $shortcutFilePath,
	  [string] $targetPath,
	  [string] $workingDirectory,
	  [string] $arguments,
	  [string] $iconLocation,
	  [string] $description
	)

	Write-Debug "Running 'Install-ChocolateyShortcut' with parameters ShortcutFilePath: `'$shortcutFilePath`', TargetPath: `'$targetPath`', WorkingDirectory: `'$workingDirectory`', Arguments: `'$arguments`', IconLocation: `'$iconLocation`', Description: `'$description`'";

	# 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) {
	  throw "Install-ChocolateyShortcut - `$shortcutFilePath can not be null."
	}
	
	$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
		}
	   
	    $lnk.Save()
		
		Write-Debug "Shortcut created."
	}
	catch {
		Write-Warning "Unable to create shortcut. Error captured was $($_.Exception.Message)."
	}
}


# SIG # Begin signature block
# MIIcrQYJKoZIhvcNAQcCoIIcnjCCHJoCAQExDzANBglghkgBZQMEAgEFADB5Bgor
# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCDfHG5EME88kKJL
# SY4D4oK4P39kz2UVz16kVNzQ87aJ6qCCF7cwggUwMIIEGKADAgECAhAECRgbX9W7
# ZnVTQ7VvlVAIMA0GCSqGSIb3DQEBCwUAMGUxCzAJBgNVBAYTAlVTMRUwEwYDVQQK
# Ewx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NsgWaTWq
# MQszYz7dOVcTOqUnlkLQkkS9VQcpWfb2x5RIh92jf8My0DgjZNXCsjvbk+fDUB8j
# T9M/0XBMT4SiDh+aAgnmVAtjMhWfXlzKvuWRbZnNsFpd8FlbNY+FUHyoQA/cFRIy
# eBwDhgiXHGu8doeKGDhG3n3P7KhSihw5XiF4oNxXxmqQ7RiS2vH9ZAyeCMbYGwKt
# 2Ek3YvW6Ne2w1RcZif7lEjl9IRgzAgcd3j71/TPN3Pk/Cfn7m0IhF5sWzLvtXWYI
# pA==
# 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

.PARAMETER PackageName
The name of the package we want to download - this is
arbitrary, call it whatever you want. It's recommended
you call it the same as your nuget package id.

.PARAMETER VsixUrl
The URL of the package to be installed

.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 (Right now) - This allows a checksum to be validated for files that are not local

.PARAMETER ChecksumType
OPTIONAL (Right now) - 'md5', 'sha1', 'sha256' or 'sha512' - defaults to 'md5'

.EXAMPLE
Install-ChocolateyVsixPackage "MyPackage" http://visualstudiogallery.msdn.microsoft.com/ea3a37c9-1c76-4628-803e-b10a109e7943/file/73131/1/AutoWrockTestable.vsix

This downloads the AutoWrockTestable VSIX from the Visual Studio Gallery and installs it to the latest version of VS.

.EXAMPLE
Install-ChocolateyVsixPackage "MyPackage" http://visualstudiogallery.msdn.microsoft.com/ea3a37c9-1c76-4628-803e-b10a109e7943/file/73131/1/AutoWrockTestable.vsix 11

This downloads the AutoWrockTestable VSIX from the Visual Studio Gallery and installs it to Visual Studio 2012 (v11.0).

.NOTES
VSIX packages are Extensions for the Visual Studio IDE.
The Visual Sudio 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.

#>
param(
  [string]$packageName,
  [string]$vsixUrl,
  [int]$vsVersion=0,
  [string] $checksum = '',
  [string] $checksumType = ''
)
    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
        }
        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."
    }
}

function Install-Vsix($installer, $installFile) {
    Write-Host "Installing $installFile using $installer"

    if ($env:chocolateyPackageName -ne $null -and $env:chocolateyPackageName -eq $env:ChocolateyInstallDirectoryPackage) {
      Write-Warning "Install Directory override not available for VSIX packages."
    }

    $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
# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCAkffTnBUATu0JU
# N8jCVCsvKadXDgFYhr+UQdGmRW1GCqCCF7cwggUwMIIEGKADAgECAh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AnQ39YQW+8ZroRoJUnq2Z
# JQkyQ+2OlaV8P4SOuuO1tfqm69KG2DQdSK4VQt3OzJDlOGP+ddPzYtNYpULRLyYH
# htz2On4BZlOKlBeV5i3IMrLfabWoorI8n+Xqafdf6I11Az8wOIgS9YtzK6nysFly
# tR8l4VlRLf/WbyqdNec3T4/sbcAH6ZeU1eaDQiJ4Bq8Ywr/0M62EvISN7o+1JZZZ
# hNO3jIjPLTXL5ByUTPW+CPgwAz/q1k+Ss8+OLBSZlDJUieFpW0neV88MQnyBsnEF
# xQJvXPOCgv7rX5a2caRyA9IMduscoRkuEZq12wCEUoOaTyiQQihhtBCytQKvNhHC
# Bw==
# 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 and unzips a package

.DESCRIPTION
This will download a file from a url and unzip it on your machine.

.PARAMETER PackageName
The name of the package we want to download - this is arbitrary, call it whatever you want.
It's recommended you call it the same as your nuget package id.

.PARAMETER Url
This is the url to download the file from.

.PARAMETER Url64bit
OPTIONAL - If there is an x64 installer to download, please include it here. If not, delete this parameter

.PARAMETER UnzipLocation
This is a location to unzip the contents to, most likely your script folder.

.PARAMETER Checksum
OPTIONAL (Right now) - This allows a checksum to be validated for files that are not local

.PARAMETER Checksum64
OPTIONAL (Right now) - This allows a checksum to be validated for files that are not local

.PARAMETER ChecksumType
OPTIONAL (Right now) - 'md5', 'sha1', 'sha256' or 'sha512' - defaults to 'md5'

.PARAMETER ChecksumType64
OPTIONAL (Right now) - 'md5', 'sha1', 'sha256' or 'sha512' - defaults to ChecksumType

.PARAMETER options
OPTIONAL - Specify custom headers

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 'package' 'https://somelocation.com/thefile.exe' -options $options

.EXAMPLE
Install-ChocolateyZipPackage '__NAME__' 'URL' "$(Split-Path -parent $MyInvocation.MyCommand.Definition)"

.OUTPUTS
None

.NOTES
This helper reduces the number of lines one would have to write to download and unzip a file to 1 line.
This method has error handling built into it.

.LINK
  Get-ChocolateyWebFile
  Get-ChocolateyUnzip
#>
param(
  [string] $packageName,
  [string] $url,
  [string] $unzipLocation,
  [alias("url64")][string] $url64bit = '',
  [string] $specificFolder ="",
  [string] $checksum = '',
  [string] $checksumType = '',
  [string] $checksum64 = '',
  [string] $checksumType64 = '',
  [hashtable] $options = @{Headers=@{}}
)
  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
# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCAzeF/bfdUuxy10
# L4R4GtP3wMpRJSX7XPio3x7F4dK6SqCCF7cwggUwMIIEGKADAgECAhAECRgbX9W7
# ZnVTQ7VvlVAIMA0GCSqGSIb3DQEBCwUAMGUxCzAJBgNVBAYTAlVTMRUwEwYDVQQK
# EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xJDAiBgNV
# BAMTG0RpZ2lDZXJ0IEFzc3VyZWQgSUQgUm9vdCBDQTAeFw0xMzEwMjIxMjAwMDBa
# Fw0yODEwMjIxMjAwMDBaMHIxCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2Vy
# dCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xMTAvBgNVBAMTKERpZ2lD
# ZXJ0IFNIQTIgQXNzdXJlZCBJRCBDb2RlIFNpZ25pbmcgQ0EwggEiMA0GCSqGSIb3
# DQEBAQUAA4IBDwAwggEKAoIBAQD407Mcfw4Rr2d3B9MLMUkZz9D7RZmxOttE9X/l
# qJ3bMtdx6nadBS63j/qSQ8Cl+YnUNxnXtqrwnIal2CWsDnkoOn7p0WfTxvspJ8fT
# eyOU5JEjlpB3gvmhhCNmElQzUHSxKCa7JGnCwlLyFGeKiUXULaGj6YgsIJWuHEqH
# CN8M9eJNYBi+qsSyrnAxZjNxPqxwoqvOf+l8y5Kh5TsxHM/q8grkV7tKtel05iv+
#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kqhkiG9w0BCQYxggH8MIIB+AIBATB2MGIxCzAJBgNVBAYTAlVTMRUw
# EwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20x
# ITAfBgNVBAMTGERpZ2lDZXJ0IEFzc3VyZWQgSUQgQ0EtMQIQAwGaAjr/WLFr1tXq
# 5hfwZjAJBgUrDgMCGgUAoF0wGAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAcBgkq
# hkiG9w0BCQUxDxcNMTYwNTI3MTUxNTI4WjAjBgkqhkiG9w0BCQQxFgQUW9hHHpcY
# 0iOIjuaNIx934hrTeXUwDQYJKoZIhvcNAQEBBQAEggEAZfnZp6qhkOv5wl8db5nX
# jtkW9h3PAa2C4CLsJhn16x6R5eAi4eIhJH+zoSOSYK6miGfWN2pTDZ/4B70DHwU3
# YPaf4y7CD8ePsDHHUuDwl4fBgJMjUX/N5KhqJ88H8MafesYUmQbU492DR8T//VAh
# Du2SAunWTwfu++XccXA/KF0R4H1A12+7leWufP21oN10OtBduxxpa0PUJVvnHxnH
# 7NpVEPhhoyADZqR655ZKTrnFzy8UxEG7ttFR1PWR1o9jbO2K2Ho1NZWiLCeOscD/
# IhCd/8PBSD67qDHo2o/USLbxJxo+jV6w0CoTiSb3oWtWMuuO7IxsSa6HRq0KqR8V
# 6g==
# 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([string] $Name, [string] $Value, [System.EnvironmentVariableTarget] $Scope) {
	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
# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCCTOW/E1Z/aXhKG
# z2RUZb3X+7pTdqG24sSqX589pEWKFKCCF7cwggUwMIIEGKADAgECAhAECRgbX9W7
# ZnVTQ7VvlVAIMA0GCSqGSIb3DQEBCwUAMGUxCzAJBgNVBAYTAlVTMRUwEwYDVQQK
# EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xJDAiBgNV
# BAMTG0RpZ2lDZXJ0IEFzc3VyZWQgSUQgUm9vdCBDQTAeFw0xMzEwMjIxMjAwMDBa
# Fw0yODEwMjIxMjAwMDBaMHIxCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2Vy
# dCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xMTAvBgNVBAMTKERpZ2lD
# ZXJ0IFNIQTIgQXNzdXJlZCBJRCBDb2RlIFNpZ25pbmcgQ0EwggEiMA0GCSqGSIb3
# DQEBAQUAA4IBDwAwggEKAoIBAQD407Mcfw4Rr2d3B9MLMUkZz9D7RZmxOttE9X/l
# qJ3bMtdx6nadBS63j/qSQ8Cl+YnUNxnXtqrwnIal2CWsDnkoOn7p0WfTxvspJ8fT
# eyOU5JEjlpB3g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UPt9UQpbcSOJ5Bb5J2WTdSqWy4N323z+cLNw
# DtJLPfSIEpzIbcy4yoeaGVQ311OO6VG5URS/Xs1SLVCiqHoEzzYHSG1HwvIiSqGC
# Ag8wggILBgkqhkiG9w0BCQYxggH8MIIB+AIBATB2MGIxCzAJBgNVBAYTAlVTMRUw
# EwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20x
# ITAfBgNVBAMTGERpZ2lDZXJ0IEFzc3VyZWQgSUQgQ0EtMQIQAwGaAjr/WLFr1tXq
# 5hfwZjAJBgUrDgMCGgUAoF0wGAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAcBgkq
# hkiG9w0BCQUxDxcNMTYwNTI3MTUxNTI4WjAjBgkqhkiG9w0BCQQxFgQUZZGg2C9x
# WP/4qEh/Vh11VxOdFHwwDQYJKoZIhvcNAQEBBQAEggEAm2H2Pdl2JGNUY1abU1jP
# +WmsWGYShnC5bxNqgLurTxG4ezTccvtpd3UspGBnWGz5gdSTgZ7TlFo5nX5u3ggP
# PhEgA5MtDTs3nLfOtxFvjZOev9hLe4F4LS66FGDrY0b6RN1Rs+/HXLThXryY7aOq
# 1cFQS+WovBHnD+OBNDlrRz2VccWtejsgyAENayhCCD7kEqiVoK/U6VVeQZpgMTfT
# aHWFB0jFLknsTB69psbatMJ+bWnUmmdj1bESIbiWvkpwGK74C3FwtvjjrLtSCXq/
# JGk0PtriFewnNxeUG+8DFOmOoVimT/HnE+xFuc9mTQCDVfhZBedwetzXy9ZgsLWl
# Og==
# 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 {
param (
  [int]$exitCode
)

  $host.SetShouldExit($exitCode); 
  $env:ChocolateyExitCode = $exitCode;
}
# SIG # Begin signature block
# MIIcrQYJKoZIhvcNAQcCoIIcnjCCHJoCAQExDzANBglghkgBZQMEAgEFADB5Bgor
# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCCuY8DnzWPljZll
# GscMlRY87Q0+ZiupBx8YaCTsMKTRrKCCF7cwggUwMIIEGKADAgECAhAECRgbX9W7
# ZnVTQ7VvlVAIMA0GCSqGSIb3DQEBCwUAMGUxCzAJBgNVBAYTAlVTMRUwEwYDVQQK
# EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xJDAiBgNV
# BAMTG0RpZ2lDZXJ0IEFzc3VyZWQgSUQgUm9vdCBDQTAeFw0xMzEwMjIxMjAwMDBa
# Fw0yODEwMjIxMjAwMDBaMHIxCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2Vy
# dCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xMTAvBgNVBAMTKERpZ2lD
# ZXJ0IFNIQTIgQXNzdXJlZCBJRCBDb2RlIFNpZ25pbmcgQ0EwggEiMA0GCSqGSIb3
# DQEBAQUAA4IBDwAwggEKAoIBAQD407Mcfw4Rr2d3B9MLMUkZz9D7RZmxOttE9X/l
# qJ3bMtdx6nadBS63j/qSQ8Cl+YnUNxnXtqrwnIal2CWsDnkoOn7p0WfTxvspJ8fT
# eyOU5JEjlpB3gvmhhCNmElQzUHSxKCa7JGnCwlLyFGeKiUXULaGj6YgsIJWuHEqH
# CN8M9eJNYBi+qsSyrnAxZjNxPqxwoqvOf+l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Fgnfyz3K5X+46GC
# Ag8wggILBgkqhkiG9w0BCQYxggH8MIIB+AIBATB2MGIxCzAJBgNVBAYTAlVTMRUw
# EwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20x
# ITAfBgNVBAMTGERpZ2lDZXJ0IEFzc3VyZWQgSUQgQ0EtMQIQAwGaAjr/WLFr1tXq
# 5hfwZjAJBgUrDgMCGgUAoF0wGAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAcBgkq
# hkiG9w0BCQUxDxcNMTYwNTI3MTUxNTI4WjAjBgkqhkiG9w0BCQQxFgQUS+y0Hick
# zzN5PT7N6RTR9cLKmlYwDQYJKoZIhvcNAQEBBQAEggEAcgF7gZXeJXIvBbs7MY9+
# a5LI2iKNixpkLPNhNaactgtzcnHWiTg4bE6NqXsGMgeO/97FWBwJYBdto1eptTWb
# S6mK/cGEvDRexEPgCOR9SlWFKu7m5E4FxJ8iMvLMZFabql7erMgxYUhZKbQpEs1h
# O9FsQJpkMTEpHp7ArvWSZ66rUn1j/LK9Uipf0ldnmHRVk2lE5zwzPWkJZUug9IoI
# wM/0a/1+cBX883uUBKVcyzRMQHfDT4CI39EEusYTwPaYC8ehj1xn7QJBdsKdssdX
# JM3POA5t3lGrJqnIRCAWhWbucUMq6DIlXR21oL4iVzPUaRAk3+7YIuQ0T68977ft
# 3A==
# 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 {
param(
  [string] $statements,
  [string] $exeToRun = 'powershell',
  [switch] $minimized,
  [switch] $noSleep,
  $validExitCodes = @(0)
)
  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
# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCCBnKdLXk2+D2Uu
# 6Xj6xWomfQXLGF3w+Aa/QUr2MYn3S6CCF7cwggUwMIIEGKADAgECAhAECRgbX9W7
# ZnVTQ7VvlVAIMA0GCSqGSIb3DQEBCwUAMGUxCzAJBgNVBAYTAlVTMRUwEwYDVQQK
# EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xJDAiBgNV
# BAMTG0RpZ2lDZXJ0IEFzc3VyZWQgSUQgUm9vdCBDQTAeFw0xMzEwMjIxMjAwMDBa
# Fw0yODEwMjIxMjAwMDBaMHIxCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2Vy
# dCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xMTAvBgNVBAMTKERpZ2lD
# ZXJ0IFNIQTIgQXNzdXJlZCBJRCBDb2RlIFNpZ25pbmcgQ0EwggEiMA0GCSqGSIb3
# DQEBAQUAA4IBDwAwggEKAoIBAQD407Mcfw4Rr2d3B9MLMUkZz9D7RZmxOttE9X/l
# qJ3bMtdx6nadBS63j/qSQ8Cl+YnUNxnXtqrwnIal2CWsDnkoOn7p0WfTxvspJ8fT
# eyOU5JEjlpB3gvmhhCNmElQzUHSxKCa7JGnCwlLyFGeKiUXULaGj6YgsIJWuHEqH
# CN8M9eJNYBi+qs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7jvbimCA/LpuFWlALxKufbAkO4D6GC
# Ag8wggILBgkqhkiG9w0BCQYxggH8MIIB+AIBATB2MGIxCzAJBgNVBAYTAlVTMRUw
# EwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20x
# ITAfBgNVBAMTGERpZ2lDZXJ0IEFzc3VyZWQgSUQgQ0EtMQIQAwGaAjr/WLFr1tXq
# 5hfwZjAJBgUrDgMCGgUAoF0wGAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAcBgkq
# hkiG9w0BCQUxDxcNMTYwNTI3MTUxNTI5WjAjBgkqhkiG9w0BCQQxFgQUT8ChRKjz
# IcLSMSrMlhRCuFnU8yUwDQYJKoZIhvcNAQEBBQAEggEALvTzhDwvwcRsyEwJ6oLc
# UHK/60Dxjl0W0n/g9FQvB8i40GAj44Rkwo7NymapnPNMWnCGazK3lBa42YIPzIjf
# BZGIff4JW+nLo3YtvHdF/FoxaihG4d5iYPNBJWShyT/arE8qawY1JaF52xioEe0d
# Qf9s6B4mwst4X5seqQsHqf2kgLHKKFvlm0qYtM2Yze8SfO3AJ7/AeA2XkbDy/NcZ
# rucd6ihUgWUFwYI2iyQrKs6E2l+zxXrRhPK3SfmwkYZJHnDGQwoBZytLxGkh7E2R
# 3+u5TcajtpIVfiqqbncMWAKHhqo5roolF1giF9xvFsHfhtgz5vhJxgi/Vjf0F6p3
# jA==
# 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, i.e. if it returns $true, the process is
running elevated.

.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
# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCC1HKnKHecvV5eM
# H6F3kx9YMMbv1wshjxqkHsWu6F3/UaCCF7cwggUwMIIEGKADAgECAhAECRgbX9W7
# ZnVTQ7VvlVAIMA0GCSqGSIb3DQEBCwUAMGUxCzAJBgNVBAYTAlVTMRUwEwYDVQQK
# EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xJDAiBgNV
# BAMTG0RpZ2lDZXJ0IEFzc3VyZWQgSUQgUm9vdCBDQTAeFw0xMzEwMjIxMjAwMDBa
# Fw0yODEwMjIxMjAwMDBaMHIxCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2Vy
# dCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xMTAvBgNVBAMTKERpZ2lD
# ZXJ0IFNIQTIgQXNzdXJlZCBJRCBDb2RlIFNpZ25pbmcgQ0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rqMn
# +YJMIe66UO4P6xhZ41+kN2SAswtvVMQrLA//a8KyHmitLcS/OqeRaTOyj4K30MeL
# MN3lx9ej1Yf45GUQBGbABe96e/fnWxO5dyqXhQCVZ4v0++U+l7zfZd7aVPS/rLio
# 6SjwAjsdggRP//e5gk4f8fI+NWbOYMofmZprQwEG3RzcYBaoqKVWqRKzxK2ZnvGa
# q/2fuIJ2dONHyM6dnQQP+yciPZhExdOmu3H3nv5F+rVZ4t1cYRqYhnVX/xf0DaGC
# Ag8wggILBgkqhkiG9w0BCQYxggH8MIIB+AIBATB2MGIxCzAJBgNVBAYTAlVTMRUw
# EwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20x
# ITAfBgNVBAMTGERpZ2lDZXJ0IEFzc3VyZWQgSUQgQ0EtMQIQAwGaAjr/WLFr1tXq
# 5hfwZjAJBgUrDgMCGgUAoF0wGAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAcBgkq
# hkiG9w0BCQUxDxcNMTYwNTI3MTUxNTI5WjAjBgkqhkiG9w0BCQQxFgQUAFAI5H/F
# WwZIXiQ7sCuyvJpBExAwDQYJKoZIhvcNAQEBBQAEggEAO/WsNzbe9grHfk/Yztb2
# K2R6cCqKzGepHfbPSy/pxp1qGAkkdiioHM428ngfdXUkW6ymKvoqGmg3BCWajOS0
# 7efzbjMPzymL4u/a7Yguo1iYoUqqqLNBYCAytHnGMCoqj2gsOFTl3XSuBTT1sCwB
# J1UZUO6lPyxlgCk5cEIeTYWana00g61N7iUwHIGteZYMVztROL5l+J0829xABGCR
# XMvRQq7PpVEp19pPISDFCGIojHEElrwcOWFp5uM/hvM0dR5n25gYjfiRy6nNGwxM
# UnF3YAXSyDB8S8/KF8FP7psS/BqJmP4x0BV1WQARf6Fr0X5PBE5lLG0Zg4UMb5a6
# dg==
# 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 {
param(
  [string] $name, 
  [string] $path
)
  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
# MIIcrQYJKoZIhvcNAQcC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EFzc3VyZWQgSUQgQ0EtMQIQAwGaAjr/WLFr1tXq
# 5hfwZjAJBgUrDgMCGgUAoF0wGAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAcBgkq
# hkiG9w0BCQUxDxcNMTYwNTI3MTUxNTI5WjAjBgkqhkiG9w0BCQQxFgQUAl2NRxLy
# LZUWbJMQVpsBP1azUdQwDQYJKoZIhvcNAQEBBQAEggEAojwZXLQTsu7JdaIxsxZk
# K4EhHtpTzbabXuqcH0AqR1XpzV9lxO5PIIDrSbWFFmNRG2+jzvx0XtgBxc/vyVmf
# W7Pp/SjtEANUQx78OPuZlCq9X4ylLF/aHXejHkKmjidIdAc8qGbO6ONobIA0016S
# S7+u55iF8h6tco4FDJEgN/mI7A1Av9UPMrDGB5K9cJOp5CUZ+Xh1Q+vdBEdfBOJx
# Ya8VHqvkAecLzXzolOUvZd2ZjtKF+RrB7VgU/fbGGAasumAhG+7NSw+MlfxP6Twa
# K6KuEjB1t6vG2Z6nhJxoAXcY7hHCXhlnujOkTZTfFI3aVzsYWK8oZ3zdjU0kxArq
# YA==
# 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 a package

.DESCRIPTION
This will uninstall a package on your machine.

.PARAMETER PackageName
The name of the package 

.PARAMETER FileType
This is the extension of the file. This should be either exe or msi.

.PARAMETER SilentArgs
Please include the notSilent tag in your chocolatey nuget package if you are not setting up a silent package.

.PARAMETER File
The full path to the native uninstaller to run

.EXAMPLE
Uninstall-ChocolateyPackage '__NAME__' 'EXE_OR_MSI' 'SILENT_ARGS' 'FilePath'

.OUTPUTS
None

.NOTES
This helper reduces the number of lines one would have to write to run an uninstaller to 1 line.
There is no error handling built into this method.

.LINK
Uninstall-ChocolateyPackage
#>
param(
  [string] $packageName, 
  [alias("installerType")][string] $fileType = 'exe',
  [string] $silentArgs = '',
  [string] $file,
  $validExitCodes = @(0)
)
  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
# KX7zUQIBAAIBAAIBAAIBAAIBAD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wNTI3MTUxNTI5WjAjBgkqhkiG9w0BCQQxFgQUQs4hyaEp
# 2wMnUrTgYL/0JT06B1QwDQYJKoZIhvcNAQEBBQAEggEAJ1mFLQg+cVEqB6xJ6tlG
# S1LNzVs7zM+NBgxbs2mAGzunPbXBxGyl1TkNoesdOXZNAS1gHFtqqo4TOP/VHDZD
# 87IyQ73x5JmIE/d+/abgEgch14FOMff7684Stupl/S+acOUzdajyWbHKQF3oka7a
# MlNGhHRMVdh3XrrM/HmQFiFemc50AE7KhDTgP+GdLSiOmJBxdCIf5dAH/h75aCSE
# k/JcqvnPo4JESTPUvp1K6j7OE15rSBrmGAk7bbSeXMuGusyJWPgGtskLFKRq8JwU
# 2hQgqbBtVB/zJ/Ag6wJjn4WydL5t+uHkkbwR5e84GaC+au0nLAY6aFhlH4JcC/R9
# sg==
# 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

.DESCRIPTION
This will uninstall a zip file if installed via Install-ChocolateyZipPackage

.PARAMETER PackageName
The name of the package the zip file is associated with

.PARAMETER ZipFileName
This is the zip filename originally installed.

.EXAMPLE
UnInstall-ChocolateyZipPackage '__NAME__' 'filename.zip' 

.OUTPUTS
None

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

  
#>
param(
  [string] $packageName, 
  [string] $zipFileName
)
  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
# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCDfI4A2spNp29Eg
# hgezJZn3/bis3jA+mOX032idrJJ0FqCCF7cwggUwMIIEGKADAgECAhAECRgbX9W7
# ZnVTQ7VvlVAIMA0GCSqGSIb3DQEBCwUAMGUxCzAJBgNVBAYTAlVTMRUwEwYDVQQK
# EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xJDAiBgNV
# BAMTG0RpZ2lDZXJ0IEFzc3VyZWQgSUQgUm9vdCBDQTAeFw0xMzEwMjIxMjAwMDBa
# Fw0yODEwMjIxMjAwMDBaMHIxCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2Vy
# dCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xMTAvBgNVBAMTKERpZ2lD
# ZXJ0IFNIQTIgQXNzdXJlZCBJRCBDb2RlIFNpZ25pbmcgQ0EwggEiMA0GCSqGSIb3
# DQEBAQUAA4IBDwAwggEKAoIBAQD407Mcfw4Rr2d3B9MLMUkZz9D7RZmxOttE9X/l
# qJ3bMtdx6nadBS63j/qSQ8Cl+YnUNxnXtqrwnIal2CWsDnkoOn7p0WfTxvspJ8fT
# eyOU5JEjlpB3gvmhhCNmElQzUHSxKCa7JG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2C6ApF6Ob5GOcgZJ+9
# 7RS00W7j/WEbVk268DOjr7PNOc2yKfic9VQIdGI4N83/U+8cGjTbZ7zet1DDuqGC
# Ag8wggILBgkqhkiG9w0BCQYxggH8MIIB+AIBATB2MGIxCzAJBgNVBAYTAlVTMRUw
# EwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20x
# ITAfBgNVBAMTGERpZ2lDZXJ0IEFzc3VyZWQgSUQgQ0EtMQIQAwGaAjr/WLFr1tXq
# 5hfwZjAJBgUrDgMCGgUAoF0wGAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAcBgkq
# hkiG9w0BCQUxDxcNMTYwNTI3MTUxNTI5WjAjBgkqhkiG9w0BCQQxFgQUiQPKv5v4
# RwVbYSorfq7VZXnmxqAwDQYJKoZIhvcNAQEBBQAEggEACNAhfMXk+UAeFVKZzNxk
# 9u6Ogffcibtq8xCbycxTFnzF+NQJSlbvVyD9wywoDlGBdn5MnHBvW3n6D0zBAsyU
# 85gZYj0d8RTuyrayPCSVqWx9qbAkQ4UQAtFhJQMgoZhGmyB38XmHwzeg5LTKlFeT
# nLBICP2ggmr7cRwQiQzzdkeFdkfkAHaWP/WaAQ8Rq4jdkCXp4/dCLiXbXOO7qNUa
# jMQb0FBaVrQB++KX+r7WbdsSZaXVOs+KRsV9GoQh/feS8MyxXsKhzo//4J777o4B
# p3o1bYRz1bEJE4cW4hMB0yXfS6Z25y0MSzEgqpeP9EYiDHOQzgdUjajRGbnSIvq7
# +w==
# 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 unfunctional until that time.

Use the Update-SessionEnvironment command to refresh the current
powershell session with all environment settings possibly performed by
chocolatey package installs.

#>

  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
# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCDYWmU1+uq5H8B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VXnVO
# y3VX/ICDX/VCF9ukEIQwDQYJKoZIhvcNAQEBBQAEggEAKBfmV13Pmad1YuUS6y9L
# +gXwGlXFSn+Kivl5S08MAkdR9SDolACgI7bzA2kvr+s9cXxJzB3xybFcc6Gf0kaj
# UybGUmVfYt8SoSAz2QE8jO2nyKevi2bOwmVlvrdxv/fJqx57MPbjzeEvXgHKMmoU
# 78yYRSrwJ6TeQLpwqDtUBVJ4cSp4sfybyb7cwh8+ynx0FMIhDIYVY+MUZ+Q+XcbT
# RXb4udLpNye6tzmCxewdTyESbjPVmgDxSZmDt7y7frfqjeuSZ6MixoKZSjpDrxA5
# cAPr//6gkfvuH3em+saYYn/SA1sKQKQWbjEZE/i+Dn6Od9Ic66eyhebGqDxhMJZf
# 5g==
# 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 {
param(
  [string] $packageName,
  [string] $failureMessage
)
  Write-Warning "Write-ChocolateyFailure is deprecated. If you are the package maintainer, please use 'throw `$_.Exception' instead."
    
  $error | %{ $_.Exception | fl * | Out-String }

  throw "$failureMessage"
}

# SIG # Begin signature block
# MIIcrQYJKoZIhvcNAQcCoIIcnjCCHJoCAQExDzANBglghkgBZQMEAgEFADB5Bgor
# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCBphpL9fNL+0Z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FgQUQDM/nJuE
# abNfwDA3vTYV5pJzzugwDQYJKoZIhvcNAQEBBQAEggEATNY+tDEoAR+BfHXvFTLl
# 99fSwuQrBAqL0YISqBUaGSJ6WRpiplnfhhTMeX7mrP60kSf0AAO885ASHQt5+kvp
# PRlg++mc+iDZPOyvfoRJ+fFb+B8vWaqi0kA29qXFza1Z48jlxhYZEmhdJcyfc86O
# 6ENFWJ1j0WAX0lV78LnADeV1wRmOOpeoAc3Aq6DkTUdj/MK0L78xLqFHq2/ysq2+
# LGoPczyHLPivvwJKU4dAok3PJ75xAhNGKrl/z1VcXuqhag4T4FZ096nYSrezRCWQ
# CdciXzh5JScGMnoSQjPpMyJEgR5umTiBAxmwPOgo+coRl8W2ylQ6jEjCuVJQ80lR
# YA==
# 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 {
param(
  [string] $packageName
)
  Write-Warning "Write-ChocolateySuccess is deprecated. If you are the maintainer, please remove it from your package file."
}

# SIG # Begin signature block
# MIIcrQYJKoZIhvcNAQcCoIIcnjCCHJoCAQExDzANBglghkgBZQMEAgEFADB5Bgor
# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCDLpSx2Hyh4iLVL
# jEdX3cE1Z7U7lRc3MsQ451DeEJGeiqCCF7cwggUwMIIEGKADAgECAhAECR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7Pr1A7gXOQpBjS9HvDB
# beFEwzlSGDT0RwfgcCmfjH9LLhkH7rfXyZ5IGvL0Dz2WHCCbkBqIgW5drynFUiNM
# 33qhrU2XBeUmwHQi0+Cf0yaEbI69HmXscvLgFneUyI9jtAwg6Alqv0lhXxsQZQFs
# p6urOjBMl0/jZXJyThnRktw+Tz++Ogy1GRZnYC+IpAI3D+E4Yi1YTqy25RPLZMvX
# HEdDAo61meJFhFZRQdN2XNp/oaqDPYp/eKb5otDLfbSIbAuxKR8ilI1KbpnhKdUX
# YMcCWurKFo5W7tpvF6SnWNCKolShVLYBgAqjQKz9gNhtgz6mCFD9MynjDpH9hK8h
# 2g==
# 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 {
  param (
    [string] $logFilePath,
    [string] $locationToMonitor,
    [scriptblock] $scriptToRun,
    [object[]] $argumentList
  )
  Write-Debug "Running 'Write-FileUpdateLog' with logFilePath:`'$logFilePath`'', locationToMonitor:$locationToMonitor, Operation: `'$scriptToRun`'";

  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
# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCCl2HYY0uYnhzyP
# Zj5VrfXORw19tDHjhwpgEEO9J9Gx1aCCF7cwggUwMIIEGKADAgECAhAECRgbX9W7
# ZnVTQ7VvlVAIMA0GCSqGSIb3DQEBCwUAMGUxCzAJBgNVBAYTAlVTMRUwEwYDVQQK
# EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xJDAiBgNV
# BAMTG0RpZ2lDZXJ0IEFzc3VyZWQgSUQgUm9vdCBDQTAeFw0xMzEwMjIxMjAwMDBa
# Fw0yODEwMjIxMjAwMDBaMHIxCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2Vy
# dCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xMTAvBgNVBAMTKERpZ2lD
# ZXJ0IFNIQTIgQXNzdXJlZCBJRCBDb2RlIFNpZ25pbmcgQ0EwggEiMA0GCSqGSIb3
# DQEBAQUAA4IBDwAwggEKAoIBAQD407Mcfw4Rr2d3B9MLMUkZz9D7RZmxOttE9X/l
# qJ3bMtdx6nadBS63j/qSQ8Cl+YnUNxnXtqrwnI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bkMw/Drut+6rCO
# xPq4yBnvj3tDc2G3R6KGEXhUprGccvMfnHFw2m0MkGgthO7RgmzyLIyz5UWAOoLE
# eGsoTMkmBVy1qblgUm3WAJiIS+/DzWxByMHojHKvvw6iy+n3uc7eE+DNDU0XWaGC
# Ag8wggILBgkqhkiG9w0BCQYxggH8MIIB+AIBATB2MGIxCzAJBgNVBAYTAlVTMRUw
# EwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20x
# ITAfBgNVBAMTGERpZ2lDZXJ0IEFzc3VyZWQgSUQgQ0EtMQIQAwGaAjr/WLFr1tXq
# 5hfwZjAJBgUrDgMCGgUAoF0wGAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAcBgkq
# hkiG9w0BCQUxDxcNMTYwNTI3MTUxNTMyWjAjBgkqhkiG9w0BCQQxFgQUJZLfhPlX
# 4411sH9hNPmdAxY9bHswDQYJKoZIhvcNAQEBBQAEggEAYZmE6ItqYIK6ODNA7SmQ
# aASzG3iBLIHNd2qvA84yojb/zAEycbRX6U3mR6kSozkwsHf88dFsZP8Ne+PGFCtR
# Ep/A8XLFL/wNJLeFDboEKpU+RmYhw/s7VYl6QiDLUvBSciGJRagc744uYGYqX89Z
# n4LQ3C9LWDk7Ifyk4Rj6CVyGMjVuUz/MSGzevNCOGUSGuZphMPmrgBHQsZ5imp7U
# pnZ6lkCi3b+o7ydw76IbNkpX0HmjKrSCYgB1FO3OTfQBCjJIukyFsOspCtm91ElE
# +k/1iZYSTI8iANOVzHvNADBRBiBP27FykRREru5pXrVljcziDMmoQHDAzBx/6ZoI
# 8Q==
# 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: F2F31E8D5FB0FEC718E8BF4A051D7411 | sha1: 70675750F1668BD9DF557DF59CE323C828D8770A | sha256: C29C41A7FDE1BB9DBE62D913402047234A2F9734D4EBBF658EE138B9FF1D57CA | sha512: 02DCA4479D757209DA1A5F61675555836489B2B0D5ECEEE19534BCD2DBE368C97A9A3B7859598A26D835D0FB4688B69B67CDE90E4AA9B7E55DD82FA68EBF5C6E
tools\chocolateyInstall\redirects\choco.exe.ignore
 
tools\chocolateyInstall\redirects\chocolatey.exe
md5: 4F7E0294119BBF563D9807BE106AF832 | sha1: 2C6B114444BE662F34BA8B8652E7F3D72B9A460F | sha256: 72AB8E7A2B606109400109120C40DAEE1CCC233B46708EECC8ED7FC3ACD3B4B3 | sha512: D6C5DAE477BBA318E02C19BE0706082F61E4ABCBD2E8839BA646CC7A8196FC950A5E9F51B93E3B0D11B0F9121E78D1D4CEDE55CE0CDAFF32803645E09C4B5F36
tools\chocolateyInstall\redirects\chocolatey.exe.ignore
 
tools\chocolateyInstall\redirects\cinst.exe
md5: D331033990A3792BEF3643C3CCB1C835 | sha1: AB92D324FB46B9005BEE6E5FA455A69B9F959197 | sha256: 21608BF4921D44925F98FEA95FD7FE1BE4CD3346766E766814EE740866C43985 | sha512: A0E03BBB8B4AE6F30818D9FC17D6CA7EA6BF44F0DAA9235A5FD3354D05E8AB83F5999295B351365DD5FCCABA30B32AAF4ADAEB985EAAD4E83F55286B962AB2C6
tools\chocolateyInstall\redirects\cinst.exe.ignore
 
tools\chocolateyInstall\redirects\clist.exe
md5: 65C456E921507180B15F9F0E0079D9C6 | sha1: FCC77C5C98EA0F71A205C0CD690A32B90350F147 | sha256: BEFB03957B5B2978184F380D0ECFD68622B5083DA6E53EBBF38D40A9E56B6EE8 | sha512: 6D3A5644178292322E73A28379486C663ABB4909BA822E1634983EC9655391ADAF0C8A780197B34C6E90638F32051C52C31F125A3A89B2A780436D6DBE46E870
tools\chocolateyInstall\redirects\clist.exe.ignore
 
tools\chocolateyInstall\redirects\cpack.exe
md5: D373C93DA5F099AABA0D72EA0E8BEB14 | sha1: A89C49CA094E28F58DD894F7AFAE6275ABB46A95 | sha256: 7745C022E036E4E4B8A452A05EEEF9F97DE290BD93EB98ED83703696A1235E42 | sha512: B6CB52541D5A7A8FAD3530E8B5157B2FE7E452B57065B845C40EB8E26655322A83DC7F723C5596C405964F317ED2798D5C84D49C29589AE26031B5C25FEEE628
tools\chocolateyInstall\redirects\cpack.exe.ignore
 
tools\chocolateyInstall\redirects\cpush.exe
md5: 96B7110E6AB76C1DF95F9EAFE8B4FEC2 | sha1: E8141D91820EC02C931CFFB59A6611CCC541B0B2 | sha256: 45CAE85271CE4B2CC61BCA0BA3229C507AB6D70064978B0A55A81AE3FA2B16B8 | sha512: 027A8F8A0C9FBCDDF4A2484FC85253CC1674177C61AC1FE02CFDE6DB660DECDC6B6809FDD40DD99745F5C839B3DB009DE04F429728D725EA005AAA7B06151E17
tools\chocolateyInstall\redirects\cpush.exe.ignore
 
tools\chocolateyInstall\redirects\cuninst.exe
md5: F45E40DBB3056F1FF6E57E10092DA147 | sha1: 7B5F4B9EB7D1EA1571832B1D53EFD7968EA098CB | sha256: FFA7392CE38DD55114CABB6B8FEF632318302ABFFFB55C333B69D694E0AA0606 | sha512: D457C650DB507B7FE6A97981348B3F029296894A490D2E514909FA67102AACADCA5CB8845D2363D2D9BDF8C45B65AB3EEFD22B7D0F9996D16DF45D76D67BD159
tools\chocolateyInstall\redirects\cuninst.exe.ignore
 
tools\chocolateyInstall\redirects\cup.exe
md5: 0F3A73E2EFB015975790CB3D1BEFC0C5 | sha1: 9C4FE7FA4655E9F04916DE6EE65DD4E9C7D4D957 | sha256: 89E0420EAA46350B79AF89976EBCF9E4744BF97A5DCFB60272BB711AC2AF51F5 | sha512: 2EB7076468A6BB2099044035D36EEC79F087B495FDF5250833FC672D5A1B42C468F0BC0F4046B4E8C502385E1C886747B5A6BF28A314CE6D5277663D1BFCD7C3
tools\chocolateyInstall\redirects\cup.exe.ignore
 
tools\chocolateyInstall\redirects\cver.exe
md5: 7778256C2097E8F553B9BF4C7B222A8C | sha1: 22FA24DAFA3B4ABD57128644EAD3CEF3C01D31C7 | sha256: 2900DBCE8D2D0B5CB38AB57DE88ABA5FA2CE33A97CD9B45C9FD4200C06AF6D6E | sha512: 834F6EBD525ABFB64F164EC8E2EAFBD5C3C29C0333F24B270AE9ED6088CA5BBFBA3B945D9C7B560AB0F1E576AD712E8BEF4724BE9B2260AE8023746DE270842F
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: 9EFAC2FCE682AC7AC12823F5B9F792C6 | sha1: BDF8519F5FFB89BA8AC851B945C909402B4D7363 | sha256: 0605908EC274B598C29279BA94D6E9F6ED1582AE5E18AE49762AF2CA48147D38 | sha512: F9A0BDB100769BE2133F7423E6145994CE8DA8A18EF3890CA7264A2A3F3D9598FD27021C8E980CF6418FBE8E43A5A2E164D59C2C259F7D3B7D3C15005405B25C
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: 51FD85A4B41A410DBE6ABBB90BA9B589 | sha1: 306703A156785BF2468413C8031EAC854BF80C16 | sha256: CD7CFBC2916D9F352A4FABDA5FFB14BEC5C311FA9AA4A87601CE0A31186CBB25 | sha512: 539B22262D46330D43BD9E52B3069CD2EF37A9F95E6334AECBCF1D33724D2455066F670A21F8A615DA82C37A1742E711EA286F4E70F7BCE3D8D4F0BCA2E3AB78
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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Zik9hiCIimzGa5H5I2CXCXCi7LY1bwg8T5uWA
# sTNW8FdHfHxgED6WO8hQEsc/ASFZqjxmKzelESIFfImLWSHIT7RQSWHFXhTcpyqc
# oAfAnH5Kkr40i2vuMb0TqIN7skm9JI+DuWK13jAbrgx+snA+j1cutr+ZX+2LL8dS
# 1pa+8dlI59YOZp1WS8T1YE/MSfyIx02BG9mo+ZifEor7kN/MDxKMSL+ZTXciHwCF
# 5w==
# 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 8883847 Wednesday, June 5, 2024 Approved
Chocolatey 2.2.2 25326245 Tuesday, August 8, 2023 Approved
Chocolatey 2.2.0 3347073 Wednesday, July 26, 2023 Exempted
Chocolatey 2.1.0 6328445 Thursday, June 29, 2023 Exempted
Chocolatey 2.1.0-alpha-20230614 2195 Wednesday, June 14, 2023 Exempted
Chocolatey 2.1.0-alpha-20230608 993 Thursday, June 8, 2023 Exempted
Chocolatey 2.0.0 9675286 Wednesday, May 31, 2023 Exempted
Chocolatey 2.0.0-beta-20230426 4116 Wednesday, April 26, 2023 Exempted
Chocolatey 2.0.0-beta-20230412 1749 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 1182 Tuesday, January 24, 2023 Exempted
Chocolatey 1.4.0 2789011 Wednesday, May 10, 2023 Exempted
Chocolatey 1.3.1 5214463 Tuesday, March 14, 2023 Exempted
Chocolatey 1.3.0 3246275 Wednesday, February 15, 2023 Exempted
Chocolatey 1.2.1 6479160 Tuesday, December 6, 2022 Approved
Chocolatey 1.2.0 1723470 Wednesday, October 19, 2022 Approved
Chocolatey 1.1.0 8370462 Wednesday, March 30, 2022 Exempted
Chocolatey 1.0.1 1055705 Thursday, March 24, 2022 Exempted
Chocolatey 1.0.0 872771 Monday, March 21, 2022 Exempted
Chocolatey 0.12.1 4191213 Tuesday, January 25, 2022 Exempted
Chocolatey 0.12.0 1089165 Tuesday, January 18, 2022 Exempted
Chocolatey 0.11.3 5643802 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 15137 Thursday, August 6, 2020 Approved
Chocolatey 0.10.15 71774531 Monday, June 3, 2019 Approved
Chocolatey 0.10.15-beta-20190531 1226 Friday, May 31, 2019 Approved
Chocolatey 0.10.14 510561 Thursday, May 30, 2019 Approved
Chocolatey 0.10.14-beta-20190418 5618 Thursday, April 18, 2019 Approved
Chocolatey 0.10.14-beta-20190402 3068 Tuesday, April 2, 2019 Approved
Chocolatey 0.10.14-beta-20190321 2590 Friday, March 22, 2019 Approved
Chocolatey 0.10.13 7774000 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 29155692 Friday, May 4, 2018 Approved
Chocolatey 0.10.10 2954431 Thursday, April 12, 2018 Approved
Chocolatey 0.10.9 5427014 Sunday, March 25, 2018 Approved
Chocolatey 0.10.9-beta-20180223 3789 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 1053 Thursday, June 1, 2017 Approved
Chocolatey 0.10.6-beta-20170503 8273 Wednesday, May 3, 2017 Approved
Chocolatey 0.10.5 18050501 Thursday, March 30, 2017 Approved
Chocolatey 0.10.4 174323 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 3815924 Thursday, August 11, 2016 Approved
Chocolatey 0.9.10.3 1920551 Thursday, June 23, 2016 Approved
Chocolatey 0.9.10.2 3033 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 687 Sunday, June 12, 2016 Approved
Chocolatey 0.9.10-beta-20160531 674 Tuesday, May 31, 2016 Approved
Chocolatey 0.9.10-beta-20160528 636 Saturday, May 28, 2016 Approved
Chocolatey 0.9.10-beta-20160527 714 Friday, May 27, 2016 Approved
Chocolatey 0.9.10-beta-20160524 684 Wednesday, May 25, 2016 Approved
Chocolatey 0.9.10-beta-20160509 787 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 1204 Monday, April 11, 2016 Approved
Chocolatey 0.9.10-beta-20160402 1117 Saturday, April 2, 2016 Approved
Chocolatey 0.9.10-beta-20160330 690 Thursday, March 31, 2016 Exempted
Chocolatey 0.9.10-beta-20160328 819 Tuesday, March 29, 2016 Approved
Chocolatey 0.9.10-beta-20160325 845 Friday, March 25, 2016 Approved
Chocolatey 0.9.10-beta-20160323 889 Wednesday, March 23, 2016 Approved
Chocolatey 0.9.10-beta-20160322 647 Wednesday, March 23, 2016 Approved
Chocolatey 0.9.10-beta-20160320 859 Sunday, March 20, 2016 Approved
Chocolatey 0.9.10-beta-20160318 749 Friday, March 18, 2016 Approved
Chocolatey 0.9.10-beta-20160314 889 Monday, March 14, 2016 Approved
Chocolatey 0.9.10-beta-20160311 834 Friday, March 11, 2016 Approved
Chocolatey 0.9.10-beta-20160302 1029 Wednesday, March 2, 2016 Approved
Chocolatey 0.9.10-beta-20160215 1174 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 387278 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 1252749 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 876 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 783 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 736 Sunday, February 1, 2015 Approved
Chocolatey 0.9.9-alpha-20150125 944 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 755 Wednesday, January 7, 2015 Approved
Chocolatey 0.9.8.31-beta1 680 Tuesday, January 6, 2015 Approved
Chocolatey 0.9.8.30-beta1 664 Tuesday, January 6, 2015 Approved
Chocolatey 0.9.8.29 57042 Friday, January 2, 2015 Approved
Chocolatey 0.9.8.29-beta2 677 Friday, January 2, 2015 Exempted
Chocolatey 0.9.8.29-beta1 680 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 990 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 769 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 887 Tuesday, July 23, 2013 Approved
Chocolatey 0.9.8.21-alpha2 868 Thursday, June 27, 2013 Approved
Chocolatey 0.9.8.21-alpha1 877 Thursday, May 30, 2013 Approved
Chocolatey 0.9.8.20 331614 Tuesday, December 11, 2012 Approved
Chocolatey 0.9.8.20-beta1 827 Wednesday, December 5, 2012 Approved
Chocolatey 0.9.8.20-alpha3 843 Friday, November 16, 2012 Approved
Chocolatey 0.9.8.20-alpha2 804 Tuesday, October 16, 2012 Approved
Chocolatey 0.9.8.20-alpha1 839 Sunday, September 16, 2012 Approved
Chocolatey 0.9.8.19 29992 Monday, July 2, 2012 Approved
Chocolatey 0.9.8.19-alpha1 785 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 947 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 985 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 954 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 980 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.

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
  • Resolve sources by name - see #356
  • 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

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

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