Downloads:
345,307,852
Downloads of v 0.9.10-beta-20160509:
787
Last Update:
09 May 2016
Package Maintainer(s):
Software Author(s):
- Rob Reynolds
- The Chocolatey Team
Tags:
nuget apt-get machine repository chocolatey- Software Specific:
- Software Site
- Software License
- Package Specific:
- Package outdated?
- Package broken?
- Contact Maintainers
- Contact Site Admins
- Software Vendor?
- Report Abuse
- Download
Chocolatey
This is a prerelease version of Chocolatey.
- 1
- 2
- 3
0.9.10-beta-20160509 | Updated: 09 May 2016
- Software Specific:
- Software Site
- Software License
- Package Specific:
- Package outdated?
- Package broken?
- Contact Maintainers
- Contact Site Admins
- Software Vendor?
- Report Abuse
- Download
Downloads:
345,307,852
Downloads of v 0.9.10-beta-20160509:
787
Maintainer(s):
Software Author(s):
- Rob Reynolds
- The Chocolatey Team
Chocolatey 0.9.10-beta-20160509
This is a prerelease version of Chocolatey.
- 1
- 2
- 3
Some Checks Have Failed or Are Not Yet Complete
Not All Tests Have Passed
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:
This package was approved as a trusted package on 09 May 2016.
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.
md5: 5C5D82BF433BC7DCABEE288F22680605 | sha1: 58939DEEE6118FA3A288B202DBCA32B72B6F0361 | sha256: 80612F4BEFB062D8820B917A8DDA4266D2B6274B55297A2B8AECA5DCAD361773 | sha512: C21E2E9F627F3FCFE08813D63CC3ED58FAFD7BD4D464BB98D91530CD9A73B3081A49CFADF30C1CAD6979A577C8B2F40BBACEE43185E9E86BE73B66E7AEB69724
# 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
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GsIp0JmV9Xq
# gNvVmgYC1bD9vu8W4P3NKPd+JHgX4ovYyvUpKFFe0LywJsGxKGCF9xmkBIEkie7/
# 4dOa/BdbafQ6C0WkRezNlYhPtu0Ut+e5bJwf7OAeRUtdp8/uvb2wA4HCQTiuunbL
# TCa8PSGGHIy+4bL6FL9ICyZ6UYNfARdtBL0nMhZKJN6XnlgI1k1R+nLhms6Dfn7j
# bbH7Ko3fKtKcjhi9PXkEEn77byGxd3q9I6UQRFtYzY1ptJxjRPwbMZIiCDa+IAp5
# +HTqdcLoXW6fhM6/Y8LO6VUlmfR7LlIo8pLUQ9fqJPQIpqpe7J0L/lLUGY10bhrM
# cA==
# SIG # End signature block
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
# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCCSB1Tny/fMZxDd
# qx68611OfsO/t+B/Op6/tCwtLAlBQaCCF7cwggUwMIIEGKADAgECAhAECRgbX9W7
# ZnVTQ7VvlVAIMA0GCSqGSIb3DQEBCwUAMGUxCzAJBgNVBAYTAlVTMRUwEwYDVQQK
# EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xJDAiBgNV
# BAMTG0RpZ2lDZXJ0IEFzc3VyZWQgSUQgUm9vdCBDQTAeFw0xMzEwMjIxMjAwMDBa
# Fw0yODEwMjIxMjAwMDBaMHIxCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2Vy
# dCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xMTAvBgNVBAMTK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End signature block
# 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 = " --skip-download-cache --use-download-cache --skip-virus-check --virus-check --virus-positives-minimum="
$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= --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
# KX7zUQIBAAI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UxDxcNMTYwNTA5MTQzNzEyWjAjBgkqhkiG9w0BCQQxFgQUm4hA4/Iz
# gXjMKSZvFA2wLU3o+ZIwDQYJKoZIhvcNAQEBBQAEggEAJIUGDqtPBn28g7hJrpRg
# 3ymUcWoJ86I3m0lddcj/Jw5FAyzEPCJQ4CPDM0XY0WNgDrLV0ox25d6/vIMqFDhE
# UIcolnN+xg3xKGRQlrLMvI4qEy++97pjfsN/mVg7B/VtxLZNb4DEAeU7yUU3wMTS
# eGUcoSeIR20lHPeEbxx2QbkYfT0pwYQTJnp66JWyWk/sve2uYJgzzsV0p/VT4Mem
# jeRV8s574DGFIkwub1Ga8h3DIukt0bEXR+wkJTQsIAXrgLrQMOryreOWhnoIksNW
# yZxfZSGUMiFEGdgvq8sXzTkbT95eKTw4uOyUzBtg9jdW8tVSAtBt/klZsAIpTPWX
# HQ==
# SIG # End signature block
# 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
# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCDzlbRskLZDJn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QQxFgQUUmyzN+CA
# otPzQginDLpHQtx2BJYwDQYJKoZIhvcNAQEBBQAEggEABwAwWmYLI08hNwucZ5hF
# melaqdXZdwGdjcZm5yCmipmq3y3Yz962zqyhr4tUycHsT+3rj9WGSftUTQe04Loi
# wHl8P1iSMdMwzWm6dzpp0OpJrrCXDWej+W3VgsuJkx0cNcCGCgcErfk+BWH8yuto
# 7Q1CoIjq6rDNy1lfmnzjNFKr5R05kLWwjYfgaNu3XZPudUt65rIhVxVW+PtjQ+tr
# WCl7ZRIhIW8oMlnAE+3vA6u9Qm0Mw4SSVBU+qy0GFyN07LY4XCeQDj914fuCMHVb
# EYzZQkiOT2cFtwI57zrruGCx3jaL3Y6eK/eO4MzawmXrsbItQ9F5SZaBbo9uHxjp
# xA==
# SIG # End signature block
# 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
# BAMTG0RpZ2lDZXJ0IEFzc3VyZWQgSUQgUm9vdCBDQTAeFw0xMz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AHG+vH+mQ
# BMtPfo8JJyQxVMT7UDHq36Y1bk4PfeUGLCJp2rcUuXcl7gEyT9L4jLBEB9iR7sEK
# GjSVtN4IlHxRi0ljjZn0lFx5itrcDsC5ZJhex16IOHQrFK2pgIV5VzobbaExz3Ag
# NQ==
# SIG # End signature block
# 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
# BgE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 5hfwZjAJBgUrDgMCGgUAoF0wGAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAcBgkq
# hkiG9w0BCQUxDxcNMTYwNTA5MTQzNjU4WjAjBgkqhkiG9w0BCQQxFgQUVFoFb4uC
# w+OLb6cIt3ILZ3nrHN0wDQYJKoZIhvcNAQEBBQAEggEAH6+SKluBFyz/HtFYTkX5
# AuWL7wrMXtxN2NyAtiy4rLg2UbjQ0ppBWF92F0CE93RcoKylJDT5Yzm+R3ygCIEP
# ABLGoJm2WNbPNT/D7bgpLSIHDWyLnvhzLUkxkV0j4eiUiGFM0/+lfdubTGhRuKe6
# I0R2h6A6uRDKOyc4JkyF2Q/cL7KNI3EFRvpQxyLchNKfN3sjVZ0C/twFkTO0+my7
# VW5EvUdR/UUY0W2L9k6HVO9XkTqRzUP5/fzawL6oblZsnkgBaNvGetkRm39tTxgx
# LQvagdvIcsFmZii+MGoAscDwgXLD58t8hZbpFAea74+i8LwVzC4LKSj9gHQQQsW/
# kg==
# SIG # End signature block
# 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
# KX7zUQ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CQUxDxcNMTYwNTA5MTQzNjU4WjAjBgkqhkiG9w0BCQQxFgQUiHcPRIRB
# ubQVPGABQ/3Uke5RpxMwDQYJKoZIhvcNAQEBBQAEggEAX3dDCRN4ZEN4OIx8bH5v
# /MlAhGGdn9S3a6NZqdnkRPsZhdzWZ5HnC6dTk921l1AozGrbIXy/yMG4dfLLD4VR
# qhXBVOJ/Oi9DLl5mL0Ato9gaxGoh7muXXk0M5Kex6U8ybMyl/64pGbz5k21Xebwz
# C47ema+jw5zWNE95raur1mkri7TtIzrurbSZ5CosFVTb+xnb1YIkjnSNht9hQ2ro
# 0zniNEzaYJBI3YTQ7QGl80Ik+hiH5P4PKCzu6uD9xDW22Dq7Ph1uV3RtbkDSQaVg
# GnFpdSgHh1rSAmyOsw/Wc6MXx4P8bfFbhl/7CkH2wy5w6ZT9M23PFMc/JP7DlD+7
# Ew==
# SIG # End signature block
# 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
# gHSMgZYefPGqOxeW7vcvMmfR9BC2DKCCF7cwggUwMIIEGKADA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lPT3GxX94
# ThhqokO1ZG37RvV3L6JMmcJWCiu6WIgAyt0MkYuY+jHK/h/nsZUk3NNIqxteQouN
# Bnikk7GHTD0LpF7ZvzeFd2hVBac8WhOvOhVsUJjEwPLj4WUGSKT12zKyYyddq2uu
# xH2b4ClhKi3sXGXvaCDCwIlTZfICMvSH5Em4u/EXDQb/qH6Cd+DOjzTD+BnYW53O
# 0CT8rsAYZgIpl5t3zkKJduzP9bhXbwgM8m5nxM/kMjgqxZwtoDV2Jm2U+E4/QUw8
# cDWEsecsXI28oLsSLsOLbTh4MrE+9AgjHeF83OxlgMGAf/lUacViGhXTLlVz5eZv
# VA==
# SIG # End signature block
# 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
# cz515bG9l0eBVgJHH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WIOtfPfHX3PxcwDQYJKoZIhvcNAQEBBQAEggEAkBEQleBlbxmBJEcQcoee
# eu5hMLNlUYQRzYGTMU+Pxvj/0AvPcXW1BVdAd5mNuRd4onRJ+A7jSPQOBqxRkmmG
# alKUsZ4kny8VoLAclqbLTzs0e0np1T5bapxevB41xd+femdkyAmQHHEiTDb5gs+r
# u+yAdqxBGEUF0EzdZ/jNvnLCzbJIzmfWZYKDtshIWP1Vqnl0h4ulTcfO5T/Fy5A8
# FXUp8/AzaBxIIWXRdwCBM7Jva0cWu5/IYuWagStDABrwFh8zjHa3MUx5cKsbMEZS
# eH1zdKv4lKEZRbDeRR4WPlE3S/3bYMVHGLLOLbh3PxYFubjSHs463UEPMQJwHxVv
# eA==
# SIG # End signature block
## 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/cOewOIJ6qCCF7cwggUwMIIEGKADAgECAhAECRgbX9W7
# ZnVTQ7VvlVAIMA0GCSqGSIb3DQEBCwUAMGUxCzAJBgNVBAYTAlVTMRUwEwYDVQQK
# EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xJDAiBgNV
# BAMTG0RpZ2lDZXJ0IEFzc3VyZWQgSUQgUm9vdCBDQTAeFw0xMzEwMjIxMjAwMDBa
# Fw0yODEwMjIxMjAwMDBaMHIxCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2Vy
# dCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xMTAvBgNVBAMTKERpZ2lD
# ZXJ0IFNIQTIgQXNzdXJlZCBJRCBDb2RlIFNpZ25pbmcgQ0EwggEiMA0GCSqGSIb3
# DQEBAQUAA4IBDwAwggEKAoIBAQD407Mcfw4Rr2d3B9MLMUkZz9D7RZmxOttE9X/l
# qJ3bMtdx6nadBS63j/qSQ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170BZPCq5GJLRUsFkRob2C9S5vJgtZe0Duz
# eztfN7rnjar5kSMhmDRZQdeU+q6wuhUTFJdz83OHaGQydYNPlUPRGyeRn/7eyQbs
# pVad/5fkABArvVzbLAaTyB8yxhQ3Q0FHu2mQRss0W3AByShqjSVbRYvCuGg4LKGC
# Ag8wggILBgkqhkiG9w0BCQYxggH8MIIB+AIBATB2MGIxCzAJBgNVBAYTAlVTMRUw
# EwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20x
# ITAfBgNVBAMTGERpZ2lDZXJ0IEFzc3VyZWQgSUQgQ0EtMQIQAwGaAjr/WLFr1tXq
# 5hfwZjAJBgUrDgMCGgUAoF0wGAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAcBgkq
# hkiG9w0BCQUxDxcNMTYwNTA5MTQzNzAwWjAjBgkqhkiG9w0BCQQxFgQULUDxZNIx
# MgIFoTF7TNutVfftt14wDQYJKoZIhvcNAQEBBQAEggEAj9ZR0psQJycVXmN+2ZSc
# yWuVw3bYD5xduOYrMUXhlpAWOPf3ViEW0CWRhahbtTX/l792Ec21hW/5y/szQVVs
# se5W5w6wlFDUJrKA4pNbFA7cIqk8Q2OFR6rZyvVH9COZj188Vq5hoAhp028wewn9
# YeV7XTcn6m0+nQc8OaHvdPM9EhsOS61wzHu0jEbGEopMcbAQ+bNEqgXhAG8HxYAb
# 98MdCXuuCJJVTCO5V3W5sHBFrQ5TGanLQWma8evm82TJpVhpwq105Ve+aGDzdKMO
# wYrtN/xeoXVaHcB/+NcsNtHR2t/seemwnWWPh+bAWbVs92yuUdyeQNjYKs+Lr/Tl
# EA==
# SIG # End signature block
# 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
# MIIcrQYJKoZIhvcNAQcCoIIcnjCCHJoCAQExDzANBglghkgBZQMEAgEFADB5Bgor
# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCDubHFwORiuhPqC
# SRCHTa8vLGvOEIr3hnLC/vPtGKt80KCCF7cwggUwMIIEGKADAgECAhAECRgbX9W7
# ZnVTQ7VvlVAIMA0GCSqGSIb3DQEBCwUAMGUxCzAJBgNVBAYTAlVTMRUwEwYDVQQK
# EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xJDAiBgNV
# BAMTG0RpZ2lDZXJ0IEFzc3VyZWQgSUQgUm9vdCBDQTAeFw0xMzEwMjIxMjAwMDBa
# Fw0yODEwMjIxMjAwMDBaMHIxCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2Vy
# dCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xMTAvBgNVBAMTKERpZ2lD
# Z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signature block
# 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
# BgEEAYI3AgEEoGswaTA0BgorBgEEA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JKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAcBgkq
# hkiG9w0BCQUxDxcNMTYwNTA5MTQzNzAyWjAjBgkqhkiG9w0BCQQxFgQUEOX3oc/u
# CLuy/Q1hj+CBfrfWnhkwDQYJKoZIhvcNAQEBBQAEggEAUFcKtP5BB47T7dHkSnsr
# kLdo/XNYCkVopme3C3KEeJhJwX4frVD8Oy2BzG/1oA/kKIhXGqBxyZgxcZLHSvyK
# oHKEg9Nd9b8GaQiOmOoOdohXOcHrqO1CjElPYEhKlTDd8+iYvTEmjPp2AY/Z5iYg
# ELQ90/aBM/5+hHVhxDtyPR5LUp5BIQtkk7A48vZGc6xUL1gk7KATSldQ+aAqcij4
# GMNYfMVivC3eci5nApFEZeRp7+dOPYGqX0KHTSqc9v+6g3xu74N+/LWKsfm5KC+e
# Uly9JhDSlbRbhiw+n14J/1bBgK6FSP4o+dOoCvSZEmiHNhHyzDfZr6u8JISVY/V5
# Vg==
# SIG # End signature block
# 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
# ZnVTQ7VvlVAIMA0GCSqGSIb3DQEBCwUAMGUxCzAJBgNVBAYTAlVTMRUwEwYDVQQK
# EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xJDAiBgNV
# BAMTG0RpZ2lDZXJ0IEFzc3VyZWQgSUQgUm9vdCBDQTAeFw0xMzEwMjIxMjAwMDBa
# Fw0yODEwMjIxMjAwMDBaMHIxCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2Vy
# dCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xMTAvBgNVBAMTKERpZ2lD
# ZXJ0IFNIQTIgQXNzdXJlZCBJRCBDb2RlIFNpZ25pbmcgQ0EwggEiMA0GCSqGSIb3
# DQEBAQUAA4IBDwAwggEKAoIBAQD407Mcfw4Rr2d3B9MLMUkZz9D7RZmxOttE9X/l
# qJ3bMtdx6nadBS63j/qSQ8Cl+YnUNxnXtqrwnIal2CWsDnkoOn7p0WfTxvspJ8fT
# eyOU5JEjlpB3gvmhhCNmElQzUHSxKCa7JGnCwlLyFGeKiUXULaGj6YgsIJWuHEqH
# CN8M9eJNYBi+qsSyrnAxZjNxPqxwoqvOf+l8y5Kh5TsxHM/q8grkV7tKtel05iv+
# bMt+dDk2DZDv5LVOpKnqagqrhPOsZ061xPeM0SAlI+sIZD5SlsHyDxL0xY4PwaLo
# LF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JbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20x
# ITAfBgNVBAMTGERpZ2lDZXJ0IEFzc3VyZWQgSUQgQ0EtMQIQAwGaAjr/WLFr1tXq
# 5hfwZjAJBgUrDgMCGgUAoF0wGAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAcBgkq
# hkiG9w0BCQUxDxcNMTYwNTA5MTQzNzAyWjAjBgkqhkiG9w0BCQQxFgQUe9U9jcEh
# R5A/DTX0fw8XPFnWRjswDQYJKoZIhvcNAQEBBQAEggEAnOCtKR3IbEzmT+QKxjh0
# iKVwLQ/zmMbtR4Yf9oGnPPwxl/q/DLFTda8rekZs+A0PAvmEmSXcA9DbMPpbs5Q6
# 2hnSGUEH4ogATsm7e/vMEGoWKobiL71eWnolGhBbTBEk5bT3wTewD1xOLP4TzLuy
# sRGXyFO0L9yVX4ab+eHH1Kw7NpZuoGQuQR3Ddy5MAhcujiNJIvHIOG5n7DKoL5K6
# CmOHMSa6Y3lV3fLp1MTw0Zhaf+TY0VsUF3kV3fQI/d2u4HLsF6xySAxLv9FjL8px
# AIr1a6Y4ZyOFVRwWwnXeKYlTOUpQKHKseuoVUMc3vvtaUIo0TPSjWi8F0BKNdWLv
# Sw==
# SIG # End signature block
# 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
# MIIcrQYJK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VBAMTGERpZ2lDZXJ0IEFzc3VyZWQgSUQgQ0EtMQIQAwGaAjr/WLFr1tXq
# 5hfwZjAJBgUrDgMCGgUAoF0wGAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAcBgkq
# hkiG9w0BCQUxDxcNMTYwNTA5MTQzNzAyWjAjBgkqhkiG9w0BCQQxFgQUhDzg93P4
# ocJeFzbjYB5shUdWFKswDQYJKoZIhvcNAQEBBQAEggEAG+p5fxAgd0HaK52bpYsR
# zMVm/pEkgadO3z9GRBEPk4Mzz4FsETgNyJRvxUlzG6ktXTi5sv1bjeCv7tS32jBl
# okeRjqQ6ITo8mcnHeGk0n4gcXCuksb44pn14Xw9+RZkiOY7EGFl21zSt93RUk71v
# EXEEXLFh2QWVFqhhK42/9CIQkfm14xAU4UOHU/Qe5Ovyc3eoJdsHwTFGFAkGB4B1
# 2ESr3ClBn4vP46HdttmtWB4/0jZvgFtB1NrPT5JmGEmjDqomekyoihWZySXaLOU3
# ruhiudbgpeoLb0R13h+94dUxBOiF7tPCpCkTOO74aMxZhLS8YDCJ7ZB/P5HFfSBZ
# xg==
# SIG # End signature block
# 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
#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
# MIIcrQYJKoZIhvcNAQcCoIIcnjCCHJoCAQExDzANBglghkgBZQM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AwGaAjr/WLFr1tXq
# 5hfwZjAJBgUrDgMCGgUAoF0wGAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAcBgkq
# hkiG9w0BCQUxDxcNMTYwNTA5MTQzNzAyWjAjBgkqhkiG9w0BCQQxFgQU7xvHrZu7
# LGV3rHLqPpw/lUKnoTAwDQYJKoZIhvcNAQEBBQAEggEAXRGAdNNGgk17PtvHD/S0
# zBKOz9TYv+3ooypg6gu4bh4XA4ZtdZwnU9sjBVr5Zc2aYykKG2URcIdyHonXtQxR
# B/pEPp1dxlgF+dWhDyT3HyqGwwvBXcUoIq0OJUtIZz4tsH3dc53gsmwtn7hID1mI
# MYXppciQyu8NLAzrxefx/su891cgxyE/7hJYbgyW2fdguI+LyXtbR263fDYORmWQ
# bWLbUvKVeUIe/EOhyaJ8sIx5cTZ5w/jwUKsRCVTGkSnEjjFFgnC14pUiLDH/KEpD
# 3PQfF3KcokJHHJV4gnajDoqJtiJxD1ROYUJzzTxPFYGtl+YJ37KALlMSs8bernOj
# Ig==
# SIG # End signature block
# 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 = 20000
#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
# MIIcrQYJKoZIhvcNAQcCoIIcnjCCHJoCAQExD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WQgSUQgQ0EtMQIQAwGaAjr/WLFr1tXq
# 5hfwZjAJBgUrDgMCGgUAoF0wGAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAcBgkq
# hkiG9w0BCQUxDxcNMTYwNTA5MTQzNzAzWjAjBgkqhkiG9w0BCQQxFgQUbqhwoMHB
# ksZRQ2pDXIYKp0Fq4CQwDQYJKoZIhvcNAQEBBQAEggEAABbMewKJNnLjyJJtF3E/
# HIjrD7XYpRE/2RvvYD7NS1G0OA4A3M4HW+jgAM15qFzZ4ihyo7bX6v8D3EwRg465
# c87AMxeN+VfMrWXwFA3mBVIVekl+SYDdkPVSHaLz7Hy2OeEc1Mx1d+B3rM0nli5m
# 1oxbjZcmtGnvrOm1dCc3gnp2IM1cw5NT6cwGeFh2fVw1Kp2O9Z9HyJmJl5KBkowd
# xVsYj/uHCSVhY7qGm7KnKcbQZsX4Wwt5Rwk1VLGNei1+0oAb7TbuEVmM/b5+5/uU
# zLUkCbZ5j5hV7JE9y2bWE2FjT7d6LUVUouZ0UGCLJiZauxcmoMPrmmFmJ8nv4IN/
# Ow==
# SIG # End signature block
# 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 = 20000
#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
# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCDXuJiiW5xPv/zP
# l/oklrUrdH/3up8unSi7fCgeFtDJb6CCF7cwggUwMIIEGKADAgECAhAECRgbX9W7
# ZnVTQ7VvlVAIMA0GCSqGSIb3DQEBCwUAMGUxCzAJBgNVBAYTAlVTMRUwEwYDVQQK
# EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xJDAiBgNV
# BAMTG0RpZ2lDZXJ0IEFzc3VyZWQgSUQgUm9vdCBDQTAeFw0xMzEwMjIxMjAwMDBa
# Fw0yODEwMjIxMjAwMDBaMHIxCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2Vy
# dCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xMTAvBgNVBAMTKERpZ2lD
# ZXJ0IFNIQTIgQXNzdXJlZCBJRCBDb2RlIFNpZ25pbmcgQ0EwggEiMA0GCSqGSIb3
# DQEBAQUAA4IBDwAwggEKAoIBAQD407Mcfw4Rr2d3B9MLMUkZz9D7RZmxOttE9X/l
# qJ3bMtdx6nadBS63j/qSQ8Cl+YnUNxnXtqrwnIal2CWsDnkoOn7p0WfTxvspJ8fT
# eyOU5JEjlpB3gvmhhCNmElQzUHSxKCa7JGnCwlLyFGeKiUXULaGj6YgsIJWuHEqH
# CN8M9eJNYBi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7Qrcbp98ol84pJvPsklrkxeS5LnzhV2+PNTmobW9aGC
# Ag8wggILBgkqhkiG9w0BCQYxggH8MIIB+AIBATB2MGIxCzAJBgNVBAYTAlVTMRUw
# EwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20x
# ITAfBgNVBAMTGERpZ2lDZXJ0IEFzc3VyZWQgSUQgQ0EtMQIQAwGaAjr/WLFr1tXq
# 5hfwZjAJBgUrDgMCGgUAoF0wGAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAcBgkq
# hkiG9w0BCQUxDxcNMTYwNTA5MTQzNzAzWjAjBgkqhkiG9w0BCQQxFgQUFhjE/O13
# QWzmH9IpkGiVjTOiRpYwDQYJKoZIhvcNAQEBBQAEggEASeuoeGnlGGTbzYKEUV9T
# B4lIod/IAJINP8P2zTmgUVyLpWm2hUIsbt30ufKKHtFKLTzpAkjYEErLXSMk+1kF
# qxar018l8LlOUHWUBgmdLSowlziAUIkFKsCWXgHAr3ZVKSFp6ub5sTQOX9KtkFGW
# lv2GPatfdZH7OSvar3qc8TbjmiNcLe0uJi6qysqASpu156E/e5ALzhjzZNJ7Wr6X
# QOjawPgwcFwvkrNDolDXzR6rwrpJzdPR/fP5ZuNULeNlZ98YMqfkjPcgOCiH0H2c
# OJEBAjrnySOPQhGvznDQ4kky4B9ZZC177AvNDY3SJ/4++striF4NrZ53w1Dt7IqP
# IQ==
# SIG # End signature block
# 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
# Fw0yODEwMjIxMjAwMDBaMHI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lkkTG6+p04gT5+5mTEbnOV802aWArnKH/wfmKZJHahJfCn
# 7BTBj2jo5NH5rPUjg6nCnyi+PRFNZq70uEVKa6Gl2SkO/brZNxOvVL4gaPi2WIBt
# Zw==
# SIG # End signature block
# 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-ChocolateyDesktopLink {
<#
.SYNOPSIS
This adds a shortcut on the desktop to the specified file path.
.PARAMETER TargetFilePath
This is the location to the application/executable file that you want to add a shortcut to on the desktop. This is mandatory.
.EXAMPLE
Install-ChocolateyDesktopLink -TargetFilePath "C:\tools\NHibernatProfiler\nhprof.exe"
This will create a new Desktop Shortcut pointing at the NHibernate Profiler exe.
#>
param(
[string] $targetFilePath
)
Write-Debug "Running 'Install-ChocolateyDesktopLink' with targetFilePath:`'$targetFilePath`'";
if(!$targetFilePath) {
throw "Install-ChocolateyDesktopLink - `$targetFilePath can not be null."
}
if(!(Test-Path($targetFilePath))) {
Write-Warning "'$targetFilePath' does not exist. If it is not created the shortcut will not be valid."
}
Write-Debug "Creating Shortcut..."
try {
$desktop = $([System.Environment]::GetFolderPath([System.Environment+SpecialFolder]::DesktopDirectory))
if(!(Test-Path($desktop))) {
[System.IO.Directory]::CreateDirectory($desktop) | Out-Null
}
$link = Join-Path $desktop "$([System.IO.Path]::GetFileName($targetFilePath)).lnk"
$workingDirectory = $([System.IO.Path]::GetDirectoryName($targetFilePath))
$wshshell = New-Object -ComObject WScript.Shell
$lnk = $wshshell.CreateShortcut($link)
$lnk.TargetPath = $targetFilePath
$lnk.WorkingDirectory = $workingDirectory
$lnk.Save()
Write-Host "Desktop Shortcut created pointing at `'$targetFilePath`'."
}
catch {
Write-Warning "Unable to create desktop link. Error captured was $($_.Exception.Message)."
}
}
# SIG # Begin signature block
# MIIcrQYJKoZIhvcNAQcCoIIcnjCCHJoCAQExDzANBglghkgBZQMEAgEFADB5Bgor
# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCArfTac+21Dw9Sp
# IE1G/3PQKTlQy0bK3yCZzZ3I4iUZ/aCCF7cwggUwMIIEGKADAgECAhAECRgbX9W7
# ZnVTQ7VvlVAIMA0GCSqGSIb3DQEBCwUAMGUxCzAJBgNVBAYTAlVTMRUwEwYDVQQK
# EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xJDAiBgNV
# BAMTG0RpZ2lDZXJ0IEFzc3VyZWQgSUQgUm9vdCBDQTAeFw0xMzEwMjIxMjAwMDBa
# Fw0yODEwMjIxMjAwMDBaMHIxCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2Vy
# dCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xMTAvBgNVBAMTKERpZ2lD
# ZXJ0IFNIQTIgQXNzdXJlZCBJRCBDb2RlIFNpZ25pbmcgQ0EwggEiMA0GCSqGSIb3
# DQEBAQUAA4IBDwAwggEKAoIBAQD407Mcfw4Rr2d3B9MLMUkZz9D7RZmxOttE9X/l
# qJ3bMtdx6nadBS63j/qSQ8Cl+YnUNxnXtqrwnIal2CWsDnkoOn7p0WfTxvspJ8fT
# eyOU5JEjlpB3gvmhhCNmElQzUHSxKCa7JGnCwlLyFGeKiUXULaGj6YgsIJWuHEqH
# CN8M9eJNYBi+qsSyrnAxZjNxPqxwoqvOf+l8y5Kh5TsxHM/q8grkV7tKtel05iv+
# bMt+dDk2DZDv5LVOpK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AIBATB2MGIxCzAJBgNVBAYTAlVTMRUw
# EwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20x
# ITAfBgNVBAMTGERpZ2lDZXJ0IEFzc3VyZWQgSUQgQ0EtMQIQAwGaAjr/WLFr1tXq
# 5hfwZjAJBgUrDgMCGgUAoF0wGAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAcBgkq
# hkiG9w0BCQUxDxcNMTYwNTA5MTQzNzAzWjAjBgkqhkiG9w0BCQQxFgQUExCH+YHx
# 0IwVAubBgBKT9SrqZ3QwDQYJKoZIhvcNAQEBBQAEggEAUNi08sRdJFY+SJ6T6TMQ
# VBXpdXZcJLs+DycnF6/ESvLFDlEITYL3kDgyK7wd0jKY/YTyeIEnX8QWPbk1gYNX
# dq0ojk/VIf50RH+YSGbMB4g1H6s4K8LPCEokcVmSZ+3xiUpq8dT79KbWcGmLG4fn
# ch0hlclcRONq842M9CFjyLPmNaoTNXenO9mBR4sZhSesgrZVq/KxbdnOYr2RcHrg
# zvpy9jLNGVWM9WrpQCd3cL7OdxHTkyb8tSn0LOFRWbbhH98DkQi+eciDxmeW2atR
# ozrzxFCkQpHq40G79QKTca7APCJJN2cea0PJdmt1Q/9ioGamEKvp+yfU6gBELhVE
# QQ==
# SIG # End signature block
# 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
# 6NjGJQC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6HL7Op
# INSrLG2Eg+pMyeGVfpUwDQYJKoZIhvcNAQEBBQAEggEAnBn1S7ZOXBzmLHytgqxq
# IMpi8nE6OE/d/AOM3yfaPpFOZ4S2XtIrG5i0deckaPyux7CFmL7kNXuoRguElbd4
# owV7MBrDTFCL55zE+DOm3dwRtcsgEYBH/tPzEd2FsI3iq9XW9b0c6N2X5EsHNyKq
# cLt07ArF3QXjrnYy9dsrWRR6UHo4nKvDnZQyHPHkMAfuFQbTEh3lth8mMHLgp5Uq
# 80+KGQMhRy+L+p3p3sehVEaySAORS9Yn4QOVOFtp+H6T0kTaEtrRnjL5KBa+hjzH
# qc5aLmty1tgTM1eSbOyfKf6uxbFdXZp1sW08n5l9s9C3kl32IvCHhD4CEpXjIFpG
# +w==
# SIG # End signature block
# 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
# ZXJ0IFNIQTIgQXN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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 "$packageName"
if ($env:packageVersion -ne $null) {$tempDir = Join-Path $tempDir "$env:packageVersion"; }
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
# KX7zUQIBAAIB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# hkiG9w0BCQUxDxcNMTYwNTA5MTQzNzA0WjAjBgkqhkiG9w0BCQQxFgQUHQmWVFt7
# xtG4flpV9ZpRvnAqsaswDQYJKoZIhvcNAQEBBQAEggEADUATBmQ+iA65FoKY2MfM
# 9+NrL7sDDaV5kI/cM/Iyx5XSxmkGUrOaHytVGt8Stg1ogAcSc1gl/0xnHAiq13X8
# fkXFQUvj7Khz0E4RKxdqauTWNHcuIGvlDiy4D5nuaNKxsgJf3MAxb9D8cMEkeQnj
# dsmDuuOGynaU/NTGvFy5LoAEnG6qWM7IswdbAk/Y6JBrgO2Txq19ST7kaB8/JahG
# 9LeNQnOp20KojuhB/6UCXwfk48db/u86wKVNUbs+8nyXkQEKrFCdbmOrZKrGrhFS
# v7aG/K8cW8qTBLlI7MrQd206v/n55z0i0dv74Kxncpp8f+yx1KXB3/za3xXNvIY8
# 4g==
# SIG # End signature block
# 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
# Fw0yODEwMjIxMjAwMDBaMH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pTEfIc5AsIbABAbrIEFtXENq4KsUIFyps+losCDqRyna
# ql+rx+m7wb2KvNZuq5sA3H7WFutqwcIiSNYFfzgQI4zBfaoBcrZZz1WA0NGb0e9K
# vA==
# SIG # End signature block
# 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 $pack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VBAsTEHd3dy5kaWdpY2VydC5jb20x
# ITAfBgNVBAMTGERpZ2lDZXJ0IEFzc3VyZWQgSUQgQ0EtMQIQAwGaAjr/WLFr1tXq
# 5hfwZjAJBgUrDgMCGgUAoF0wGAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAcBgkq
# hkiG9w0BCQUxDxcNMTYwNTA5MTQzNzA0WjAjBgkqhkiG9w0BCQQxFgQU35f2G/FL
# WzEwShCjY2GvTlqBTxgwDQYJKoZIhvcNAQEBBQAEggEACsxJidRfUNcrq+Wk+ZUw
# Cmv919PQUXaVuwqsSJR7TblHRrfCY74tmLf2nwyM6+oqpgYEN42x34scB4kHo7Bo
# YcDFqkP45pRRaOJkJonldy0filO6JTE+J1B7YS0UhiImYj/o3qwwTqzjLsL9+DnR
# LHn+euBSxt88edrvcMpad25Eyc6bzLTQR145HJAgiOjbVCTi4tJl64chBifHMvXg
# 31S1ydfsyl3cB7yDQBOp6Xwk0mGqDhSKvX49fcaxgvKGHhG7eeVrdV/K43XVHS4n
# nJtgT/2yDXLi9jeEOw+c74VKFMSVReOTYDC+KCLvsuhb2oHybag02IjwQSiEIEsY
# Ag==
# SIG # End signature block
# 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
# EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xJDAiBgNV
# BAMTG0RpZ2lDZXJ0IEFzc3VyZWQgSUQgUm9vdCBDQTAeFw0xMzEwMjIxMjAwMDBa
# Fw0yODEwMjIxMjAwMDBaMHIxCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2Vy
# dCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xMTAvBgNVBAMTKERpZ2lD
# ZXJ0IFNIQTIgQXNzdXJlZCBJRCBDb2RlIFNpZ25pbmcgQ0EwggEiMA0GC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FC
# MU/HoJRQ7oO9PO+yJnhAwDnYaVP3Y9o15j2ulaVYazixuEj2UKMecSlTU4FzrWMU
# g7stNF0WBxt9F/p9yMfBTn9mZHdBeT3qCpIm2xMUUuFhs+rDjqiUGEegEQAgn0yI
# SMwNfmNLo+6qMtqSOpCkW6Q4UIWPtDl7aJNv1U5JutigpZmUBQpbCGbxk27/ZooO
# pfnqBsqFE5njOQoLoP0oBNRTHQqWt2i9yJSqxAK0H519NDxLQPhqjE1T56bKGqGC
# Ag8wggILBgkqhkiG9w0BCQYxggH8MIIB+AIBATB2MGIxCzAJBgNVBAYTAlVTMRUw
# EwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20x
# ITAfBgNVBAMTGERpZ2lDZXJ0IEFzc3VyZWQgSUQgQ0EtMQIQAwGaAjr/WLFr1tXq
# 5hfwZjAJBgUrDgMCGgUAoF0wGAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAcBgkq
# hkiG9w0BCQUxDxcNMTYwNTA5MTQzNzA0WjAjBgkqhkiG9w0BCQQxFgQUiQi3cHYc
# 88+x83oSNexAsMlh1nQwDQYJKoZIhvcNAQEBBQAEggEARvgC9ut0ZJ/S3w/Uvauo
# rvpeHvGVPZx0W8GAnUiyV6BVpgwNe/DCCreMRn+tFv2XYNg+NQzlCVboCVFjT4nB
# l2VNEgyuZO8UPHEFHNcL1VtvzQEUURaVxZNN/79Rfhk185E1Q1XhQaEazBd2TFcU
# wo6VdVfOLo6eS0vB9VZ1+HabU17yJSlrmllyRptVzMeFMh3bkJ3yEGpG1qSfAG8Y
# jLnfvW8gFALkRqWe1x/6kIPGFd83ctJYSPjU8JxCqpLNwBfN1lG8GFgtmpqjD+iD
# JaGIWZ2/mR9g7azS3SCID4gF8jrAEL//uiWoJ0Gml7FoJ9dwyrq4vE6G/VrWKQT+
# Hg==
# SIG # End signature block
# 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+UQdGmRW1GCqCCF7cwggUwMIIEGKADAgECAhAECRgbX9W7
# ZnVTQ7VvlVAIMA0GCSqGSIb3DQEBCwUAMGUxCzAJBgNVBAYTAlVTMRUwEwYDVQQK
# EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xJDAiBgNV
# BAMTG0RpZ2lDZXJ0IEFzc3VyZWQgSUQgUm9vdCBDQTAeFw0xMzEwMjIxMjAwMDBa
# Fw0yODEwMjIxMjAwMDBaMHIxCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2Vy
# dCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xMTAvBgNVBAMTKERpZ2lD
# ZXJ0IFNIQTIgQXNzdXJlZCBJRCBDb2RlIFNpZ25pbmcgQ0EwggEiMA0GCSqGSIb3
# DQEBAQUAA4IBDwAwggEKAoIBAQD407Mc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YcmFPkMmK/rXkF/x1tw7TkLy
# E5jSAQIIEH2QqkWDL5TWg8ojjuv0yTe03dbLg9FdSbfZn7cJc7QRZXeOmCExqRJk
# 3SflHNkwBzEx/cDa6UeRC/E5wGhsyOyL1hqrP6lIQfgGhmM2/tye0Z4O9AKoPaqz
# gXpQ4WE30Wua6q0VHljz1kVsXR+nfekiuYjtqVKigTJH360lVzOCFALOQAUVcaGC
# Ag8wggILBgkqhkiG9w0BCQYxggH8MIIB+AIBATB2MGIxCzAJBgNVBAYTAlVTMRUw
# EwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20x
# ITAfBgNVBAMTGERpZ2lDZXJ0IEFzc3VyZWQgSUQgQ0EtMQIQAwGaAjr/WLFr1tXq
# 5hfwZjAJBgUrDgMCGgUAoF0wGAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAcBgkq
# hkiG9w0BCQUxDxcNMTYwNTA5MTQzNzA1WjAjBgkqhkiG9w0BCQQxFgQUKS7nV0cG
# aFCK+pI28HEcA0spxbEwDQYJKoZIhvcNAQEBBQAEggEAdAVAh+a4xvKBZaVwq7EB
# sFVprXtj8zLKdxTgfyinoY6w+P+K8X1kSk7dDEyY5vqT1XudIsZvJ5T3cyXlYH51
# GEk7dSixS1xCpUXboUJTlpRFwyBdBTLJdvjQhsGrVOINMwm2OVAw3poh4TenEkkY
# PtNc2ScRIb+dwFgf9OshZVeHpHs+TXLyTBBLP8Gh2AP1G6axOe4sOgHzFio8L4bX
# SxUH0ib2Qa1C1lm2q7ds6Pqo89Dt9k1LYDQMcd0w+8ajQ0GmpmG880EcvGSAmk92
# 0BwyTLR6kWG2TnjQHIji6xG5UhJJJSlzqI2s5sjYZUxErdpkCh6JTeqozdyT3YcA
# 1w==
# SIG # End signature block
# 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 "$packageName"
if ($env:packageVersion -ne $null) {$tempDir = Join-Path $tempDir "$env:packageVersion"; }
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
# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCBGOVEklPInj/4w
# GFsEtnvG8TunAsfYf6qyJIRj55/aKqCCF7cwggUwMIIEGKADAgECAhAECRgbX9W7
# ZnVTQ7VvlVAIMA0GCSqGSIb3DQEBCwUAMGUxCzAJBgNVBAYTAlVTMRUwEwYDVQQK
# EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xJDAiBgNV
# BAMTG0RpZ2lDZXJ0IEFzc3VyZWQgSUQgUm9vdCBDQTAeFw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CUkrkgrQePLyDyUgPcKW
# 5iNAgLTPjPVGPh74/W+WHlS5CzdkV8wXxz7DYroX7Onu9lnztsTAau200IjnktiA
# WCbnXvJO2A0IK6TPf0jiMYflfzDtvoKJVftSpJPNOt6l7rX/oU3bMLC1xYm5Z3es
# kw==
# SIG # End signature block
# 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
# BAMTG0RpZ2lDZXJ0IEFzc3Vy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K3bbT0ThjSI430AhSqkCuuU3IwV3gRrT2i4j3+wC44/jhZWbnDz
# NptPW9YKAkrbhmg2EPiUxbPsM5UfdptMVMUdyY2qQ8TeSvzBftoW4vn/riuRWagQ
# 6W5mN6UMjl9WQC/QtbPs+6TrFo3dxvtVk1BH8o/ApYKL9UxEW6bUpmJL8P3ADy9V
# 3A==
# SIG # End signature block
# 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
# dCBJbmM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iGntKZRStAPDC5DkHsyAhbmFpG7SCat0FRpQxvskwvXcq6bS0x8Y2a/
# uA==
# SIG # End signature block
# 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
# DQEBAQUAA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+EWI9nunahtDZtUke2GWU29giPej5F7nHF1BDAReKOJK
# xwy/1WbgY5yaLSeE2kO1egaFaZrVXiRUrO1fldm7pG0HujaLLFjYQhgUQkE9r3ec
# dZRkdhDRmvEuSW3c0ec5nkzvMxV6yvfaAKTy0gZH62ReuHV6HDkB8LCMeWdMyZDR
# ykV/frkATFPu3tqTfmhz8uuYAzZOyH9C3F7jvbimCA/LpuFWlALxKufbAkO4D6GC
# Ag8wggILBgkqhkiG9w0BCQYxggH8MIIB+AIBATB2MGIxCzAJBgNVBAYTAlVTMRUw
# EwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20x
# ITAfBgNVBAMTGERpZ2lDZXJ0IEFzc3VyZWQgSUQgQ0EtMQIQAwGaAjr/WLFr1tXq
# 5hfwZjAJBgUrDgMCGgUAoF0wGAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAcBgkq
# hkiG9w0BCQUxDxcNMTYwNTA5MTQzNzA1WjAjBgkqhkiG9w0BCQQxFgQUT8ChRKjz
# IcLSMSrMlhRCuFnU8yUwDQYJKoZIhvcNAQEBBQAEggEAotfI6fav54xdRYFeLjkq
# XHOwQKofJNMikSYslo2BCzjJAhXmRYGuy1p223dk6ICdOMoNLSrIAYnWtU7C7VFG
# PHhOE08YAqTzVrVO4ilvxuwDyVdZ0jLbxH3KK6Ek3f50Ed6pY+4QkKFK3ytlNNm9
# EWqj273YstIUc/JcymhWgK4FnxVGthMrQMJ6Ydh1gvRzmY2ptkbI60Q7Xg1Tl1fl
# sK1hb56w5GnrXpbmOMfvJvwUsniF8xNqReFNVgb/tSg/XLSLFrTLV6I5QKTUk6sh
# Qs340UP4R2pJa5QQVMMVwkMVWYFwJWJo1b/39mQvlec4ZD/sCRzDWfd43kQityis
# Jg==
# SIG # End signature block
# 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
# Fw0yODEwMjIxMjAwMDBaMHIxCz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BlHrnAJTnagVdq17M5QACN6Gn9aj7n
# VQfbXgo1fuJ6x+0Vlyb3SOjXLBdjWJP13QvH6hVQCLSEEcOLq1iCijp9ol2uxJlx
# NQ==
# SIG # End signature block
# 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
# MIIcrQYJKoZIhvcNAQcCoIIcnjCCHJoCAQExDzANBglghkgBZQMEAgEFADB5Bgor
# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCBNXoqf6rIiZMTp
# npg+RBhKCtL4wEd/8QA63nsM5mV6SKCCF7cwggUwMIIEGKADAgECAhAECRgbX9W7
# ZnVTQ7VvlVAIMA0GCSqGSIb3DQEBCwUAMGUxCzAJBgNVBAYTAlVTMRUwEwYDVQQK
# EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xJDAiBgNV
# BAMTG0RpZ2lDZXJ0IEFzc3VyZWQgSUQgUm9vdCBDQTAeFw0xMzEwMjIxMjAwMDBa
# Fw0yODEwMjIxMjAwMDBaMHIxCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2Vy
# dCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xMTAvBgNVBAMTKERpZ2lD
# ZXJ0IFNIQTIgQXNzdXJlZCBJRCBDb2RlIFNpZ25pbmcgQ0EwggEiMA0GCSqGSIb3
# DQEBAQUAA4IBDwAwggEKAoIBAQD407Mcfw4Rr2d3B9MLMUkZz9D7RZmxOttE9X/l
# qJ3bMtdx6nadBS63j/qSQ8Cl+YnUNxnXtqrwnIal2CWsDnkoOn7p0WfTxvspJ8fT
# eyOU5JEjlpB3gvmhhCNmElQzUHSxKCa7JGnCwlLyFGeKiUXULaGj6YgsIJWuHEqH
# CN8M9eJNYBi+qsSyrnAxZjNxPqxwoqvOf+l8y5Kh5TsxHM/q8grkV7tKtel05iv+
# bMt+dDk2DZDv5LVOpKnqagqrhPOsZ061xPeM0SAlI+sIZD5Sl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# EwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20x
# ITAfBgNVBAMTGERpZ2lDZXJ0IEFzc3VyZWQgSUQgQ0EtMQIQAwGaAjr/WLFr1tXq
# 5hfwZjAJBgUrDgMCGgUAoF0wGAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAcBgkq
# hkiG9w0BCQUxDxcNMTYwNTA5MTQzNzA1WjAjBgkqhkiG9w0BCQQxFgQUAl2NRxLy
# LZUWbJMQVpsBP1azUdQwDQYJKoZIhvcNAQEBBQAEggEAZvxg8YERQJ1uqsNYNoNY
# JmpvZksxPwVmCVp4PIUiJ0spfZh5Im9I/tCP2XO/86dyc7+fF1uNjK+tOghFdPi5
# Go0iyHV9PPwN/5SUhfnMjIf6vZac19QtFqDgzcjTLqv2wV7G0W3sDckaVcLGDQG8
# BotMidl7PsGUl0oaL9sQWAaIa66B29FpYOiYVqZbw/dfHUFAkviLS3Fm9cIbMdFX
# GD+xRzJFmMTfHOReFrcZJfMbUmlkF56rP6m8kb62xW6Zc0Xm6a3kl45hQ4SjyJyk
# qpFE773ld311vV+7bKfSzdXuDwEnKyY42OPnlrSHHpGwGLq0H80r4gVSR7rC8eRb
# oA==
# SIG # End signature block
# 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
# KX7zUQIBAAIBAAIBAAIBAAIB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YwNTA5MTQzNzA2WjAjBgkqhkiG9w0BCQQxFgQUQs4hyaEp
# 2wMnUrTgYL/0JT06B1QwDQYJKoZIhvcNAQEBBQAEggEAdgunoA5UJq4gkj1pGn6X
# qEk/GHQbI5KVMR7Z+tY/piCNqdKh2xQKf5HPcvBxrMNL9H+wPcsfIqX3+I7hyMGG
# UDgr8HJOYWlWe7/Zzsh9Dc90uS6fqVFZO+uZ/uvxhNnfi4oCAQ8aQsi9f1o4TUw8
# aDMMjCun2kH+CILC1rmbsG6NCIrm895zsl9LOL3zpQBj2wHyqOqvJ54xwVugtq6u
# Di5pNIQDB8TWa63hWeELiyB5mUsNaN+yKzCHzvMDeX+nfwc/IhbWOzOogXfUUqoE
# /zWya/j5c5UP2G2BNzKO0+7qWO8HeAl3WMdYn+6/ufRUOosoTbqdLzb2nW+pS4fQ
# lg==
# SIG # End signature block
# 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
# eyOU5JEjlpB3gvmhhCNmElQzUHSxKCa7JGnCwlLyFGeKiUXULaGj6YgsIJWuHEqH
# CN8M9eJNYBi+qsSyrnAxZ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VQIdGI4N83/U+8cGjTbZ7zet1DDuqGC
# Ag8wggILBgkqhkiG9w0BCQYxggH8MIIB+AIBATB2MGIxCzAJBgNVBAYTAlVTMRUw
# EwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20x
# ITAfBgNVBAMTGERpZ2lDZXJ0IEFzc3VyZWQgSUQgQ0EtMQIQAwGaAjr/WLFr1tXq
# 5hfwZjAJBgUrDgMCGgUAoF0wGAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAcBgkq
# hkiG9w0BCQUxDxcNMTYwNTA5MTQzNzA2WjAjBgkqhkiG9w0BCQQxFgQUiQPKv5v4
# RwVbYSorfq7VZXnmxqAwDQYJKoZIhvcNAQEBBQAEggEAWxh9UPyry2tTOB5C+f9R
# ru2eYa3uQk+m1XVpzMTT+8ivfeoqw253sUJdtrRUbrp/TQkyt9tCAK0L0EXmF2AP
# tg0gtHJeW0FBHxfeLkoL6j5VCz6OZTIWqJKlNxEzbCmdvr123Tz/w+IX/TqzLIlF
# XknAxubi5Go3uCJ+sr032SuQvLncpBwgdEJ46J73FI9t+jWfSq3Ff6pyOuP+38ym
# ZRheO3AFo05ZC6CWPzf6hEjg/+cx1jL+S6DWs9+4f+e4lAJXA5HlTlk4qNywln62
# c65u76XBGpZRQCdtjT9I5i1nyPs6yhoCLjULwPRg/H2hyn+k0MwTREdCLHYFov6T
# bQ==
# SIG # End signature block
# 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+uq5H8BF
# loZ1DFnicSm+N4Ma2YIpGMymRq+8HKCCF7cwggUwMIIEGKADAgECAhAECRgbX9W7
# ZnVTQ7VvlVAIMA0GCSqGSIb3DQEBCwUAMGUxCzAJBgNVBAYTAlVTMRUwEwYDVQQK
# EwxEaWd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/8bulDcW4JLGAquJhTeSFVilflJmOITZu4V4g/moZH5PfrYX/iXRE791b
# 1HWn/DpHG8n70x2+LDYCZNg7ASI9c0Qj9B7BmMiQO80KteNWrSSGZ7n52WCuKw7O
# 2ebwUivZ4U3zZijpZ2bDBDreQgZoV5CsF63R1D2VlbihX6kYyA2VLAQLdQyRFmdv
# IKS/yfgCB6QdoOYoRRN7RP7Bf2alZRRUEoddt6LCyzJtJMUik7DxStpPHfaGGvNq
# fg==
# SIG # End signature block
# 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+0ZWB
# Z+A7cvqx0Vbp9rJEU4MBr70gNHX1D6CCF7cwggUwMIIEGKADAgECAhAECRgbX9W7
# ZnVTQ7VvlVAIMA0GCSqGSIb3DQEBCwUAMGUxCzAJBgNVBAYTAlVTMRUwEwYDVQQK
# EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xJDAiBg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hT4XrhC
# V2At86x0zx1E9M+WD16wm+cvZeuUSjnow8mlnz2+szvtTvN8ShMYpCOM+F2xWxl5
# ckGuRCv5/pW6ZrEJ5pSh9ePqfm5fee9comDmA+B8k0kg7IfRZ+eIgsHEwfGpqMr4
# BWUfh2wPilP/G/2ouuxhj6ehoSoKRTqmdS9Qdupmtynd8NtyCaly6dQ2CviJ1vtk
# +w==
# SIG # End signature block
# 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
# jEdX3cE1Z7U7lRc3MsQ451DeEJGeiqCCF7cwggUwMIIEGKADAgECAhAECRgbX9W7
# ZnVTQ7VvlVAIMA0GCSqGSIb3DQEBCwUAMGUxCzAJBgNVBAYTAlVTMRUwEwYDVQQK
# EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xJDAiBgNV
# BAMTG0RpZ2lDZXJ0IEFzc3VyZWQgSUQgUm9vdCBDQTAeFw0xMzEwMjIxMjAwMDBa
# Fw0yODEwMjIxMjAwMDBaMHIxC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GjjTvr7av/9TWInEPk98Y1ohIS5bwcQWl6Yk8Ga
# qhwfAj/rCzmNihLe9eIl+nLqje1ZupOs2WNgIGIC47LkeSGOUcS54RJv3nOp4ZI8
# XA==
# SIG # End signature block
# 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
# MIIcrQYJKoZIhvcNAQcCoIIcnjCC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VyZWQgSUQgQ0EtMQIQAwGaAjr/WLFr1tXq
# 5hfwZjAJBgUrDgMCGgUAoF0wGAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAcBgkq
# hkiG9w0BCQUxDxcNMTYwNTA5MTQzNzA4WjAjBgkqhkiG9w0BCQQxFgQUJZLfhPlX
# 4411sH9hNPmdAxY9bHswDQYJKoZIhvcNAQEBBQAEggEAaquoq6dd6l64YP67OEWv
# 2dl+8gRMKfckcJbEz9JpAvRqtO3dyYcKreO23A3GJxkdOkEHV0h7b1mueMERGeIB
# PRVI0t2O9Gmho5PXs32RgnX2MXKKhhC4lH/61inymvXZnyUfJ7dRxjXTGmA+mtu+
# ZTHYuWSOs41zP4hD8ZPlETkDIb8Ah+QI5QPZWW9XYBLhAhV9dEirpm/qVWz2xvj9
# rhjdOSSqcEC2PFHtOM+DUiQmIyfkAL/dHjUCS7V6yV8deLMX4oOBzY3TERf6EobB
# 9bX0EYvCNCgzys8Xw3Zl249bqG6SyOnudFFl8ZcDuSrPd0Yk1VTrgwPS9w9CL6NA
# PA==
# SIG # End signature block
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.
md5: E6EA6DD3B52E58714CBBF2082C5B46B1 | sha1: E85EC4B72D99EF09D8F3B8EA91EFB86BD46585FA | sha256: D5C933D67A339BEDA4D3A947441B562A71DFDB4135EB40092AB6164FDE9F4D29 | sha512: 746090B46E482500A079911C216D6A8627E94E6DA599F2BF5502561C753FB771DFD8B9CE21EAC29726891B58AABF2ACB02B78D896F029014E636AA5244CB3707
md5: 3A229D2FA475C30B715D32D5854A29C9 | sha1: D6A42C4E1AB228F05BFB424FDC79C1B85120F28B | sha256: 9F7AB7CCED449BD19A6377472FFE484DE4F0A0030E6A250BF776B5AF9390366B | sha512: FC2AD532B084A1724690BB2D79102E2D2230016844D88F17DADD7E28FCC84EF83ADFD7BFFBB9BD4FE7A17192096D05C6EFA1A00B03A10848078C7CE987CCC678
md5: 5C1860A55870A906A9D9B3698AC6D855 | sha1: BB7459188029CC09FC68FB111EC10B175BE8E8C9 | sha256: C8156F73D6C98D7D8F798756F1D020F146851955062B3292137F3D41886FFC3B | sha512: FEA9C199F1CA103346DAE17DC4B56AA57A2352FB50167ADB755C37B9FB83B605275B49F4956CB19FE5920EE4336A427E5278BD9D8BF47CE38E4951BBC38F2CEF
md5: 375DB4E0E19BC668F6F4D1D4FFBFD8FF | sha1: C0D44E997C1BC5F1DA879DDDA41626CB6BE53199 | sha256: 234A463E0FB7AE0A6E566BD3FFB757ADA75A4556BB71FF786BB561C0D07E75AF | sha512: 43DC381D1B5A2856BAE2A06CA1FA18A3064299B93C6A13CCC411ED3A410688B0855FFDD8EE08CD55B907DB1771489756C45F46A1F35EE98713F8753B6A8DFB33
md5: 8608AAC98648859C5386AF6414F941AB | sha1: 7280B41733B1A685331A140B3619090EA014A2C9 | sha256: 9E49F701919E9C820B3DAED0ABAACC3830D39A6229AE72F661C45E885C10AA6C | sha512: C820B5313F2CFD12B3AE4FF26B89A8B7B1E1DC699EA7056A433F729C7DD362016ED6A18CC9A2367F828681EFD35B5B53A0E6A0AD27093F05587FB2EB159EE7A9
md5: 2A3182A09CAD7457A994DD696A64FE5B | sha1: 732A670C6E3D6B2F751DA7B34F4D220982A4154C | sha256: A12730D58611BF7E385CDC95ACD843A17F359690EA61D922B9764C8B669577C8 | sha512: 089DF29F8B5F96E3692052B7A8A77205AAFE48F4E80DC6E36ABA193BF013A17C11F8C47B870E5864F3B897C1C52159BACFAA124C0F74EB30122546EFA725ECD6
md5: AA9C60B4EEB80A0652A3CB3C3F0926CB | sha1: 42B930E1DFBB618B6B91453556B834CAF1879FBB | sha256: BE34CEA608A92CEF55489BFAD3432F9F214B9C87920D6DA47B8478BFBA239EE3 | sha512: 4D0CAC56148E9DF966903C3AB5E5206E76BCAADA8EEDB1606E496474B146974C7BFD8AC461DE743444C776CD914F8E6AD9B85915A283A6A295A89EF0E79CFC79
md5: BF273F06221B94CEA45C95C15DD112D2 | sha1: 8392FF33543789C27326DEEC8554FA0CBE2426B2 | sha256: 9108BD8ED22DD28CB8BE56FAD5BE950283C896030A3029412CC57889AD269154 | sha512: 2FFB826D4D08C1E815892E92EBB12006861C674497A3425126EB2FDFEE2734BA68D9E56DB53690E1DB96FFF3346E3C975B9F3B644ECDAF8F952F219ED829F6BF
md5: D6D71164D063F8CEBFBC2DFE24B1904D | sha1: 9E06495842688AF19DC6798F2FAFA47BE8DFEBB4 | sha256: 5B7E77443167E252A870C11A39BD19FC8E5E5AC415B4110F677F6354330E9713 | sha512: E700D2FC38D25A54508F08A0D3E6742F42E034956E007276BAFE2D7825BFD9A83DC073D32C1C4DC7388FD5F8577C73AE855EE1EF549AC2CB9F29FDDEE1B3AE0A
@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 .
md5: 42BADC1D2F03A8B1E4875740D3D49336 | sha1: CEE178DA1FB05F99AF7A3547093122893BD1EB46 | sha256: C136B1467D669A725478A6110EBAAAB3CB88A3D389DFA688E06173C066B76FCF | sha512: 6BC519A7368EE6BD8C8F69F2D634DD18799B4CA31FBC284D2580BA625F3A88B6A52D2BC17BEA0E75E63CA11C10356C47EE00C2C500294ABCB5141424FC5DC71C
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/
md5: EC229F69ADDF66460925B07A36B2642F | sha1: 94D4831ABB7854A188CA7E1DB4F0CF976DF47391 | sha256: F2CD93E6A0B98CAC65F5EB981F61EFC0A0F46FBA091F837345DD0B5CA68F3076 | sha512: 52A645696508C462697E0A6E8E523B434C47B4EDDFFBEA621699FE69F0B21354720E14E2587DF93AD5A645CA6CE3FD35B1BCFAA6A94040B67790D6CA88738EBA
CheckSum is licensed as Apache v2 - https://raw.github.com/ferventcoder/checksum/master/LICENSE
md5: 2D607C9E6AAC0334ECA99A2FF02C179A | sha1: 8F744E72E0E7F25A7B4CB155AE82A98DD56C578E | sha256: 907F5FED113A746BFECBECF861F226927376EC457B88F16C2E56B99C8594EA19 | sha512: 28A38549BD56B3D50DC683420C54F658E8BC790563809B4F9E7712CE650367A457EA16B7A9300C1BBDD366A771D7A55F221547FC48390D86056F2985A2C0E9B6
md5: 2D2D2B527674CE59928AFD7E9F2A6E54 | sha1: DBEB80E73122D8734A6FB0D2D0AF091A17DD8892 | sha256: B8445EBF02C13EE25016E1F31E918B204759CC054AC54F4805AE498EDB87C852 | sha512: 7425626AE0290A1E04C974360A1EE42B1473DCC8E5CFA66FB305488ED4E17A512920146175845945FA20C898DD2A74E686E93573375FE41F28B2CBE32B46010D
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
$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-DotNet4IfM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bmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20x
# ITAfBgNVBAMTGERpZ2lDZXJ0IEFzc3VyZWQgSUQgQ0EtMQIQAwGaAjr/WLFr1tXq
# 5hfwZjAJBgUrDgMCGgUAoF0wGAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAcBgkq
# hkiG9w0BCQUxDxcNMTYwNTA5MTQzNzEzWjAjBgkqhkiG9w0BCQQxFgQUHAu0wVGB
# JBUQkmo7u/rovYrz8ycwDQYJKoZIhvcNAQEBBQAEggEAUkbVEHG54on1timucjTZ
# dzYxZeXpZ4+epEDILOh3uJujGcrKKkAsqqX1j3/2065u4Z+Xyr7gMpqjR8vLIwEk
# z3lQZBkxSNboE5+/CaXFrlT+pE2BRQpQa0m16snFaJQBtDbQefd5UR13OH8V06tY
# qn8MYnUqE+ZHy0MArwZny6Q3jbgX5/nLOFzqhi7DCzKFwoPy6ro1vspkJTDb26/0
# Y2Z4tP48WpCr33F82V1ALveVV6LNNplhfpmnKGXH+5oQIkhKME0II3xdD3h2t2yi
# sRUlyETcnEc/437/SB1XE9OiV1rExatBKvW0/KnF6H0SJECRh13Ijng/oSFbhDJG
# Gw==
# SIG # End signature block
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.
- 7za.exe (c136b1467d66) - ## / 72
- detector.zip (907f5fed113a) - ## / 57
- chocolatey.0.9.10-beta-20160509.nupkg (62c2de0e27e1) - ## / 57
- checksum.exe (f2cd93e6a0b9) - ## / 57
- choco.exe (d5c933d67a33) - ## / 57
- chocolatey.exe (9f7ab7cced44) - ## / 57
- cinst.exe (c8156f73d6c9) - ## / 57
- clist.exe (234a463e0fb7) - ## / 57
- cpack.exe (9e49f701919e) - ## / 57
- cpush.exe (a12730d58611) - ## / 57
- cuninst.exe (be34cea608a9) - ## / 56
- cup.exe (9108bd8ed22d) - ## / 57
- cver.exe (5b7e77443167) - ## / 57
- shimgen.exe (b8445ebf02c1) - ## / 57
- choco.exe (80612f4befb0) - ## / 57
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.4.0 | 1599531 | Tuesday, November 12, 2024 | Approved |
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 |
RealDimensions Software, LLC - 2011-Present
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 <tab>
to choco install node<tab>
? How about never having to close and reopen your shell again?
Alternative sources (-source webpi
, -s windowsfeature
, etc) are back! I mean, am I right?! Have you heard of auto uninstaller? If Chocolatey has installed something that works with Programs and Features, Chocolatey knows how to uninstall it without an uninstall script about 90+% of the time. This feature was in beta for the 0.9.9 series, it is on by default in 0.9.10 (unless you disabled it after trying it, you will need to reenable it, see choco feature
for more details).
Here's one you probably never knew existed - extensions. Chocolatey has had the ability to extend itself by adding PowerShell modules for years, and most folks either didn't know it existed or have never used them. We've enhanced them a bit in preparation for the licensed version of Chocolatey.
We redesigned our choco new
default packaging template and we've made managing templates as easy as managing packages.
choco search
/choco list
has so many enhancements, you may not need to visit dot org again. See it in action.
- search -v provides moderation related information and a world of nuspec information
- search by id only
- search by id exact
- search by approved only, not broken, and/or by download cache
- sort by version
- search with paging
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 - Pro/Business - Ubiquitous Install Directory Switch - see #258
- Pro/Business - Runtime Virus Scanning - see virus scanning
- Pro/Business - Permanent private download location - see alternate download location
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
- 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
updatesPATH
toREG_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
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
- 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.
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.