diff --git a/.build.custom/GenerateDocs.ps1 b/.build.custom/GenerateDocs.ps1 new file mode 100644 index 0000000000..b099c3d778 --- /dev/null +++ b/.build.custom/GenerateDocs.ps1 @@ -0,0 +1,358 @@ +# 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. + +# Special thanks to Glenn Sarti (https://github.com/glennsarti) for his help on this. + +$ErrorActionPreference = 'Stop' + +$thisDirectory = (Split-Path -parent $MyInvocation.MyCommand.Definition); +$psModuleName = 'chocolateyInstaller' +$psModuleLocation = [System.IO.Path]::GetFullPath("$thisDirectory\..\src\chocolatey.resources\helpers\chocolateyInstaller.psm1") +$docsFolder = [System.IO.Path]::GetFullPath("$thisDirectory\..\docs\generated") +$chocoExe = [System.IO.Path]::GetFullPath("$thisDirectory\..\code_drop\chocolatey\console\choco.exe") +$lineFeed = "`r`n" +$global:powerShellReferenceTOC = @' +# PowerShell Functions aka Helpers Reference + +## Main Functions + +These functions call other functions and many times may be the only thing you need in your [[chocolateyInstall.ps1 file|ChocolateyInstallPS1]]. + +* [[Install-ChocolateyPackage|HelpersInstallChocolateyPackage]] +* [[Install-ChocolateyZipPackage|HelpersInstallChocolateyZipPackage]] +* [[Install-ChocolateyPowershellCommand|HelpersInstallChocolateyPowershellCommand]] +* [[Install-ChocolateyVsixPackage|HelpersInstallChocolateyVsixPackage]] + +## Error / Success Functions + +* [[Write-ChocolateySuccess|HelpersWriteChocolateySuccess]] - **DEPRECATED** +* [[Write-ChocolateyFailure|HelpersWriteChocolateyFailure]] - **DEPRECATED** + +You really don't need a try catch with Chocolatey PowerShell files anymore. + +## More Functions + +### Administrative Access Functions + +When creating packages that need to run one of the following commands below, one should add the tag `admin` to the nuspec. + +* [[Install-ChocolateyPackage|HelpersInstallChocolateyPackage]] +* [[Start-ChocolateyProcessAsAdmin|HelpersStartChocolateyProcessAsAdmin]] +* [[Install-ChocolateyInstallPackage|HelpersInstallChocolateyInstallPackage]] +* [[Install-ChocolateyPath|HelpersInstallChocolateyPath]] - when specifying machine path +* [[Install-ChocolateyEnvironmentVariable|HelpersInstallChocolateyEnvironmentVariable]] - when specifying machine path +* [[Install-ChocolateyExplorerMenuItem|HelpersInstallChocolateyExplorerMenuItem]] +* [[Install-ChocolateyFileAssociation|HelpersInstallChocolateyFileAssociation]] + +### Non-Administrator Safe Functions + +When you have a need to run Chocolatey without Administrative access required (non-default install location), you can run the following functions without administrative access. + +These are the functions from above as one list. + +* [[Install-ChocolateyZipPackage|HelpersInstallChocolateyZipPackage]] +* [[Install-ChocolateyPowershellCommand|HelpersInstallChocolateyPowershellCommand]] +* [[Write-ChocolateySuccess|HelpersWriteChocolateySuccess]] +* [[Write-ChocolateyFailure|HelpersWriteChocolateyFailure]] +* [[Get-ChocolateyWebFile|HelpersGetChocolateyWebFile]] +* [[Get-ChocolateyUnzip|HelpersGetChocolateyUnzip]] +* [[Install-ChocolateyPath|HelpersInstallChocolateyPath]] - when specifying user path +* [[Install-ChocolateyEnvironmentVariable|HelpersInstallChocolateyEnvironmentVariable]] - when specifying user path +* [[Install-ChocolateyDesktopLink|HelpersInstallChocolateyDesktopLink]] - **DEPRECATED** - see [[Install-ChocolateyShortcut|HelpersInstallChocolateyShortcut]] +* [[Install-ChocolateyPinnedTaskBarItem|HelpersInstallChocolateyPinnedTaskBarItem]] +* [[Install-ChocolateyShortcut|HelpersInstallChocolateyShortcut]] - v0.9.9+ +* [[Update-SessionEnvironment|HelpersUpdateSessionEnvironment]] + +## Complete List (alphabetical order) + +'@ + +function Convert-Example($objItem) { + @" +**$($objItem.title.Replace('-','').Trim())** + +~~~powershell +$($objItem.Code.Replace("`n",$lineFeed)) +$($objItem.remarks | ? { $_.Text -ne ''} | % { Write-Output $_.Text.Replace("`n", $lineFeed) }) +~~~ +"@ +} + +function Replace-CommonItems($text) { + if ($text -eq $null) {return $text} + + $text = $text.Replace("`n",$lineFeed) + $text = $text -replace '(community feed[s]?|community repository)', '[$1](https://chocolatey.org/packages)' + $text = $text -replace '(Chocolatey for Business|Chocolatey Pro[fessional]*)', '[$1](https://chocolatey.org/compare)' + $text = $text -replace '(Pro[fessional]\s?/\s?Business)', '[$1](https://chocolatey.org/compare)' + $text = $text -replace '([Ll]icensed editions)', '[$1](https://chocolatey.org/compare)' + $text = $text -replace '([Ll]icensed versions)', '[$1](https://chocolatey.org/compare)' + + Write-Output $text +} + +function Convert-Syntax($objItem, $hasCmdletBinding) { + $cmd = $objItem.Name + + if ($objItem.parameter -ne $null) { + $objItem.parameter | % { + $cmd += ' `' + $lineFeed + $cmd += " " + if ($_.required -eq $false) { $cmd += '['} + $cmd += "-$($_.name.substring(0,1).toupper() + $_.name.substring(1))" + + + if ($_.parameterValue -ne $null) { $cmd += " <$($_.parameterValue)>" } + if ($_.parameterValueGroup -ne $null) { $cmd += " {" + ($_.parameterValueGroup.parameterValue -join ' | ') + "}"} + if ($_.required -eq $false) { $cmd += ']'} + } + } + if ($hasCmdletBinding) { $cmd += " []"} + Write-Output "$lineFeed~~~powershell$lineFeed$($cmd)$lineFeed~~~" +} + +function Convert-Parameter($objItem, $commandName) { + $parmText = $lineFeed + "### -$($objItem.name.substring(0,1).ToUpper() + $objItem.name.substring(1))" + if ( ($objItem.parameterValue -ne $null) -and ($objItem.parameterValue -ne 'SwitchParameter') ) { + $parmText += ' ' + if ([string]($objItem.required) -eq 'false') { $parmText += "["} + $parmText += "<$($objItem.parameterValue)>" + if ([string]($objItem.required) -eq 'false') { $parmText += "]"} + } + $parmText += $lineFeed + if ($objItem.description -ne $null) { + $parmText += (($objItem.description | % { Replace-CommonItems $_.Text }) -join "$lineFeed") + $lineFeed + $lineFeed + } + if ($objItem.parameterValueGroup -ne $null) { + $parmText += "$($lineFeed)Valid options: " + ($objItem.parameterValueGroup.parameterValue -join ", ") + $lineFeed + $lineFeed + } + + $aliases = [string]((Get-Command -Name $commandName).parameters."$($objItem.Name)".Aliases -join ', ') + $required = [string]($objItem.required) + $position = [string]($objItem.position) + $defValue = [string]($objItem.defaultValue) + $acceptPipeline = [string]($objItem.pipelineInput) + + $padding = ($aliases.Length, $required.Length, $position.Length, $defValue.Length, $acceptPipeline.Length | Measure-Object -Maximum).Maximum + + $parmText += @" +Property | Value +---------------------- | $([string]('-' * $padding)) +Aliases | $($aliases) +Required? | $($required) +Position? | $($position) +Default Value | $($defValue) +Accept Pipeline Input? | $($acceptPipeline) + +"@ + + Write-Output $parmText +} + +function Convert-CommandText { +param( + [string]$commandText, + [string]$commandName = '' +) + if ( $commandText -match '^\s?NOTE: Options and switches apply to all items passed, so if you are\s?$' ` + -or $commandText -match '^\s?installing multiple packages, and you use \`\-\-version\=1\.0\.0\`, it is\s?$' ` + -or $commandText -match '^\s?going to look for and try to install version 1\.0\.0 of every package\s?$' ` + -or $commandText -match '^\s?passed\. So please split out multiple package calls when wanting to\s?$' ` + -or $commandText -match '^\s?pass specific options\.\s?$' ` + ) { + return + } + $commandText = $commandText -creplace '^(.+)(\s+Command\s*)$', "# `$1`$2 (choco $commandName)" + $commandText = $commandText -replace '^(Usage|Troubleshooting|Examples|Connecting to Chocolatey.org|See It In Action|Alternative Sources|Resources|Packages.config)', '## $1' + $commandText = $commandText -replace '^(Commands|How To Pass Options)', '## $1' + $commandText = $commandText -replace '^(WebPI|Windows Features|Ruby|Cygwin|Python)\s*$', '### $1' + $commandText = $commandText -replace 'NOTE\:', '**NOTE:**' + $commandText = $commandText -replace 'the command reference', '[[how to pass arguments|CommandsReference#how-to-pass-options--switches]]' + $commandText = $commandText -replace '(community feed[s]?|community repository)', '[$1](https://chocolatey.org/packages)' + #$commandText = $commandText -replace '\`(apikey|install|upgrade|uninstall|list|search|info|outdated|pin)\`', '[[`$1`|Commands$1]]' + $commandText = $commandText -replace '\`([choco\s]*)(apikey|install|upgrade|uninstall|list|search|info|outdated|pin)\`', '[[`$1$2`|Commands$2]]' + $commandText = $commandText -replace '^(.+):\s(.+.gif)$', '![$1]($2)' + $commandText = $commandText -replace '^(\s+)\<\?xml', "~~~xml$lineFeed`$1', "`$1$lineFeed~~~" + $commandText = $commandText -replace '(Chocolatey for Business|Chocolatey Pro[fessional]*)', '[$1](https://chocolatey.org/compare)' + $commandText = $commandText -replace '(Pro[fessional]\s?/\s?Business)', '[$1](https://chocolatey.org/compare)' + $commandText = $commandText -replace '([Ll]icensed editions)', '[$1](https://chocolatey.org/compare)' + $commandText = $commandText -replace '([Ll]icensed versions)', '[$1](https://chocolatey.org/compare)' + + $optionsSwitches = @' +## $1 + +**NOTE:** Options and switches apply to all items passed, so if you are + running a command like install that allows installing multiple + packages, and you use `--version=1.0.0`, it is going to look for and + try to install version 1.0.0 of every package passed. So please split + out multiple package calls when wanting to pass specific options. + +Includes [[default options/switches|CommandsReference#default-options-and-switches]] (included below for completeness). + +~~~ +'@ + + $commandText = $commandText -replace '^(Options and Switches)', $optionsSwitches + + $optionsSwitches = @' +## $1 + +**NOTE:** Options and switches apply to all items passed, so if you are + running a command like install that allows installing multiple + packages, and you use `--version=1.0.0`, it is going to look for and + try to install version 1.0.0 of every package passed. So please split + out multiple package calls when wanting to pass specific options. + +~~~ +'@ + + $commandText = $commandText -replace '^(Default Options and Switches)', $optionsSwitches + + Write-Output $commandText +} + +function Convert-CommandReferenceSpecific($commandText) { + $commandText = $commandText -replace '\s?\s?\*\s(\w+)\s\-', ' * [[$1|Commands$1]] -' + $commandText = $commandText.Replace("## Default Options and Switches", "## See Help Menu In Action$lineFeed$lineFeed![choco help in action](https://raw.githubusercontent.com/wiki/chocolatey/choco/images/gifs/choco_help.gif)$lineFeed$lineFeed## Default Options and Switches") + + Write-Output $commandText +} + +function Generate-TopLevelCommandReference { + Write-Host "Generating Top Level Command Reference" + $fileName = "$docsFolder\CommandsReference.md" + $commandOutput = @("# Command Reference$lineFeed") + $commandOutput += $(& $chocoExe -? -r) + $commandOutput += @("$lineFeed~~~$lineFeed") + $commandOutput += @("$lineFeed$lineFeed*NOTE:* This documentation has been automatically generated from ``choco -h``. $lineFeed") + + $commandOutput | %{ Convert-CommandText($_) } | %{ Convert-CommandReferenceSpecific($_) } | Out-File $fileName -Encoding UTF8 -Force +} + +function Generate-CommandReference($commandName) { + $fileName = Join-Path $docsFolder "Commands$($commandName.substring(0,1).toupper() + $commandName.substring(1)).md" + Write-Host "Generating $fileName ..." + $commandOutput += $(& $chocoExe $commandName -h -r) + $commandOutput += @("$lineFeed~~~$lineFeed$lineFeed[[Command Reference|CommandsReference]]") + $commandOutput += @("$lineFeed$lineFeed*NOTE:* This documentation has been automatically generated from ``choco $commandName -h``. $lineFeed") + $commandOutput | %{ Convert-CommandText $_ $commandName } | Out-File $fileName -Encoding UTF8 -Force +} + +try +{ + Write-Host "Importing the Module $psModuleName ..." + Import-Module "$psModuleLocation" -Force -Verbose + + if (Test-Path($docsFolder)) { Remove-Item $docsFolder -Force -Recurse -EA SilentlyContinue } + if(-not(Test-Path $docsFolder)){ mkdir $docsFolder -EA Continue | Out-Null } + + Write-Host 'Creating per PowerShell function markdown files...' + Get-Command -Module $psModuleName | ForEach-Object -Process { Get-Help $_ -Full } | ForEach-Object -Process { ` + $commandName = $_.Name + $fileName = Join-Path $docsFolder "Helpers$($_.Name.Replace('-','')).md" + $global:powerShellReferenceTOC += "$lineFeed * [[$commandName|$([System.IO.Path]::GetFileNameWithoutExtension($fileName))]]" + $hasCmdletBinding = (Get-Command -Name $commandName).CmdLetBinding + + Write-Host "Generating $fileName ..." + @" +# $($_.Name) + +$(Replace-CommonItems $_.Synopsis) + +## Syntax +$( ($_.syntax.syntaxItem | % { Convert-Syntax $_ $hasCmdletBinding }) -join "$lineFeed$lineFeed") +$( if ($_.description -ne $null) { $lineFeed + "## Description" + $lineFeed + $lineFeed + $(Replace-CommonItems $_.description.Text) }) +$( if ($_.alertSet -ne $null) { $lineFeed + "## Notes" + $lineFeed + $lineFeed + $(Replace-CommonItems $_.alertSet.alert.Text) }) + +## Aliases + +$( if ($_.aliases -ne $null) { $_.aliases } else { 'None'} ) + +## Inputs + +$( if ($_.InputTypes -ne $null -and $_.InputTypes.Length -gt 0 -and -not $_.InputTypes.Contains('inputType')) { $lineFeed + " * $($_.InputTypes)" + $lineFeed} else { 'None'}) + +## Outputs + +$( if ($_.ReturnValues -ne $null -and $_.ReturnValues.Length -gt 0 -and -not $_.ReturnValues.StartsWith('returnValue')) { "$lineFeed * $($_.ReturnValues)$lineFeed"} else { 'None'}) + +## Parameters +$( if ($_.parameters.parameter.count -gt 0) { $_.parameters.parameter | % { Convert-Parameter $_ $commandName }}) $( if ($hasCmdletBinding) { "$lineFeed### <CommonParameters>$lineFeed$($lineFeed)This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see ``about_CommonParameters`` http://go.microsoft.com/fwlink/p/?LinkID=113216 ." } ) + +$( if ($_.Examples -ne $null) { Write-Output "$lineFeed## Examples$lineFeed$lineFeed"; ($_.Examples.Example | % { Convert-Example $_ }) -join "$lineFeed$lineFeed" }) +$( if ($_.relatedLinks -ne $null) {Write-Output "$lineFeed## Links$lineFeed$lineFeed"; $_.relatedLinks.navigationLink | ? { $_.linkText -ne $null} | % { Write-Output "* [[$($_.LinkText)|Helpers$($_.LinkText.Replace('-',''))]]$lineFeed" }}) + +[[Function Reference|HelpersReference]] + +***NOTE:*** This documentation has been automatically generated from ``Import-Module `"`$env:ChocolateyInstall\helpers\chocolateyInstaller.psm1`" -Force; Get-Help $($_.Name) -Full``. +"@ | Out-File $fileName -Encoding UTF8 -Force + } + + Write-Host "Generating Top Level PowerShell Reference" + $fileName = Join-Path $docsFolder 'HelpersReference.md' + + $global:powerShellReferenceTOC += @' + +## Variables + +There are also a number of environment variables providing access to some values from the nuspec and other information that may be useful. They are accessed via `$env:variableName`. + +* __chocolateyPackageFolder__ = the folder where Chocolatey has downloaded and extracted the NuGet package, typically `C:\ProgramData\chocolatey\lib\packageName`. +* __chocolateyPackageName__ (since 0.9.9.0) = The package name, which is equivalent to the `` tag in the nuspec +* __chocolateyPackageVersion__ (since 0.9.9.0) = The package version, which is equivalent to the `` tag in the nuspec + +`chocolateyPackageVersion` may be particularly useful, since that would allow you in some cases to create packages for new releases of the updated software by only changing the `` in the nuspec and not having to touch the `chocolateyInstall.ps1` at all. An example of this: + +~~~powershell +$url = "http://www.thesoftware.com/downloads/thesoftware-$env:chocolateyPackageVersion.zip" + +Install-ChocolateyZipPackage '$env:chocolateyPackageName' $url $binRoot +~~~ +'@ + + $global:powerShellReferenceTOC | Out-File $fileName -Encoding UTF8 -Force + + Write-Host "Generating command reference markdown files" + Generate-CommandReference('list') + Generate-CommandReference('search') + Generate-CommandReference('info') + Generate-CommandReference('install') + Generate-CommandReference('pin') + Generate-CommandReference('outdated') + Generate-CommandReference('upgrade') + Generate-CommandReference('uninstall') + Generate-CommandReference('config') + Generate-CommandReference('source') + Generate-CommandReference('sources') + Generate-CommandReference('feature') + Generate-CommandReference('features') + Generate-CommandReference('new') + Generate-CommandReference('pack') + Generate-CommandReference('apiKey') + Generate-CommandReference('setapiKey') + Generate-CommandReference('push') + Generate-CommandReference('unpackself') + Generate-CommandReference('update') + Generate-CommandReference('version') + Generate-TopLevelCommandReference + + Exit 0 +} +catch +{ + Throw "Failed to generate documentation. $_" + Exit 255 +} diff --git a/CHANGELOG.md b/CHANGELOG.md index e8d1660998..2e693530dd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -82,7 +82,7 @@ If you need the previous behavior, be sure to disable the feature `usePackageExi * Fix - Logger doesn't clear cached NullLoggers - see [#516](https://github.com/chocolatey/choco/issues/516) * Fix - DISM "/All" argument in the wrong position - see [#480](https://github.com/chocolatey/choco/issues/480) * Fix - Pro - Installing/uninstalling extensions should rename files in use - see [#594](https://github.com/chocolatey/choco/issues/594) - * Fix - Running Get-FileName in PowerShell 5 fails and sometimes causes package errors - see [#603](https://github.com/chocolatey/choco/issues/603) + * Fix - Running Get-WebFileName in PowerShell 5 fails and sometimes causes package errors - see [#603](https://github.com/chocolatey/choco/issues/603) * Fix - Merging assemblies on a machine running .Net 4.5 or higher produces binaries incompatible with .Net 4 - see [#392](https://github.com/chocolatey/choco/issues/392) * Fix - API - Incorrect log4net version in chocolatey.lib dependencies - see [#390](https://github.com/chocolatey/choco/issues/390) * [POSH Host] Fix - Message after Download progress is on the same line sometimes - see [#525](https://github.com/chocolatey/choco/issues/525) diff --git a/docs/generated/CommandsApiKey.md b/docs/generated/CommandsApiKey.md new file mode 100644 index 0000000000..39572964fa --- /dev/null +++ b/docs/generated/CommandsApiKey.md @@ -0,0 +1,101 @@ +# ApiKey Command (choco apiKey) + +This lists api keys that are set or sets an api key for a particular + source so it doesn't need to be specified every time. + +Anything that doesn't contain source and key will list api keys. + +## Usage + + choco apikey [] + choco setapikey [] + +## Examples + + choco apikey + choco apikey -s"https://somewhere/out/there" + choco apikey -s"https://somewhere/out/there/" -k="value" + choco apikey -s"https://chocolatey.org/" -k="123-123123-123" + +## Connecting to Chocolatey.org + +In order to save your API key for https://chocolatey.org/, + log in (or register, confirm and then log in) to + https://chocolatey.org/, go to https://chocolatey.org/account, + copy the API Key, and then use it in the following command: + + choco apikey -k -s https://chocolatey.org/ + + +## Options and Switches + +**NOTE:** Options and switches apply to all items passed, so if you are + running a command like install that allows installing multiple + packages, and you use `--version=1.0.0`, it is going to look for and + try to install version 1.0.0 of every package passed. So please split + out multiple package calls when wanting to pass specific options. + +Includes [[default options/switches|CommandsReference#default-options-and-switches]] (included below for completeness). + +~~~ + + -?, --help, -h + Prints out the help menu. + + -d, --debug + Debug - Run in Debug Mode. + + -v, --verbose + Verbose - See verbose messaging. + + --acceptlicense, --accept-license + AcceptLicense - Accept license dialogs automatically. + + -y, --yes, --confirm + Confirm all prompts - Chooses affirmative answer instead of prompting. + Implies --accept-license + + -f, --force + Force - force the behavior + + --noop, --whatif, --what-if + NoOp - Don't actually do anything. + + -r, --limitoutput, --limit-output + LimitOutput - Limit the output to essential information + + --timeout, --execution-timeout=VALUE + CommandExecutionTimeout (in seconds) - The time to allow a command to + finish before timing out. Overrides the default execution timeout in the + configuration of 2700 seconds. + + -c, --cache, --cachelocation, --cache-location=VALUE + CacheLocation - Location for download cache, defaults to %TEMP% or value + in chocolatey.config file. + + --allowunofficial, --allow-unofficial, --allowunofficialbuild, --allow-unofficial-build + AllowUnofficialBuild - When not using the official build you must set + this flag for choco to continue. + + --failstderr, --failonstderr, --fail-on-stderr, --fail-on-standard-error, --fail-on-error-output + FailOnStandardError - Fail on standard error output (stderr), typically + received when running external commands during install providers. This + overrides the feature failOnStandardError. + + --use-system-powershell + UseSystemPowerShell - Execute PowerShell using an external process + instead of the built-in PowerShell host. Available in 0.9.10+. + + -s, --source=VALUE + Source [REQUIRED] - The source location for the key + + -k, --key, --apikey, --api-key=VALUE + ApiKey - The api key for the source. + +~~~ + +[[Command Reference|CommandsReference]] + + +***NOTE:*** This documentation has been automatically generated from `choco apiKey -h`. + diff --git a/docs/generated/CommandsConfig.md b/docs/generated/CommandsConfig.md new file mode 100644 index 0000000000..8d5c690dcf --- /dev/null +++ b/docs/generated/CommandsConfig.md @@ -0,0 +1,103 @@ +# Config Command (choco config) + +Chocolatey will allow you to interact with the configuration file settings. + +**NOTE:** Available in 0.9.9.9+. + +## Usage + + choco config [list]|get|set|unset [] + +**NOTE:** `Unset` subcommand available in 0.9.10+. + +## Examples + + choco config + choco config list + choco config get cacheLocation + choco config get --name cacheLocation + choco config set cacheLocation c:\temp\choco + choco config set --name cacheLocation --value c:\temp\choco + choco config unset proxy + choco config unset --name proxy + + +## See It In Action + +![Config shown in action](https://raw.githubusercontent.com/wiki/chocolatey/choco/images/gifs/choco_config.gif) + + +## Options and Switches + +**NOTE:** Options and switches apply to all items passed, so if you are + running a command like install that allows installing multiple + packages, and you use `--version=1.0.0`, it is going to look for and + try to install version 1.0.0 of every package passed. So please split + out multiple package calls when wanting to pass specific options. + +Includes [[default options/switches|CommandsReference#default-options-and-switches]] (included below for completeness). + +~~~ + + -?, --help, -h + Prints out the help menu. + + -d, --debug + Debug - Run in Debug Mode. + + -v, --verbose + Verbose - See verbose messaging. + + --acceptlicense, --accept-license + AcceptLicense - Accept license dialogs automatically. + + -y, --yes, --confirm + Confirm all prompts - Chooses affirmative answer instead of prompting. + Implies --accept-license + + -f, --force + Force - force the behavior + + --noop, --whatif, --what-if + NoOp - Don't actually do anything. + + -r, --limitoutput, --limit-output + LimitOutput - Limit the output to essential information + + --timeout, --execution-timeout=VALUE + CommandExecutionTimeout (in seconds) - The time to allow a command to + finish before timing out. Overrides the default execution timeout in the + configuration of 2700 seconds. + + -c, --cache, --cachelocation, --cache-location=VALUE + CacheLocation - Location for download cache, defaults to %TEMP% or value + in chocolatey.config file. + + --allowunofficial, --allow-unofficial, --allowunofficialbuild, --allow-unofficial-build + AllowUnofficialBuild - When not using the official build you must set + this flag for choco to continue. + + --failstderr, --failonstderr, --fail-on-stderr, --fail-on-standard-error, --fail-on-error-output + FailOnStandardError - Fail on standard error output (stderr), typically + received when running external commands during install providers. This + overrides the feature failOnStandardError. + + --use-system-powershell + UseSystemPowerShell - Execute PowerShell using an external process + instead of the built-in PowerShell host. Available in 0.9.10+. + + --name=VALUE + Name - the name of the config setting. Required with some actions. + Defaults to empty. + + --value=VALUE + Value - the value of the config setting. Required with some actions. + Defaults to empty. + +~~~ + +[[Command Reference|CommandsReference]] + + +***NOTE:*** This documentation has been automatically generated from `choco config -h`. + diff --git a/docs/generated/CommandsFeature.md b/docs/generated/CommandsFeature.md new file mode 100644 index 0000000000..205a9df773 --- /dev/null +++ b/docs/generated/CommandsFeature.md @@ -0,0 +1,85 @@ +# Feature Command (choco feature) + +Chocolatey will allow you to interact with features. + +## Usage + + choco feature [list]|disable|enable [] + +## Examples + + choco feature + choco feature list + choco feature disable -n=bob + choco feature enable -n=bob + +## Options and Switches + +**NOTE:** Options and switches apply to all items passed, so if you are + running a command like install that allows installing multiple + packages, and you use `--version=1.0.0`, it is going to look for and + try to install version 1.0.0 of every package passed. So please split + out multiple package calls when wanting to pass specific options. + +Includes [[default options/switches|CommandsReference#default-options-and-switches]] (included below for completeness). + +~~~ + + -?, --help, -h + Prints out the help menu. + + -d, --debug + Debug - Run in Debug Mode. + + -v, --verbose + Verbose - See verbose messaging. + + --acceptlicense, --accept-license + AcceptLicense - Accept license dialogs automatically. + + -y, --yes, --confirm + Confirm all prompts - Chooses affirmative answer instead of prompting. + Implies --accept-license + + -f, --force + Force - force the behavior + + --noop, --whatif, --what-if + NoOp - Don't actually do anything. + + -r, --limitoutput, --limit-output + LimitOutput - Limit the output to essential information + + --timeout, --execution-timeout=VALUE + CommandExecutionTimeout (in seconds) - The time to allow a command to + finish before timing out. Overrides the default execution timeout in the + configuration of 2700 seconds. + + -c, --cache, --cachelocation, --cache-location=VALUE + CacheLocation - Location for download cache, defaults to %TEMP% or value + in chocolatey.config file. + + --allowunofficial, --allow-unofficial, --allowunofficialbuild, --allow-unofficial-build + AllowUnofficialBuild - When not using the official build you must set + this flag for choco to continue. + + --failstderr, --failonstderr, --fail-on-stderr, --fail-on-standard-error, --fail-on-error-output + FailOnStandardError - Fail on standard error output (stderr), typically + received when running external commands during install providers. This + overrides the feature failOnStandardError. + + --use-system-powershell + UseSystemPowerShell - Execute PowerShell using an external process + instead of the built-in PowerShell host. Available in 0.9.10+. + + -n, --name=VALUE + Name - the name of the source. Required with some actions. Defaults to + empty. + +~~~ + +[[Command Reference|CommandsReference]] + + +***NOTE:*** This documentation has been automatically generated from `choco feature -h`. + diff --git a/docs/generated/CommandsFeatures.md b/docs/generated/CommandsFeatures.md new file mode 100644 index 0000000000..1df113773d --- /dev/null +++ b/docs/generated/CommandsFeatures.md @@ -0,0 +1,85 @@ +# Feature Command (choco features) + +Chocolatey will allow you to interact with features. + +## Usage + + choco feature [list]|disable|enable [] + +## Examples + + choco feature + choco feature list + choco feature disable -n=bob + choco feature enable -n=bob + +## Options and Switches + +**NOTE:** Options and switches apply to all items passed, so if you are + running a command like install that allows installing multiple + packages, and you use `--version=1.0.0`, it is going to look for and + try to install version 1.0.0 of every package passed. So please split + out multiple package calls when wanting to pass specific options. + +Includes [[default options/switches|CommandsReference#default-options-and-switches]] (included below for completeness). + +~~~ + + -?, --help, -h + Prints out the help menu. + + -d, --debug + Debug - Run in Debug Mode. + + -v, --verbose + Verbose - See verbose messaging. + + --acceptlicense, --accept-license + AcceptLicense - Accept license dialogs automatically. + + -y, --yes, --confirm + Confirm all prompts - Chooses affirmative answer instead of prompting. + Implies --accept-license + + -f, --force + Force - force the behavior + + --noop, --whatif, --what-if + NoOp - Don't actually do anything. + + -r, --limitoutput, --limit-output + LimitOutput - Limit the output to essential information + + --timeout, --execution-timeout=VALUE + CommandExecutionTimeout (in seconds) - The time to allow a command to + finish before timing out. Overrides the default execution timeout in the + configuration of 2700 seconds. + + -c, --cache, --cachelocation, --cache-location=VALUE + CacheLocation - Location for download cache, defaults to %TEMP% or value + in chocolatey.config file. + + --allowunofficial, --allow-unofficial, --allowunofficialbuild, --allow-unofficial-build + AllowUnofficialBuild - When not using the official build you must set + this flag for choco to continue. + + --failstderr, --failonstderr, --fail-on-stderr, --fail-on-standard-error, --fail-on-error-output + FailOnStandardError - Fail on standard error output (stderr), typically + received when running external commands during install providers. This + overrides the feature failOnStandardError. + + --use-system-powershell + UseSystemPowerShell - Execute PowerShell using an external process + instead of the built-in PowerShell host. Available in 0.9.10+. + + -n, --name=VALUE + Name - the name of the source. Required with some actions. Defaults to + empty. + +~~~ + +[[Command Reference|CommandsReference]] + + +***NOTE:*** This documentation has been automatically generated from `choco features -h`. + diff --git a/docs/generated/CommandsInfo.md b/docs/generated/CommandsInfo.md new file mode 100644 index 0000000000..05111e1f50 --- /dev/null +++ b/docs/generated/CommandsInfo.md @@ -0,0 +1,98 @@ +# Info Command (choco info) + +Chocolatey will perform a search for a package local or remote and provide + detailed information about that package. This is a synonym for + `choco search --exact --detailed`. + +**NOTE:** New as of 0.9.10.0. + +## Options and Switches + +**NOTE:** Options and switches apply to all items passed, so if you are + running a command like install that allows installing multiple + packages, and you use `--version=1.0.0`, it is going to look for and + try to install version 1.0.0 of every package passed. So please split + out multiple package calls when wanting to pass specific options. + +Includes [[default options/switches|CommandsReference#default-options-and-switches]] (included below for completeness). + +~~~ + + -?, --help, -h + Prints out the help menu. + + -d, --debug + Debug - Run in Debug Mode. + + -v, --verbose + Verbose - See verbose messaging. + + --acceptlicense, --accept-license + AcceptLicense - Accept license dialogs automatically. + + -y, --yes, --confirm + Confirm all prompts - Chooses affirmative answer instead of prompting. + Implies --accept-license + + -f, --force + Force - force the behavior + + --noop, --whatif, --what-if + NoOp - Don't actually do anything. + + -r, --limitoutput, --limit-output + LimitOutput - Limit the output to essential information + + --timeout, --execution-timeout=VALUE + CommandExecutionTimeout (in seconds) - The time to allow a command to + finish before timing out. Overrides the default execution timeout in the + configuration of 2700 seconds. + + -c, --cache, --cachelocation, --cache-location=VALUE + CacheLocation - Location for download cache, defaults to %TEMP% or value + in chocolatey.config file. + + --allowunofficial, --allow-unofficial, --allowunofficialbuild, --allow-unofficial-build + AllowUnofficialBuild - When not using the official build you must set + this flag for choco to continue. + + --failstderr, --failonstderr, --fail-on-stderr, --fail-on-standard-error, --fail-on-error-output + FailOnStandardError - Fail on standard error output (stderr), typically + received when running external commands during install providers. This + overrides the feature failOnStandardError. + + --use-system-powershell + UseSystemPowerShell - Execute PowerShell using an external process + instead of the built-in PowerShell host. Available in 0.9.10+. + + -s, --source=VALUE + Source - Source location for install. Can include special 'webpi'. + Defaults to sources. + + -l, --lo, --localonly, --local-only + LocalOnly - Only search against local machine items. + + --pre, --prerelease + Prerelease - Include Prereleases? Defaults to false. + + -u, --user=VALUE + User - used with authenticated feeds. Defaults to empty. + + -p, --password=VALUE + Password - the user's password to the source. Defaults to empty. + + --cert=VALUE + Client certificate - PFX pathname for an x509 authenticated feeds. + Defaults to empty. Available in 0.9.10+. + + --cp, --certpassword=VALUE + Certificate Password - the client certificate's password to the source. + Defaults to empty. Available in 0.9.10+. + +~~~ + +[[Command Reference|CommandsReference]] + + +***NOTE:*** This documentation has been automatically generated from `choco info -h`. + diff --git a/docs/generated/CommandsInstall.md b/docs/generated/CommandsInstall.md new file mode 100644 index 0000000000..46aa2ada0e --- /dev/null +++ b/docs/generated/CommandsInstall.md @@ -0,0 +1,318 @@ +# Install Command (choco install) + +Installs a package or a list of packages (sometimes specified as a + packages.config). Some may prefer to use `cinst` as a shortcut for + [[`choco install`|Commandsinstall]]. + +**NOTE:** 100% compatible with older chocolatey client (0.9.8.32 and below) + with options and switches. Add `-y` for previous behavior with no + prompt. In most cases you can still pass options and switches with one + dash (`-`). For more details, see [[how to pass arguments|CommandsReference#how-to-pass-options--switches]] (`choco -?`). + +## Usage + + choco install [ ] [] + cinst [ ] [] + +**NOTE:** `all` is a special package keyword that will allow you to install + all packages from a custom feed. Will not work with Chocolatey default + feed. THIS IS NOT YET REIMPLEMENTED. + +**NOTE:** Any package name ending with .config is considered a + 'packages.config' file. Please see https://bit.ly/packages_config + +## Examples + + choco install sysinternals + choco install notepadplusplus googlechrome atom 7zip + choco install notepadplusplus --force --force-dependencies + choco install notepadplusplus googlechrome atom 7zip -dvfy + choco install git --params="'/GitAndUnixToolsOnPath /NoAutoCrlf'" -y + choco install nodejs.install --version 0.10.35 + choco install git -s "'https://somewhere/out/there'" + choco install git -s "'https://somewhere/protected'" -u user -p pass + +Choco can also install directly from a nuspec/nupkg file. This aids in + testing packages: + + choco install + choco install + +Install multiple versions of a package using -m (AllowMultiple versions) + + choco install ruby --version 1.9.3.55100 -my + choco install ruby --version 2.0.0.59800 -my + choco install ruby --version 2.1.5 -my + +What is `-my`? See option bundling in [[how to pass arguments|CommandsReference#how-to-pass-options--switches]] + (`choco -?`). + +**NOTE:** All of these will add to PATH variable. We'll be adding a special + option to not allow PATH changes. Until then you will need to manually + go modify Path to just one Ruby and then use something like uru + (https://bitbucket.org/jonforums/uru) or pik + (https://chocolatey.org/packages/pik) to switch between versions. + +## See It In Action + +Chocolatey FOSS install showing tab completion and `refreshenv` (a way + to update environment variables without restarting the shell). + +![FOSS install in action](https://raw.githubusercontent.com/wiki/chocolatey/choco/images/gifs/choco_install.gif) + +[Chocolatey Professional](https://chocolatey.org/compare) showing private download cache and virus scan + protection. + +![Pro install in action](https://raw.githubusercontent.com/wiki/chocolatey/choco/images/gifs/chocopro_install_stopped.gif) + +## Packages.config + +Alternative to PackageName. This is a list of packages in an xml manifest for Chocolatey to install. This is like the packages.config that NuGet uses except it also adds other options and switches. This can also be the path to the packages.config file if it is not in the current working directory. + +**NOTE:** The filename is only required to end in .config, the name is not required to be packages.config. + +~~~xml + + + + + + + +~~~ + + +## Alternative Sources + +Available in 0.9.10+. + +### Ruby +This specifies the source is Ruby Gems and that we are installing a + gem. If you do not have ruby installed prior to running this command, + the command will install that first. + e.g. `choco install compass -source ruby` + +### WebPI +This specifies the source is Web PI (Web Platform Installer) and that + we are installing a WebPI product, such as IISExpress. If you do not + have the Web PI command line installed, it will install that first and + then the product requested. + e.g. `choco install IISExpress --source webpi` + +### Cygwin +This specifies the source is Cygwin and that we are installing a cygwin + package, such as bash. If you do not have Cygwin installed, it will + install that first and then the product requested. + e.g. `choco install bash --source cygwin` + +### Python +This specifies the source is Python and that we are installing a python + package, such as Sphinx. If you do not have easy_install and Python + installed, it will install those first and then the product requested. + e.g. `choco install sphinx --source python` + +### Windows Features +This specifies that the source is a Windows Feature and we should + install via the Deployment Image Servicing and Management tool (DISM) + on the local machine. + e.g. `choco install IIS-WebServerRole --source windowsfeatures` + + +## Resources + + * How-To: A complete example of how you can use the PackageParameters argument + when creating a Chocolatey Package can be seen at + https://github.com/chocolatey/choco/wiki/How-To-Parse-PackageParameters-Argument + * One may want to override the default installation directory of a + piece of software. See + https://github.com/chocolatey/choco/wiki/GettingStarted#overriding-default-install-directory-or-other-advanced-install-concepts. + + +## Options and Switches + +**NOTE:** Options and switches apply to all items passed, so if you are + running a command like install that allows installing multiple + packages, and you use `--version=1.0.0`, it is going to look for and + try to install version 1.0.0 of every package passed. So please split + out multiple package calls when wanting to pass specific options. + +Includes [[default options/switches|CommandsReference#default-options-and-switches]] (included below for completeness). + +~~~ + + + + -?, --help, -h + Prints out the help menu. + + -d, --debug + Debug - Run in Debug Mode. + + -v, --verbose + Verbose - See verbose messaging. + + --acceptlicense, --accept-license + AcceptLicense - Accept license dialogs automatically. + + -y, --yes, --confirm + Confirm all prompts - Chooses affirmative answer instead of prompting. + Implies --accept-license + + -f, --force + Force - force the behavior + + --noop, --whatif, --what-if + NoOp - Don't actually do anything. + + -r, --limitoutput, --limit-output + LimitOutput - Limit the output to essential information + + --timeout, --execution-timeout=VALUE + CommandExecutionTimeout (in seconds) - The time to allow a command to + finish before timing out. Overrides the default execution timeout in the + configuration of 2700 seconds. + + -c, --cache, --cachelocation, --cache-location=VALUE + CacheLocation - Location for download cache, defaults to %TEMP% or value + in chocolatey.config file. + + --allowunofficial, --allow-unofficial, --allowunofficialbuild, --allow-unofficial-build + AllowUnofficialBuild - When not using the official build you must set + this flag for choco to continue. + + --failstderr, --failonstderr, --fail-on-stderr, --fail-on-standard-error, --fail-on-error-output + FailOnStandardError - Fail on standard error output (stderr), typically + received when running external commands during install providers. This + overrides the feature failOnStandardError. + + --use-system-powershell + UseSystemPowerShell - Execute PowerShell using an external process + instead of the built-in PowerShell host. Available in 0.9.10+. + + -s, --source=VALUE + Source - The source to find the package(s) to install. Special sources + include: ruby, webpi, cygwin, windowsfeatures, and python. Defaults to + default feeds. + + --version=VALUE + Version - A specific version to install. Defaults to unspecified. + + --pre, --prerelease + Prerelease - Include Prereleases? Defaults to false. + + --x86, --forcex86 + ForceX86 - Force x86 (32bit) installation on 64 bit systems. Defaults to + false. + + --ia, --installargs, --installarguments, --install-arguments=VALUE + InstallArguments - Install Arguments to pass to the native installer in + the package. Defaults to unspecified. + + -o, --override, --overrideargs, --overridearguments, --override-arguments + OverrideArguments - Should install arguments be used exclusively without + appending to current package passed arguments? Defaults to false. + + --notsilent, --not-silent + NotSilent - Do not install this silently. Defaults to false. + + --params, --parameters, --pkgparameters, --packageparameters, --package-parameters=VALUE + PackageParameters - Parameters to pass to the package. Defaults to + unspecified. + + --allowdowngrade, --allow-downgrade + AllowDowngrade - Should an attempt at downgrading be allowed? Defaults + to false. + + -m, --sxs, --sidebyside, --side-by-side, --allowmultiple, --allow-multiple, --allowmultipleversions, --allow-multiple-versions + AllowMultipleVersions - Should multiple versions of a package be + installed? Defaults to false. + + -i, --ignoredependencies, --ignore-dependencies + IgnoreDependencies - Ignore dependencies when installing package(s). + Defaults to false. + + -x, --forcedependencies, --force-dependencies + ForceDependencies - Force dependencies to be reinstalled when force + installing package(s). Must be used in conjunction with --force. + Defaults to false. + + -n, --skippowershell, --skip-powershell, --skipscripts, --skip-scripts, --skip-automation-scripts + Skip Powershell - Do not run chocolateyInstall.ps1. Defaults to false. + + -u, --user=VALUE + User - used with authenticated feeds. Defaults to empty. + + -p, --password=VALUE + Password - the user's password to the source. Defaults to empty. + + --cert=VALUE + Client certificate - PFX pathname for an x509 authenticated feeds. + Defaults to empty. Available in 0.9.10+. + + --cp, --certpassword=VALUE + Certificate Password - the client certificate's password to the source. + Defaults to empty. Available in 0.9.10+. + + --ignorechecksum, --ignore-checksum, --ignorechecksums, --ignore-checksums + IgnoreChecksums - Ignore checksums provided by the package. Available in + 0.9.9.9+. + + --ignorepackagecodes, --ignorepackageexitcodes, --ignore-package-codes, --ignore-package-exit-codes + IgnorePackageExitCodes - Exit with a 0 for success and 1 for non-succes- + s, no matter what package scripts provide for exit codes. Overrides the + default feature 'usePackageExitCodes' set to 'True'. Available in 0.- + 9.10+. + + --usepackagecodes, --usepackageexitcodes, --use-package-codes, --use-package-exit-codes + UsePackageExitCodes - Package scripts can provide exit codes. Use those + for choco's exit code when non-zero (this value can come from a + dependency package). Chocolatey defines valid exit codes as 0, 1605, + 1614, 1641, 3010. Overrides the default feature 'usePackageExitCodes' + set to 'True'. Available in 0.9.10+. + + --sdc, --skipdownloadcache, --skip-download-cache + Skip Download Cache - Use the original download even if a private CDN + cache is available for a package. Overrides the default feature + 'downloadCache' set to 'True'. Available in 0.9.10+. [Licensed versions](https://chocolatey.org/compare) + only. + + --dc, --downloadcache, --download-cache, --use-download-cache + Use Download Cache - Use private CDN cache if available for a package. + Overrides the default feature 'downloadCache' set to 'True'. Available + in 0.9.10+. [Licensed versions](https://chocolatey.org/compare) only. + + --svc, --skipvirus, --skip-virus, --skipviruscheck, --skip-virus-check + Skip Virus Check - Skip the virus check for downloaded files on this ru- + n. Overrides the default feature 'virusCheck' set to 'True'. Available + in 0.9.10+. [Licensed versions](https://chocolatey.org/compare) only. + + --virus, --viruscheck, --virus-check + Virus Check - check downloaded files for viruses. Overrides the default + feature 'virusCheck' set to 'True'. Available in 0.9.10+. Licensed + versions only. + + --viruspositivesmin, --virus-positives-minimum=VALUE + Virus Check Minimum Scan Result Positives - the minimum number of scan + result positives required to flag a package. Used when virusScannerType + is VirusTotal. Overrides the default configuration value + 'virusCheckMinimumPositives' set to '5'. Available in 0.9.10+. Licensed + versions only. + + --dir, --directory, --installdir, --installdirectory, --install-dir, --install-directory=VALUE + Install Directory Override - Override the default installation director- + y. Chocolatey will automatically determine the type of installer and + pass the appropriate arguments to override the install directory. The + package must use Chocolatey install helpers and be installing an + installer for software. Available in 0.9.10+. [Licensed versions](https://chocolatey.org/compare) only. + +~~~ + +[[Command Reference|CommandsReference]] + + +***NOTE:*** This documentation has been automatically generated from `choco install -h`. + diff --git a/docs/generated/CommandsList.md b/docs/generated/CommandsList.md new file mode 100644 index 0000000000..189671c103 --- /dev/null +++ b/docs/generated/CommandsList.md @@ -0,0 +1,186 @@ +# List/Search Command (choco list) + +Chocolatey will perform a search for a package local or remote. Some + may prefer to use [[`clist`|Commandslist]] as a shortcut for [[`choco list`|Commandslist]]. + +**NOTE:** 100% compatible with older Chocolatey client (0.9.8.x and below) + with options and switches. In most cases you can still pass options + and switches with one dash (`-`). For more details, see + [[how to pass arguments|CommandsReference#how-to-pass-options--switches]] (`choco -?`). + +## Usage + + choco search [] + choco list [] + clist [] + +## Examples + + choco list --local-only + choco list -li + choco list -lai + choco list --page=0 --page-size=25 + choco search git + choco search git -s "'https://somewhere/out/there'" + choco search bob -s "'https://somewhere/protected'" -u user -p pass + +## See It In Action + +![choco search](https://raw.githubusercontent.com/wiki/chocolatey/choco/images/gifs/choco_search.gif) + + +## Alternative Sources + +Available in 0.9.10+. + +### WebPI +This specifies the source is Web PI (Web Platform Installer) and that + we are searching for a WebPI product, such as IISExpress. If you do + not have the Web PI command line installed, it will install that first + and then perform the search requested. + e.g. `choco list --source webpi` + +### Windows Features +This specifies that the source is a Windows Feature and we should + install via the Deployment Image Servicing and Management tool (DISM) + on the local machine. + e.g. `choco list --source windowsfeatures` + +## Options and Switches + +**NOTE:** Options and switches apply to all items passed, so if you are + running a command like install that allows installing multiple + packages, and you use `--version=1.0.0`, it is going to look for and + try to install version 1.0.0 of every package passed. So please split + out multiple package calls when wanting to pass specific options. + +Includes [[default options/switches|CommandsReference#default-options-and-switches]] (included below for completeness). + +~~~ + + -?, --help, -h + Prints out the help menu. + + -d, --debug + Debug - Run in Debug Mode. + + -v, --verbose + Verbose - See verbose messaging. + + --acceptlicense, --accept-license + AcceptLicense - Accept license dialogs automatically. + + -y, --yes, --confirm + Confirm all prompts - Chooses affirmative answer instead of prompting. + Implies --accept-license + + -f, --force + Force - force the behavior + + --noop, --whatif, --what-if + NoOp - Don't actually do anything. + + -r, --limitoutput, --limit-output + LimitOutput - Limit the output to essential information + + --timeout, --execution-timeout=VALUE + CommandExecutionTimeout (in seconds) - The time to allow a command to + finish before timing out. Overrides the default execution timeout in the + configuration of 2700 seconds. + + -c, --cache, --cachelocation, --cache-location=VALUE + CacheLocation - Location for download cache, defaults to %TEMP% or value + in chocolatey.config file. + + --allowunofficial, --allow-unofficial, --allowunofficialbuild, --allow-unofficial-build + AllowUnofficialBuild - When not using the official build you must set + this flag for choco to continue. + + --failstderr, --failonstderr, --fail-on-stderr, --fail-on-standard-error, --fail-on-error-output + FailOnStandardError - Fail on standard error output (stderr), typically + received when running external commands during install providers. This + overrides the feature failOnStandardError. + + --use-system-powershell + UseSystemPowerShell - Execute PowerShell using an external process + instead of the built-in PowerShell host. Available in 0.9.10+. + + -s, --source=VALUE + Source - Source location for install. Can include special 'webpi'. + Defaults to sources. + + -l, --lo, --localonly, --local-only + LocalOnly - Only search against local machine items. + + --pre, --prerelease + Prerelease - Include Prereleases? Defaults to false. + + -i, --includeprograms, --include-programs + IncludePrograms - Used in conjunction with LocalOnly, filters out apps + chocolatey has listed as packages and includes those in the list. + Defaults to false. + + -a, --all, --allversions, --all-versions + AllVersions - include results from all versions. + + -u, --user=VALUE + User - used with authenticated feeds. Defaults to empty. + + -p, --password=VALUE + Password - the user's password to the source. Defaults to empty. + + --cert=VALUE + Client certificate - PFX pathname for an x509 authenticated feeds. + Defaults to empty. Available in 0.9.10+. + + --cp, --certpassword=VALUE + Certificate Password - the client certificate's password to the source. + Defaults to empty. Available in 0.9.10+. + + --page=VALUE + Page - the 'page' of results to return. Defaults to return all results. + Available in 0.9.10+. + + --page-size=VALUE + Page Size - the amount of package results to return per page. Defaults + to 25. Available in 0.9.10+. + + -e, --exact + Exact - Only return packages with this exact name. Available in 0.9.10+. + + --by-id-only + ByIdOnly - Only return packages where the id contains the search filter. + Available in 0.9.10+. + + --id-starts-with + IdStartsWith - Only return packages where the id starts with the search + filter. Available in 0.9.10+. + + --order-by-popularity + OrderByPopularity - Sort by package results by popularity. Available in + 0.9.10+. + + --approved-only + ApprovedOnly - Only return approved packages - this option will filter + out results not from the [community repository](https://chocolatey.org/packages). Available in 0.9.10+. + + --download-cache, --download-cache-only + DownloadCacheAvailable - Only return packages that have a download cache + available - this option will filter out results not from the community + repository. Available in 0.9.10+. + + --not-broken + NotBroken - Only return packages that are not failing testing - this + option only filters out failing results from the [community feed](https://chocolatey.org/packages). It will + not filter against other sources. Available in 0.9.10+. + + --detail, --detailed + Detailed - Alias for verbose. Available in 0.9.10+. + +~~~ + +[[Command Reference|CommandsReference]] + + +***NOTE:*** This documentation has been automatically generated from `choco list -h`. + diff --git a/docs/generated/CommandsNew.md b/docs/generated/CommandsNew.md new file mode 100644 index 0000000000..808a626ee9 --- /dev/null +++ b/docs/generated/CommandsNew.md @@ -0,0 +1,128 @@ +# New Command (choco new) + +Chocolatey will generate package specification files for a new package. + +## Usage + + choco new [] [ ] + +Possible properties to pass: + packageversion + maintainername + maintainerrepo + installertype + url + url64 + silentargs + +**NOTE:** Starting in 0.9.10, you can pass arbitrary property value pairs + through to templates. This really unlocks your ability to create + packages automatically! + +**NOTE:** [Chocolatey for Business](https://chocolatey.org/compare) can create complete packages by just + pointing the new command to native installers! + +## Examples + + choco new bob + choco new bob -a --version 1.2.0 maintainername="'This guy'" + choco new bob silentargs="'/S'" url="'https://somewhere/out/there.msi'" + choco new bob --outputdirectory Packages + + +## Options and Switches + +**NOTE:** Options and switches apply to all items passed, so if you are + running a command like install that allows installing multiple + packages, and you use `--version=1.0.0`, it is going to look for and + try to install version 1.0.0 of every package passed. So please split + out multiple package calls when wanting to pass specific options. + +Includes [[default options/switches|CommandsReference#default-options-and-switches]] (included below for completeness). + +~~~ + + -?, --help, -h + Prints out the help menu. + + -d, --debug + Debug - Run in Debug Mode. + + -v, --verbose + Verbose - See verbose messaging. + + --acceptlicense, --accept-license + AcceptLicense - Accept license dialogs automatically. + + -y, --yes, --confirm + Confirm all prompts - Chooses affirmative answer instead of prompting. + Implies --accept-license + + -f, --force + Force - force the behavior + + --noop, --whatif, --what-if + NoOp - Don't actually do anything. + + -r, --limitoutput, --limit-output + LimitOutput - Limit the output to essential information + + --timeout, --execution-timeout=VALUE + CommandExecutionTimeout (in seconds) - The time to allow a command to + finish before timing out. Overrides the default execution timeout in the + configuration of 2700 seconds. + + -c, --cache, --cachelocation, --cache-location=VALUE + CacheLocation - Location for download cache, defaults to %TEMP% or value + in chocolatey.config file. + + --allowunofficial, --allow-unofficial, --allowunofficialbuild, --allow-unofficial-build + AllowUnofficialBuild - When not using the official build you must set + this flag for choco to continue. + + --failstderr, --failonstderr, --fail-on-stderr, --fail-on-standard-error, --fail-on-error-output + FailOnStandardError - Fail on standard error output (stderr), typically + received when running external commands during install providers. This + overrides the feature failOnStandardError. + + --use-system-powershell + UseSystemPowerShell - Execute PowerShell using an external process + instead of the built-in PowerShell host. Available in 0.9.10+. + + -a, --auto, --automaticpackage + AutomaticPackage - Generate automatic package instead of normal. + Defaults to false + + -t, --template, --template-name=VALUE + TemplateName - Use a named template in + C:\ProgramData\chocolatey\templates\templatename instead of built-in + template. Available in 0.9.9.9+. Manage templates as packages in 0.9.10+. + + --name=VALUE + Name [Required]- the name of the package. Can be passed as first + parameter without "--name=". + + --version=VALUE + Version - the version of the package. Can also be passed as the property + PackageVersion=somevalue + + --maintainer=VALUE + Maintainer - the name of the maintainer. Can also be passed as the + property MaintainerName=somevalue + + --outputdirectory=VALUE + OutputDirectory - Specifies the directory for the created Chocolatey + package file. If not specified, uses the current directory. Available in + 0.9.10+. + + --built-in, --built-in-template, --originaltemplate, --original-template, --use-original-template, --use-built-in-template + BuiltInTemplate - Use the original built-in template instead of any + override. Available in 0.9.10+. + +~~~ + +[[Command Reference|CommandsReference]] + + +***NOTE:*** This documentation has been automatically generated from `choco new -h`. + diff --git a/docs/generated/CommandsOutdated.md b/docs/generated/CommandsOutdated.md new file mode 100644 index 0000000000..2d91caccf3 --- /dev/null +++ b/docs/generated/CommandsOutdated.md @@ -0,0 +1,111 @@ +# Outdated Command (choco outdated) + +Returns a list of outdated packages. + +**NOTE:** Available with 0.9.9.6+. + + +## Usage + + choco outdated [] + +## Examples + + choco outdated + choco outdated -s https://somewhere/out/there + choco outdated -s "'https://somewhere/protected'" -u user -p pass + +If you use `--source=https://somewhere/out/there`, it is + going to look for outdated packages only based on that source. + + +## See It In Action + +![choco outdated](https://raw.githubusercontent.com/wiki/chocolatey/choco/images/gifs/choco_outdated.gif) + + +## Options and Switches + +**NOTE:** Options and switches apply to all items passed, so if you are + running a command like install that allows installing multiple + packages, and you use `--version=1.0.0`, it is going to look for and + try to install version 1.0.0 of every package passed. So please split + out multiple package calls when wanting to pass specific options. + +Includes [[default options/switches|CommandsReference#default-options-and-switches]] (included below for completeness). + +~~~ + + -?, --help, -h + Prints out the help menu. + + -d, --debug + Debug - Run in Debug Mode. + + -v, --verbose + Verbose - See verbose messaging. + + --acceptlicense, --accept-license + AcceptLicense - Accept license dialogs automatically. + + -y, --yes, --confirm + Confirm all prompts - Chooses affirmative answer instead of prompting. + Implies --accept-license + + -f, --force + Force - force the behavior + + --noop, --whatif, --what-if + NoOp - Don't actually do anything. + + -r, --limitoutput, --limit-output + LimitOutput - Limit the output to essential information + + --timeout, --execution-timeout=VALUE + CommandExecutionTimeout (in seconds) - The time to allow a command to + finish before timing out. Overrides the default execution timeout in the + configuration of 2700 seconds. + + -c, --cache, --cachelocation, --cache-location=VALUE + CacheLocation - Location for download cache, defaults to %TEMP% or value + in chocolatey.config file. + + --allowunofficial, --allow-unofficial, --allowunofficialbuild, --allow-unofficial-build + AllowUnofficialBuild - When not using the official build you must set + this flag for choco to continue. + + --failstderr, --failonstderr, --fail-on-stderr, --fail-on-standard-error, --fail-on-error-output + FailOnStandardError - Fail on standard error output (stderr), typically + received when running external commands during install providers. This + overrides the feature failOnStandardError. + + --use-system-powershell + UseSystemPowerShell - Execute PowerShell using an external process + instead of the built-in PowerShell host. Available in 0.9.10+. + + -s, --source=VALUE + Source - The source to find the package(s) to install. Special sources + include: ruby, webpi, cygwin, windowsfeatures, and python. Defaults to + default feeds. + + -u, --user=VALUE + User - used with authenticated feeds. Defaults to empty. + + -p, --password=VALUE + Password - the user's password to the source. Defaults to empty. + + --cert=VALUE + Client certificate - PFX pathname for an x509 authenticated feeds. + Defaults to empty. Available in 0.9.10+. + + --cp, --certpassword=VALUE + Certificate Password - the client certificate's password to the source. + Defaults to empty. Available in 0.9.10+. + +~~~ + +[[Command Reference|CommandsReference]] + + +***NOTE:*** This documentation has been automatically generated from `choco outdated -h`. + diff --git a/docs/generated/CommandsPack.md b/docs/generated/CommandsPack.md new file mode 100644 index 0000000000..e8969123a1 --- /dev/null +++ b/docs/generated/CommandsPack.md @@ -0,0 +1,95 @@ +# Pack Command (choco pack) + +Chocolatey will attempt to package a nuspec into a compiled nupkg. Some + may prefer to use `cpack` as a shortcut for `choco pack`. + +**NOTE:** 100% compatible with older chocolatey client (0.9.8.32 and below) + with options and switches. In most cases you can still pass options + and switches with one dash (`-`). For more details, see + [[how to pass arguments|CommandsReference#how-to-pass-options--switches]] (`choco -?`). + +**NOTE:** `cpack` has been deprecated as it has a name collision with CMake. Please + use `choco pack` instead. The shortcut will be removed in v1. + + +## Usage + + choco pack [] [] + cpack [] [] (DEPRECATED) + +## Examples + + choco pack + choco pack --version 1.2.3 + choco pack path/to/nuspec + + +## Options and Switches + +**NOTE:** Options and switches apply to all items passed, so if you are + running a command like install that allows installing multiple + packages, and you use `--version=1.0.0`, it is going to look for and + try to install version 1.0.0 of every package passed. So please split + out multiple package calls when wanting to pass specific options. + +Includes [[default options/switches|CommandsReference#default-options-and-switches]] (included below for completeness). + +~~~ + + -?, --help, -h + Prints out the help menu. + + -d, --debug + Debug - Run in Debug Mode. + + -v, --verbose + Verbose - See verbose messaging. + + --acceptlicense, --accept-license + AcceptLicense - Accept license dialogs automatically. + + -y, --yes, --confirm + Confirm all prompts - Chooses affirmative answer instead of prompting. + Implies --accept-license + + -f, --force + Force - force the behavior + + --noop, --whatif, --what-if + NoOp - Don't actually do anything. + + -r, --limitoutput, --limit-output + LimitOutput - Limit the output to essential information + + --timeout, --execution-timeout=VALUE + CommandExecutionTimeout (in seconds) - The time to allow a command to + finish before timing out. Overrides the default execution timeout in the + configuration of 2700 seconds. + + -c, --cache, --cachelocation, --cache-location=VALUE + CacheLocation - Location for download cache, defaults to %TEMP% or value + in chocolatey.config file. + + --allowunofficial, --allow-unofficial, --allowunofficialbuild, --allow-unofficial-build + AllowUnofficialBuild - When not using the official build you must set + this flag for choco to continue. + + --failstderr, --failonstderr, --fail-on-stderr, --fail-on-standard-error, --fail-on-error-output + FailOnStandardError - Fail on standard error output (stderr), typically + received when running external commands during install providers. This + overrides the feature failOnStandardError. + + --use-system-powershell + UseSystemPowerShell - Execute PowerShell using an external process + instead of the built-in PowerShell host. Available in 0.9.10+. + + --version=VALUE + Version - The version you would like to insert into the package. + +~~~ + +[[Command Reference|CommandsReference]] + + +***NOTE:*** This documentation has been automatically generated from `choco pack -h`. + diff --git a/docs/generated/CommandsPin.md b/docs/generated/CommandsPin.md new file mode 100644 index 0000000000..253f904b2f --- /dev/null +++ b/docs/generated/CommandsPin.md @@ -0,0 +1,95 @@ +# Pin Command (choco pin) + +Pin a package to suppress upgrades. + +This is especially helpful when running [[`choco upgrade`|Commandsupgrade]] for all + packages, as it will automatically skip those packages. Another + alternative is `choco upgrade --except="pkg1,pk2"`. + +## Usage + + choco pin [list]|add|remove [] + +## Examples + + choco pin + choco pin list + choco pin add -n=git + choco pin add -n=git --version 1.2.3 + choco pin remove --name git + + +## Options and Switches + +**NOTE:** Options and switches apply to all items passed, so if you are + running a command like install that allows installing multiple + packages, and you use `--version=1.0.0`, it is going to look for and + try to install version 1.0.0 of every package passed. So please split + out multiple package calls when wanting to pass specific options. + +Includes [[default options/switches|CommandsReference#default-options-and-switches]] (included below for completeness). + +~~~ + + -?, --help, -h + Prints out the help menu. + + -d, --debug + Debug - Run in Debug Mode. + + -v, --verbose + Verbose - See verbose messaging. + + --acceptlicense, --accept-license + AcceptLicense - Accept license dialogs automatically. + + -y, --yes, --confirm + Confirm all prompts - Chooses affirmative answer instead of prompting. + Implies --accept-license + + -f, --force + Force - force the behavior + + --noop, --whatif, --what-if + NoOp - Don't actually do anything. + + -r, --limitoutput, --limit-output + LimitOutput - Limit the output to essential information + + --timeout, --execution-timeout=VALUE + CommandExecutionTimeout (in seconds) - The time to allow a command to + finish before timing out. Overrides the default execution timeout in the + configuration of 2700 seconds. + + -c, --cache, --cachelocation, --cache-location=VALUE + CacheLocation - Location for download cache, defaults to %TEMP% or value + in chocolatey.config file. + + --allowunofficial, --allow-unofficial, --allowunofficialbuild, --allow-unofficial-build + AllowUnofficialBuild - When not using the official build you must set + this flag for choco to continue. + + --failstderr, --failonstderr, --fail-on-stderr, --fail-on-standard-error, --fail-on-error-output + FailOnStandardError - Fail on standard error output (stderr), typically + received when running external commands during install providers. This + overrides the feature failOnStandardError. + + --use-system-powershell + UseSystemPowerShell - Execute PowerShell using an external process + instead of the built-in PowerShell host. Available in 0.9.10+. + + -n, --name=VALUE + Name - the name of the package. Required with some actions. Defaults to + empty. + + --version=VALUE + Version - Used when multiple versions of a package are installed. + Defaults to empty. + +~~~ + +[[Command Reference|CommandsReference]] + + +***NOTE:*** This documentation has been automatically generated from `choco pin -h`. + diff --git a/docs/generated/CommandsPush.md b/docs/generated/CommandsPush.md new file mode 100644 index 0000000000..930bd1e376 --- /dev/null +++ b/docs/generated/CommandsPush.md @@ -0,0 +1,126 @@ +# Push Command (choco push) + +Chocolatey will attempt to push a compiled nupkg to a package feed. + Some may prefer to use `cpush` as a shortcut for `choco push`. + +**NOTE:** 100% compatible with older chocolatey client (0.9.8.32 and below) + with options and switches. Default push location is deprecated and + will be removed by v1. In most cases you can still pass options and + switches with one dash (`-`). For more details, see + [[how to pass arguments|CommandsReference#how-to-pass-options--switches]] (`choco -?`). + +A feed can be a local folder, a file share, the [community feed](https://chocolatey.org/packages) + (https://chocolatey.org/), or a custom/private feed. For web + feeds, it has a requirement that it implements the proper OData + endpoints required for NuGet packages. + +## Usage + + choco push [] [] + cpush [] [] + +**NOTE:** If there is more than one nupkg file in the folder, the command + will require specifying the path to the file. + +## Examples + + choco push --source https://chocolatey.org/ + choco push --source "'https://chocolatey.org/'" -t 500 + choco push --source "'https://chocolatey.org/'" -k="'123-123123-123'" + +## Troubleshooting + +To use this command, you must have your API key saved for the community + feed (chocolatey.org) or the source you want to push to. Or you can + explicitly pass the apikey to the command. See [[`apikey`|Commandsapikey]] command help + for instructions on saving your key: + + choco apikey -? + +A common error is `Failed to process request. 'The specified API key + does not provide the authority to push packages.' The remote server + returned an error: (403) Forbidden..` This means the package already + exists with a different user (API key). The package could be unlisted. + You can verify by going to https://chocolatey.org/packages/packageName. + Please contact the administrators of https://chocolatey.org/ if you see this + and you don't see a good reason for it. + +## Options and Switches + +**NOTE:** Options and switches apply to all items passed, so if you are + running a command like install that allows installing multiple + packages, and you use `--version=1.0.0`, it is going to look for and + try to install version 1.0.0 of every package passed. So please split + out multiple package calls when wanting to pass specific options. + +Includes [[default options/switches|CommandsReference#default-options-and-switches]] (included below for completeness). + +~~~ + + -?, --help, -h + Prints out the help menu. + + -d, --debug + Debug - Run in Debug Mode. + + -v, --verbose + Verbose - See verbose messaging. + + --acceptlicense, --accept-license + AcceptLicense - Accept license dialogs automatically. + + -y, --yes, --confirm + Confirm all prompts - Chooses affirmative answer instead of prompting. + Implies --accept-license + + -f, --force + Force - force the behavior + + --noop, --whatif, --what-if + NoOp - Don't actually do anything. + + -r, --limitoutput, --limit-output + LimitOutput - Limit the output to essential information + + --timeout, --execution-timeout=VALUE + CommandExecutionTimeout (in seconds) - The time to allow a command to + finish before timing out. Overrides the default execution timeout in the + configuration of 2700 seconds. + + -c, --cache, --cachelocation, --cache-location=VALUE + CacheLocation - Location for download cache, defaults to %TEMP% or value + in chocolatey.config file. + + --allowunofficial, --allow-unofficial, --allowunofficialbuild, --allow-unofficial-build + AllowUnofficialBuild - When not using the official build you must set + this flag for choco to continue. + + --failstderr, --failonstderr, --fail-on-stderr, --fail-on-standard-error, --fail-on-error-output + FailOnStandardError - Fail on standard error output (stderr), typically + received when running external commands during install providers. This + overrides the feature failOnStandardError. + + --use-system-powershell + UseSystemPowerShell - Execute PowerShell using an external process + instead of the built-in PowerShell host. Available in 0.9.10+. + + -s, --source=VALUE + Source - The source we are pushing the package to. Use + https://chocolatey.org/ to push to [community feed](https://chocolatey.org/packages). + + -k, --key, --apikey, --api-key=VALUE + ApiKey - The api key for the source. If not specified (and not local + file source), does a lookup. If not specified and one is not found for + an https source, push will fail. + + -t=VALUE + Timeout (in seconds) - The time to allow a package push to occur before + timing out. Defaults to execution timeout 2700. + +~~~ + +[[Command Reference|CommandsReference]] + + +***NOTE:*** This documentation has been automatically generated from `choco push -h`. + diff --git a/docs/generated/CommandsReference.md b/docs/generated/CommandsReference.md new file mode 100644 index 0000000000..ab4a927f9b --- /dev/null +++ b/docs/generated/CommandsReference.md @@ -0,0 +1,134 @@ +# Command Reference + +This is a listing of all of the different things you can pass to choco. + +## Commands + + * [[search|Commandssearch]] - searches remote or local packages (alias for list) + * [[list|Commandslist]] - lists remote or local packages + * [[info|Commandsinfo]] - retrieves package information. Shorthand for choco search pkgname --exact --verbose + * [[install|Commandsinstall]] - installs packages from various sources + * [[pin|Commandspin]] - suppress upgrades for a package + * [[outdated|Commandsoutdated]] - retrieves packages that are outdated. Similar to upgrade all --noop + * [[upgrade|Commandsupgrade]] - upgrades packages from various sources + * [[uninstall|Commandsuninstall]] - uninstalls a package + * [[pack|Commandspack]] - packages up a nuspec to a compiled nupkg + * [[push|Commandspush]] - pushes a compiled nupkg + * [[new|Commandsnew]] - generates files necessary for a chocolatey package from a template + * [[sources|Commandssources]] - view and configure default sources (alias for source) + * [[source|Commandssource]] - view and configure default sources + * [[config|Commandsconfig]] - Retrieve and configure config file settings + * [[features|Commandsfeatures]] - view and configure choco features (alias for feature) + * [[feature|Commandsfeature]] - view and configure choco features + * [[apikey|Commandsapikey]] - retrieves or saves an apikey for a particular source + * [[setapikey|Commandssetapikey]] - retrieves or saves an apikey for a particular source (alias for apikey) + * [[unpackself|Commandsunpackself]] - have chocolatey set it self up + * [[version|Commandsversion]] - [DEPRECATED] will be removed in v1 - use [[`choco outdated`|Commandsoutdated]] or `cup -whatif` instead + * [[update|Commandsupdate]] - [DEPRECATED] RESERVED for future use (you are looking for upgrade, these are not the droids you are looking for) + + +Please run chocolatey with `choco command -help` for specific help on + each command. + +## How To Pass Options / Switches + +You can pass options and switches in the following ways: + + * Unless stated otherwise, an option/switch should only be passed one + time. Otherwise you may find weird/non-supported behavior. + * `-`, `/`, or `--` (one character switches should not use `--`) + * **Option Bundling / Bundled Options**: One character switches can be + bundled. e.g. `-d` (debug), `-f` (force), `-v` (verbose), and `-y` + (confirm yes) can be bundled as `-dfvy`. + * **NOTE:** If `debug` or `verbose` are bundled with local options + (not the global ones above), some logging may not show up until after + the local options are parsed. + * **Use Equals**: You can also include or not include an equals sign + `=` between options and values. + * **Quote Values**: When you need to quote an entire argument, such as + when using spaces, please use a combination of double quotes and + apostrophes (`"'value'"`). In cmd.exe you can just use double quotes + (`"value"`) but in powershell.exe you should use backticks + (`` `"value`" ``) or apostrophes (`'value'`). Using the combination + allows for both shells to work without issue, except for when the next + section applies. + * **Pass quotes in arguments**: When you need to pass quoted values to + to something like a native installer, you are in for a world of fun. In + cmd.exe you must pass it like this: `-ia "/yo=""Spaces spaces"""`. In + PowerShell.exe, you must pass it like this: `-ia '/yo=""Spaces spaces""'`. + No other combination will work. In PowerShell.exe if you are on version + v3+, you can try `--%` before `-ia` to just pass the args through as is, + which means it should not require any special workarounds. + * Options and switches apply to all items passed, so if you are + installing multiple packages, and you use `--version=1.0.0`, choco + is going to look for and try to install version 1.0.0 of every + package passed. So please split out multiple package calls when + wanting to pass specific options. + +## See Help Menu In Action + +![choco help in action](https://raw.githubusercontent.com/wiki/chocolatey/choco/images/gifs/choco_help.gif) + +## Default Options and Switches + +**NOTE:** Options and switches apply to all items passed, so if you are + running a command like install that allows installing multiple + packages, and you use `--version=1.0.0`, it is going to look for and + try to install version 1.0.0 of every package passed. So please split + out multiple package calls when wanting to pass specific options. + +~~~ + + -?, --help, -h + Prints out the help menu. + + -d, --debug + Debug - Run in Debug Mode. + + -v, --verbose + Verbose - See verbose messaging. + + --acceptlicense, --accept-license + AcceptLicense - Accept license dialogs automatically. + + -y, --yes, --confirm + Confirm all prompts - Chooses affirmative answer instead of prompting. + Implies --accept-license + + -f, --force + Force - force the behavior + + --noop, --whatif, --what-if + NoOp - Don't actually do anything. + + -r, --limitoutput, --limit-output + LimitOutput - Limit the output to essential information + + --timeout, --execution-timeout=VALUE + CommandExecutionTimeout (in seconds) - The time to allow a command to + finish before timing out. Overrides the default execution timeout in the + configuration of 2700 seconds. + + -c, --cache, --cachelocation, --cache-location=VALUE + CacheLocation - Location for download cache, defaults to %TEMP% or value + in chocolatey.config file. + + --allowunofficial, --allow-unofficial, --allowunofficialbuild, --allow-unofficial-build + AllowUnofficialBuild - When not using the official build you must set + this flag for choco to continue. + + --failstderr, --failonstderr, --fail-on-stderr, --fail-on-standard-error, --fail-on-error-output + FailOnStandardError - Fail on standard error output (stderr), typically + received when running external commands during install providers. This + overrides the feature failOnStandardError. + + --use-system-powershell + UseSystemPowerShell - Execute PowerShell using an external process + instead of the built-in PowerShell host. Available in 0.9.10+. + +~~~ + + + +***NOTE:*** This documentation has been automatically generated from `choco -h`. + diff --git a/docs/generated/CommandsSearch.md b/docs/generated/CommandsSearch.md new file mode 100644 index 0000000000..c3afdf53b4 --- /dev/null +++ b/docs/generated/CommandsSearch.md @@ -0,0 +1,186 @@ +# List/Search Command (choco search) + +Chocolatey will perform a search for a package local or remote. Some + may prefer to use [[`clist`|Commandslist]] as a shortcut for [[`choco list`|Commandslist]]. + +**NOTE:** 100% compatible with older Chocolatey client (0.9.8.x and below) + with options and switches. In most cases you can still pass options + and switches with one dash (`-`). For more details, see + [[how to pass arguments|CommandsReference#how-to-pass-options--switches]] (`choco -?`). + +## Usage + + choco search [] + choco list [] + clist [] + +## Examples + + choco list --local-only + choco list -li + choco list -lai + choco list --page=0 --page-size=25 + choco search git + choco search git -s "'https://somewhere/out/there'" + choco search bob -s "'https://somewhere/protected'" -u user -p pass + +## See It In Action + +![choco search](https://raw.githubusercontent.com/wiki/chocolatey/choco/images/gifs/choco_search.gif) + + +## Alternative Sources + +Available in 0.9.10+. + +### WebPI +This specifies the source is Web PI (Web Platform Installer) and that + we are searching for a WebPI product, such as IISExpress. If you do + not have the Web PI command line installed, it will install that first + and then perform the search requested. + e.g. `choco list --source webpi` + +### Windows Features +This specifies that the source is a Windows Feature and we should + install via the Deployment Image Servicing and Management tool (DISM) + on the local machine. + e.g. `choco list --source windowsfeatures` + +## Options and Switches + +**NOTE:** Options and switches apply to all items passed, so if you are + running a command like install that allows installing multiple + packages, and you use `--version=1.0.0`, it is going to look for and + try to install version 1.0.0 of every package passed. So please split + out multiple package calls when wanting to pass specific options. + +Includes [[default options/switches|CommandsReference#default-options-and-switches]] (included below for completeness). + +~~~ + + -?, --help, -h + Prints out the help menu. + + -d, --debug + Debug - Run in Debug Mode. + + -v, --verbose + Verbose - See verbose messaging. + + --acceptlicense, --accept-license + AcceptLicense - Accept license dialogs automatically. + + -y, --yes, --confirm + Confirm all prompts - Chooses affirmative answer instead of prompting. + Implies --accept-license + + -f, --force + Force - force the behavior + + --noop, --whatif, --what-if + NoOp - Don't actually do anything. + + -r, --limitoutput, --limit-output + LimitOutput - Limit the output to essential information + + --timeout, --execution-timeout=VALUE + CommandExecutionTimeout (in seconds) - The time to allow a command to + finish before timing out. Overrides the default execution timeout in the + configuration of 2700 seconds. + + -c, --cache, --cachelocation, --cache-location=VALUE + CacheLocation - Location for download cache, defaults to %TEMP% or value + in chocolatey.config file. + + --allowunofficial, --allow-unofficial, --allowunofficialbuild, --allow-unofficial-build + AllowUnofficialBuild - When not using the official build you must set + this flag for choco to continue. + + --failstderr, --failonstderr, --fail-on-stderr, --fail-on-standard-error, --fail-on-error-output + FailOnStandardError - Fail on standard error output (stderr), typically + received when running external commands during install providers. This + overrides the feature failOnStandardError. + + --use-system-powershell + UseSystemPowerShell - Execute PowerShell using an external process + instead of the built-in PowerShell host. Available in 0.9.10+. + + -s, --source=VALUE + Source - Source location for install. Can include special 'webpi'. + Defaults to sources. + + -l, --lo, --localonly, --local-only + LocalOnly - Only search against local machine items. + + --pre, --prerelease + Prerelease - Include Prereleases? Defaults to false. + + -i, --includeprograms, --include-programs + IncludePrograms - Used in conjunction with LocalOnly, filters out apps + chocolatey has listed as packages and includes those in the list. + Defaults to false. + + -a, --all, --allversions, --all-versions + AllVersions - include results from all versions. + + -u, --user=VALUE + User - used with authenticated feeds. Defaults to empty. + + -p, --password=VALUE + Password - the user's password to the source. Defaults to empty. + + --cert=VALUE + Client certificate - PFX pathname for an x509 authenticated feeds. + Defaults to empty. Available in 0.9.10+. + + --cp, --certpassword=VALUE + Certificate Password - the client certificate's password to the source. + Defaults to empty. Available in 0.9.10+. + + --page=VALUE + Page - the 'page' of results to return. Defaults to return all results. + Available in 0.9.10+. + + --page-size=VALUE + Page Size - the amount of package results to return per page. Defaults + to 25. Available in 0.9.10+. + + -e, --exact + Exact - Only return packages with this exact name. Available in 0.9.10+. + + --by-id-only + ByIdOnly - Only return packages where the id contains the search filter. + Available in 0.9.10+. + + --id-starts-with + IdStartsWith - Only return packages where the id starts with the search + filter. Available in 0.9.10+. + + --order-by-popularity + OrderByPopularity - Sort by package results by popularity. Available in + 0.9.10+. + + --approved-only + ApprovedOnly - Only return approved packages - this option will filter + out results not from the [community repository](https://chocolatey.org/packages). Available in 0.9.10+. + + --download-cache, --download-cache-only + DownloadCacheAvailable - Only return packages that have a download cache + available - this option will filter out results not from the community + repository. Available in 0.9.10+. + + --not-broken + NotBroken - Only return packages that are not failing testing - this + option only filters out failing results from the [community feed](https://chocolatey.org/packages). It will + not filter against other sources. Available in 0.9.10+. + + --detail, --detailed + Detailed - Alias for verbose. Available in 0.9.10+. + +~~~ + +[[Command Reference|CommandsReference]] + + +***NOTE:*** This documentation has been automatically generated from `choco search -h`. + diff --git a/docs/generated/CommandsSetapiKey.md b/docs/generated/CommandsSetapiKey.md new file mode 100644 index 0000000000..a97b078f13 --- /dev/null +++ b/docs/generated/CommandsSetapiKey.md @@ -0,0 +1,101 @@ +# ApiKey Command (choco setapiKey) + +This lists api keys that are set or sets an api key for a particular + source so it doesn't need to be specified every time. + +Anything that doesn't contain source and key will list api keys. + +## Usage + + choco apikey [] + choco setapikey [] + +## Examples + + choco apikey + choco apikey -s"https://somewhere/out/there" + choco apikey -s"https://somewhere/out/there/" -k="value" + choco apikey -s"https://chocolatey.org/" -k="123-123123-123" + +## Connecting to Chocolatey.org + +In order to save your API key for https://chocolatey.org/, + log in (or register, confirm and then log in) to + https://chocolatey.org/, go to https://chocolatey.org/account, + copy the API Key, and then use it in the following command: + + choco apikey -k -s https://chocolatey.org/ + + +## Options and Switches + +**NOTE:** Options and switches apply to all items passed, so if you are + running a command like install that allows installing multiple + packages, and you use `--version=1.0.0`, it is going to look for and + try to install version 1.0.0 of every package passed. So please split + out multiple package calls when wanting to pass specific options. + +Includes [[default options/switches|CommandsReference#default-options-and-switches]] (included below for completeness). + +~~~ + + -?, --help, -h + Prints out the help menu. + + -d, --debug + Debug - Run in Debug Mode. + + -v, --verbose + Verbose - See verbose messaging. + + --acceptlicense, --accept-license + AcceptLicense - Accept license dialogs automatically. + + -y, --yes, --confirm + Confirm all prompts - Chooses affirmative answer instead of prompting. + Implies --accept-license + + -f, --force + Force - force the behavior + + --noop, --whatif, --what-if + NoOp - Don't actually do anything. + + -r, --limitoutput, --limit-output + LimitOutput - Limit the output to essential information + + --timeout, --execution-timeout=VALUE + CommandExecutionTimeout (in seconds) - The time to allow a command to + finish before timing out. Overrides the default execution timeout in the + configuration of 2700 seconds. + + -c, --cache, --cachelocation, --cache-location=VALUE + CacheLocation - Location for download cache, defaults to %TEMP% or value + in chocolatey.config file. + + --allowunofficial, --allow-unofficial, --allowunofficialbuild, --allow-unofficial-build + AllowUnofficialBuild - When not using the official build you must set + this flag for choco to continue. + + --failstderr, --failonstderr, --fail-on-stderr, --fail-on-standard-error, --fail-on-error-output + FailOnStandardError - Fail on standard error output (stderr), typically + received when running external commands during install providers. This + overrides the feature failOnStandardError. + + --use-system-powershell + UseSystemPowerShell - Execute PowerShell using an external process + instead of the built-in PowerShell host. Available in 0.9.10+. + + -s, --source=VALUE + Source [REQUIRED] - The source location for the key + + -k, --key, --apikey, --api-key=VALUE + ApiKey - The api key for the source. + +~~~ + +[[Command Reference|CommandsReference]] + + +***NOTE:*** This documentation has been automatically generated from `choco setapiKey -h`. + diff --git a/docs/generated/CommandsSource.md b/docs/generated/CommandsSource.md new file mode 100644 index 0000000000..3692750516 --- /dev/null +++ b/docs/generated/CommandsSource.md @@ -0,0 +1,120 @@ +# Source Command (choco source) + +Chocolatey will allow you to interact with sources. + +**NOTE:** Mostly compatible with older chocolatey client (0.9.8.x and + below) with options and switches. When enabling, disabling or removing + a source, use `-name` in front of the option now. In most cases you + can still pass options and switches with one dash (`-`). For more + details, see [[how to pass arguments|CommandsReference#how-to-pass-options--switches]] (`choco -?`). + +## Usage + + choco source [list]|add|remove|disable|enable [] + choco sources [list]|add|remove|disable|enable [] + +## Examples + + choco source + choco source list + choco source add -n=bob -s"https://somewhere/out/there/api/v2/" + choco source add -n=bob -s"'https://somewhere/out/there/api/v2/'" -cert=\Users\bob\bob.pfx + choco source add -n=bob -s"'https://somewhere/out/there/api/v2/'" -u=bob -p=12345 + choco source disable -n=bob + choco source enable -n=bob + choco source remove -n=bob + +## Options and Switches + +**NOTE:** Options and switches apply to all items passed, so if you are + running a command like install that allows installing multiple + packages, and you use `--version=1.0.0`, it is going to look for and + try to install version 1.0.0 of every package passed. So please split + out multiple package calls when wanting to pass specific options. + +Includes [[default options/switches|CommandsReference#default-options-and-switches]] (included below for completeness). + +~~~ + + -?, --help, -h + Prints out the help menu. + + -d, --debug + Debug - Run in Debug Mode. + + -v, --verbose + Verbose - See verbose messaging. + + --acceptlicense, --accept-license + AcceptLicense - Accept license dialogs automatically. + + -y, --yes, --confirm + Confirm all prompts - Chooses affirmative answer instead of prompting. + Implies --accept-license + + -f, --force + Force - force the behavior + + --noop, --whatif, --what-if + NoOp - Don't actually do anything. + + -r, --limitoutput, --limit-output + LimitOutput - Limit the output to essential information + + --timeout, --execution-timeout=VALUE + CommandExecutionTimeout (in seconds) - The time to allow a command to + finish before timing out. Overrides the default execution timeout in the + configuration of 2700 seconds. + + -c, --cache, --cachelocation, --cache-location=VALUE + CacheLocation - Location for download cache, defaults to %TEMP% or value + in chocolatey.config file. + + --allowunofficial, --allow-unofficial, --allowunofficialbuild, --allow-unofficial-build + AllowUnofficialBuild - When not using the official build you must set + this flag for choco to continue. + + --failstderr, --failonstderr, --fail-on-stderr, --fail-on-standard-error, --fail-on-error-output + FailOnStandardError - Fail on standard error output (stderr), typically + received when running external commands during install providers. This + overrides the feature failOnStandardError. + + --use-system-powershell + UseSystemPowerShell - Execute PowerShell using an external process + instead of the built-in PowerShell host. Available in 0.9.10+. + + -n, --name=VALUE + Name - the name of the source. Required with some actions. Defaults to + empty. + + -s, --source=VALUE + Source - The source. Defaults to empty. + + -u, --user=VALUE + User - used with authenticated feeds. Defaults to empty. + + -p, --password=VALUE + Password - the user's password to the source. Encrypted in chocolate- + y.config file. + + --cert=VALUE + Client certificate - PFX pathname for an x509 authenticated feeds. + Defaults to empty. Available in 0.9.10+. + + --cp, --certpassword=VALUE + Certificate Password - the client certificate's password to the source. + Defaults to empty. Available in 0.9.10+. + + --priority=VALUE + Priority - The priority order of this source as compared to other + sources, lower is better. Defaults to 0 (no priority). All priorities + above 0 will be evaluated first, then zero-based values will be + evaluated in config file order. Available in 0.9.9.9+. + +~~~ + +[[Command Reference|CommandsReference]] + + +***NOTE:*** This documentation has been automatically generated from `choco source -h`. + diff --git a/docs/generated/CommandsSources.md b/docs/generated/CommandsSources.md new file mode 100644 index 0000000000..c58e68fce9 --- /dev/null +++ b/docs/generated/CommandsSources.md @@ -0,0 +1,120 @@ +# Source Command (choco sources) + +Chocolatey will allow you to interact with sources. + +**NOTE:** Mostly compatible with older chocolatey client (0.9.8.x and + below) with options and switches. When enabling, disabling or removing + a source, use `-name` in front of the option now. In most cases you + can still pass options and switches with one dash (`-`). For more + details, see [[how to pass arguments|CommandsReference#how-to-pass-options--switches]] (`choco -?`). + +## Usage + + choco source [list]|add|remove|disable|enable [] + choco sources [list]|add|remove|disable|enable [] + +## Examples + + choco source + choco source list + choco source add -n=bob -s"https://somewhere/out/there/api/v2/" + choco source add -n=bob -s"'https://somewhere/out/there/api/v2/'" -cert=\Users\bob\bob.pfx + choco source add -n=bob -s"'https://somewhere/out/there/api/v2/'" -u=bob -p=12345 + choco source disable -n=bob + choco source enable -n=bob + choco source remove -n=bob + +## Options and Switches + +**NOTE:** Options and switches apply to all items passed, so if you are + running a command like install that allows installing multiple + packages, and you use `--version=1.0.0`, it is going to look for and + try to install version 1.0.0 of every package passed. So please split + out multiple package calls when wanting to pass specific options. + +Includes [[default options/switches|CommandsReference#default-options-and-switches]] (included below for completeness). + +~~~ + + -?, --help, -h + Prints out the help menu. + + -d, --debug + Debug - Run in Debug Mode. + + -v, --verbose + Verbose - See verbose messaging. + + --acceptlicense, --accept-license + AcceptLicense - Accept license dialogs automatically. + + -y, --yes, --confirm + Confirm all prompts - Chooses affirmative answer instead of prompting. + Implies --accept-license + + -f, --force + Force - force the behavior + + --noop, --whatif, --what-if + NoOp - Don't actually do anything. + + -r, --limitoutput, --limit-output + LimitOutput - Limit the output to essential information + + --timeout, --execution-timeout=VALUE + CommandExecutionTimeout (in seconds) - The time to allow a command to + finish before timing out. Overrides the default execution timeout in the + configuration of 2700 seconds. + + -c, --cache, --cachelocation, --cache-location=VALUE + CacheLocation - Location for download cache, defaults to %TEMP% or value + in chocolatey.config file. + + --allowunofficial, --allow-unofficial, --allowunofficialbuild, --allow-unofficial-build + AllowUnofficialBuild - When not using the official build you must set + this flag for choco to continue. + + --failstderr, --failonstderr, --fail-on-stderr, --fail-on-standard-error, --fail-on-error-output + FailOnStandardError - Fail on standard error output (stderr), typically + received when running external commands during install providers. This + overrides the feature failOnStandardError. + + --use-system-powershell + UseSystemPowerShell - Execute PowerShell using an external process + instead of the built-in PowerShell host. Available in 0.9.10+. + + -n, --name=VALUE + Name - the name of the source. Required with some actions. Defaults to + empty. + + -s, --source=VALUE + Source - The source. Defaults to empty. + + -u, --user=VALUE + User - used with authenticated feeds. Defaults to empty. + + -p, --password=VALUE + Password - the user's password to the source. Encrypted in chocolate- + y.config file. + + --cert=VALUE + Client certificate - PFX pathname for an x509 authenticated feeds. + Defaults to empty. Available in 0.9.10+. + + --cp, --certpassword=VALUE + Certificate Password - the client certificate's password to the source. + Defaults to empty. Available in 0.9.10+. + + --priority=VALUE + Priority - The priority order of this source as compared to other + sources, lower is better. Defaults to 0 (no priority). All priorities + above 0 will be evaluated first, then zero-based values will be + evaluated in config file order. Available in 0.9.9.9+. + +~~~ + +[[Command Reference|CommandsReference]] + + +***NOTE:*** This documentation has been automatically generated from `choco sources -h`. + diff --git a/docs/generated/CommandsUninstall.md b/docs/generated/CommandsUninstall.md new file mode 100644 index 0000000000..8dd5964310 --- /dev/null +++ b/docs/generated/CommandsUninstall.md @@ -0,0 +1,192 @@ +# Uninstall Command (choco uninstall) + +Uninstalls a package or a list of packages. Some may prefer to use + `cuninst` as a shortcut for [[`choco uninstall`|Commandsuninstall]]. + +**NOTE:** 100% compatible with older chocolatey client (0.9.8.32 and below) + with options and switches. Add `-y` for previous behavior with no + prompt. In most cases you can still pass options and switches with one + dash (`-`). For more details, see [[how to pass arguments|CommandsReference#how-to-pass-options--switches]] (`choco -?`). + +Choco 0.9.9+ automatically tracks registry changes for "Programs and + Features" of the underlying software's native installers when + installing packages. The "Automatic Uninstaller" (auto uninstaller) + service is a feature that can use that information to automatically + determine how to uninstall these natively installed applications. This + means that a package may not need an explicit chocolateyUninstall.ps1 + to reverse the installation done in the install script. + +Chocolatey tracks packages, which are the files in + `$env:ChocolateyInstall\lib\packagename`. These packages may or may not + contain the software (applications/tools) that each package represents. + The software may actually be installed in Program Files (most native + installers will install the software there) or elsewhere on the + machine. + +With auto uninstaller turned off, a chocolateyUninstall.ps1 is required + to perform uninstall from the system. In the absence of + chocolateyUninstall.ps1, choco uninstall only removes the package from + Chocolatey but does not remove the software from your system (unless + in the package directory). + +**NOTE:** Starting in 0.9.10+, the Automatic Uninstaller (AutoUninstaller) + is turned on by default. To turn it off, run the following command: + + choco feature disable -n autoUninstaller + +## Usage + + choco uninstall [pkg2 pkgN] [options/switches] + cuninst [pkg2 pkgN] [options/switches] + +**NOTE:** `all` is a special package keyword that will allow you to + uninstall all packages. + + +## See It In Action + +![choco uninstall](https://raw.githubusercontent.com/wiki/chocolatey/choco/images/gifs/choco_uninstall.gif) + + +## Examples + + choco uninstall git + choco uninstall notepadplusplus googlechrome atom 7zip + choco uninstall notepadplusplus googlechrome atom 7zip -dv + choco uninstall ruby --version 1.8.7.37402 + choco uninstall nodejs.install --all-versions + +## Options and Switches + +**NOTE:** Options and switches apply to all items passed, so if you are + running a command like install that allows installing multiple + packages, and you use `--version=1.0.0`, it is going to look for and + try to install version 1.0.0 of every package passed. So please split + out multiple package calls when wanting to pass specific options. + +Includes [[default options/switches|CommandsReference#default-options-and-switches]] (included below for completeness). + +~~~ + + + + -?, --help, -h + Prints out the help menu. + + -d, --debug + Debug - Run in Debug Mode. + + -v, --verbose + Verbose - See verbose messaging. + + --acceptlicense, --accept-license + AcceptLicense - Accept license dialogs automatically. + + -y, --yes, --confirm + Confirm all prompts - Chooses affirmative answer instead of prompting. + Implies --accept-license + + -f, --force + Force - force the behavior + + --noop, --whatif, --what-if + NoOp - Don't actually do anything. + + -r, --limitoutput, --limit-output + LimitOutput - Limit the output to essential information + + --timeout, --execution-timeout=VALUE + CommandExecutionTimeout (in seconds) - The time to allow a command to + finish before timing out. Overrides the default execution timeout in the + configuration of 2700 seconds. + + -c, --cache, --cachelocation, --cache-location=VALUE + CacheLocation - Location for download cache, defaults to %TEMP% or value + in chocolatey.config file. + + --allowunofficial, --allow-unofficial, --allowunofficialbuild, --allow-unofficial-build + AllowUnofficialBuild - When not using the official build you must set + this flag for choco to continue. + + --failstderr, --failonstderr, --fail-on-stderr, --fail-on-standard-error, --fail-on-error-output + FailOnStandardError - Fail on standard error output (stderr), typically + received when running external commands during install providers. This + overrides the feature failOnStandardError. + + --use-system-powershell + UseSystemPowerShell - Execute PowerShell using an external process + instead of the built-in PowerShell host. Available in 0.9.10+. + + -s, --source=VALUE + Source - The source to find the package(s) to install. Special sources + include: ruby, webpi, cygwin, windowsfeatures, and python. Defaults to + default feeds. + + --version=VALUE + Version - A specific version to uninstall. Defaults to unspecified. + + -a, --allversions, --all-versions + AllVersions - Uninstall all versions? Defaults to false. + + --ua, --uninstallargs, --uninstallarguments, --uninstall-arguments=VALUE + UninstallArguments - Uninstall Arguments to pass to the native installer + in the package. Defaults to unspecified. + + -o, --override, --overrideargs, --overridearguments, --override-arguments + OverrideArguments - Should uninstall arguments be used exclusively + without appending to current package passed arguments? Defaults to false. + + --notsilent, --not-silent + NotSilent - Do not uninstall this silently. Defaults to false. + + --params, --parameters, --pkgparameters, --packageparameters, --package-parameters=VALUE + PackageParameters - Parameters to pass to the package. Defaults to + unspecified. + + -x, --forcedependencies, --force-dependencies, --removedependencies, --remove-dependencies + RemoveDependencies - Uninstall dependencies when uninstalling package(s- + ). Defaults to false. + + -n, --skippowershell, --skip-powershell, --skipscripts, --skip-scripts, --skip-automation-scripts + Skip Powershell - Do not run chocolateyUninstall.ps1. Defaults to false. + + --ignorepackagecodes, --ignorepackageexitcodes, --ignore-package-codes, --ignore-package-exit-codes + IgnorePackageExitCodes - Exit with a 0 for success and 1 for non-succes- + s, no matter what package scripts provide for exit codes. Overrides the + default feature 'usePackageExitCodes' set to 'True'. Available in 0.- + 9.10+. + + --usepackagecodes, --usepackageexitcodes, --use-package-codes, --use-package-exit-codes + UsePackageExitCodes - Package scripts can provide exit codes. Use those + for choco's exit code when non-zero (this value can come from a + dependency package). Chocolatey defines valid exit codes as 0, 1605, + 1614, 1641, 3010. Overrides the default feature 'usePackageExitCodes' + set to 'True'. Available in 0.9.10+. + + --autouninstaller, --use-autouninstaller + UseAutoUninstaller - Use auto uninstaller service when uninstalling. + Overrides the default feature 'autoUninstaller' set to 'True'. Available + in 0.9.10+. + + --skipautouninstaller, --skip-autouninstaller + SkipAutoUninstaller - Skip auto uninstaller service when uninstalling. + Overrides the default feature 'autoUninstaller' set to 'True'. Available + in 0.9.10+. + + --failonautouninstaller, --fail-on-autouninstaller + FailOnAutoUninstaller - Fail the package uninstall if the auto + uninstaller reports and error. Overrides the default feature + 'failOnAutoUninstaller' set to 'False'. Available in 0.9.10+. + + --ignoreautouninstallerfailure, --ignore-autouninstaller-failure + Ignore Auto Uninstaller Failure - Do not fail the package if auto + uninstaller reports an error. Overrides the default feature + 'failOnAutoUninstaller' set to 'False'. Available in 0.9.10+. + +~~~ + +[[Command Reference|CommandsReference]] + + +***NOTE:*** This documentation has been automatically generated from `choco uninstall -h`. + diff --git a/docs/generated/CommandsUnpackself.md b/docs/generated/CommandsUnpackself.md new file mode 100644 index 0000000000..a6bdfd312e --- /dev/null +++ b/docs/generated/CommandsUnpackself.md @@ -0,0 +1,75 @@ +# UnpackSelf Command (choco unpackself) + +This will unpack files needed by choco. It will overwrite existing + files only if --force is specified. + +**NOTE:** This command should only be used when installing Chocolatey, not + during normal operation. + + +## Options and Switches + +**NOTE:** Options and switches apply to all items passed, so if you are + running a command like install that allows installing multiple + packages, and you use `--version=1.0.0`, it is going to look for and + try to install version 1.0.0 of every package passed. So please split + out multiple package calls when wanting to pass specific options. + +Includes [[default options/switches|CommandsReference#default-options-and-switches]] (included below for completeness). + +~~~ + + -?, --help, -h + Prints out the help menu. + + -d, --debug + Debug - Run in Debug Mode. + + -v, --verbose + Verbose - See verbose messaging. + + --acceptlicense, --accept-license + AcceptLicense - Accept license dialogs automatically. + + -y, --yes, --confirm + Confirm all prompts - Chooses affirmative answer instead of prompting. + Implies --accept-license + + -f, --force + Force - force the behavior + + --noop, --whatif, --what-if + NoOp - Don't actually do anything. + + -r, --limitoutput, --limit-output + LimitOutput - Limit the output to essential information + + --timeout, --execution-timeout=VALUE + CommandExecutionTimeout (in seconds) - The time to allow a command to + finish before timing out. Overrides the default execution timeout in the + configuration of 2700 seconds. + + -c, --cache, --cachelocation, --cache-location=VALUE + CacheLocation - Location for download cache, defaults to %TEMP% or value + in chocolatey.config file. + + --allowunofficial, --allow-unofficial, --allowunofficialbuild, --allow-unofficial-build + AllowUnofficialBuild - When not using the official build you must set + this flag for choco to continue. + + --failstderr, --failonstderr, --fail-on-stderr, --fail-on-standard-error, --fail-on-error-output + FailOnStandardError - Fail on standard error output (stderr), typically + received when running external commands during install providers. This + overrides the feature failOnStandardError. + + --use-system-powershell + UseSystemPowerShell - Execute PowerShell using an external process + instead of the built-in PowerShell host. Available in 0.9.10+. + +~~~ + +[[Command Reference|CommandsReference]] + + +***NOTE:*** This documentation has been automatically generated from `choco unpackself -h`. + diff --git a/docs/generated/CommandsUpdate.md b/docs/generated/CommandsUpdate.md new file mode 100644 index 0000000000..77d6c4fe40 --- /dev/null +++ b/docs/generated/CommandsUpdate.md @@ -0,0 +1,83 @@ +# [DEPRECATED] Update Command (choco update) + +**NOTE:** Update has been deprecated and will be removed/replaced in version + 1.0.0 with something that performs the functions of updating package + indexes. Please use [[`choco upgrade`|Commandsupgrade]] instead. + +## Options and Switches + +**NOTE:** Options and switches apply to all items passed, so if you are + running a command like install that allows installing multiple + packages, and you use `--version=1.0.0`, it is going to look for and + try to install version 1.0.0 of every package passed. So please split + out multiple package calls when wanting to pass specific options. + +Includes [[default options/switches|CommandsReference#default-options-and-switches]] (included below for completeness). + +~~~ + + -?, --help, -h + Prints out the help menu. + + -d, --debug + Debug - Run in Debug Mode. + + -v, --verbose + Verbose - See verbose messaging. + + --acceptlicense, --accept-license + AcceptLicense - Accept license dialogs automatically. + + -y, --yes, --confirm + Confirm all prompts - Chooses affirmative answer instead of prompting. + Implies --accept-license + + -f, --force + Force - force the behavior + + --noop, --whatif, --what-if + NoOp - Don't actually do anything. + + -r, --limitoutput, --limit-output + LimitOutput - Limit the output to essential information + + --timeout, --execution-timeout=VALUE + CommandExecutionTimeout (in seconds) - The time to allow a command to + finish before timing out. Overrides the default execution timeout in the + configuration of 2700 seconds. + + -c, --cache, --cachelocation, --cache-location=VALUE + CacheLocation - Location for download cache, defaults to %TEMP% or value + in chocolatey.config file. + + --allowunofficial, --allow-unofficial, --allowunofficialbuild, --allow-unofficial-build + AllowUnofficialBuild - When not using the official build you must set + this flag for choco to continue. + + --failstderr, --failonstderr, --fail-on-stderr, --fail-on-standard-error, --fail-on-error-output + FailOnStandardError - Fail on standard error output (stderr), typically + received when running external commands during install providers. This + overrides the feature failOnStandardError. + + --use-system-powershell + UseSystemPowerShell - Execute PowerShell using an external process + instead of the built-in PowerShell host. Available in 0.9.10+. + + -s, --source=VALUE + Source - The source to find the package(s) to install. Special sources + include: ruby, webpi, cygwin, windowsfeatures, and python. Defaults to + default feeds. + + --version=VALUE + Version - A specific version to install. Defaults to unspecified. + + --pre, --prerelease + Prerelease - Include Prereleases? Defaults to false. + +~~~ + +[[Command Reference|CommandsReference]] + + +***NOTE:*** This documentation has been automatically generated from `choco update -h`. + diff --git a/docs/generated/CommandsUpgrade.md b/docs/generated/CommandsUpgrade.md new file mode 100644 index 0000000000..e1ba557577 --- /dev/null +++ b/docs/generated/CommandsUpgrade.md @@ -0,0 +1,231 @@ +# Upgrade Command (choco upgrade) + +Upgrades a package or a list of packages. Some may prefer to use `cup` + as a shortcut for [[`choco upgrade`|Commandsupgrade]]. If you do not have a package + installed, upgrade will install it. + +**NOTE:** 100% compatible with older Chocolatey client (0.9.8.x and below) + with options and switches. Add `-y` for previous behavior with no + prompt. In most cases you can still pass options and switches with one + dash (`-`). For more details, see [[how to pass arguments|CommandsReference#how-to-pass-options--switches]] (`choco -?`). + +## Usage + + choco upgrade [ ] [] + cup [ ] [] + +**NOTE:** `all` is a special package keyword that will allow you to upgrade + all currently installed packages. + +Skip upgrading certain packages with [[`choco pin`|Commandspin]] or with the option + `--except`. + + +## Examples + + choco upgrade chocolatey + choco upgrade notepadplusplus googlechrome atom 7zip + choco upgrade notepadplusplus googlechrome atom 7zip -dvfy + choco upgrade git --params="'/GitAndUnixToolsOnPath /NoAutoCrlf'" -y + choco upgrade nodejs.install --version 0.10.35 + choco upgrade git -s "'https://somewhere/out/there'" + choco upgrade git -s "'https://somewhere/protected'" -u user -p pass + choco upgrade all + choco upgrade all --except="'skype,conemu'" + +## See It In Action + +![choco upgrade](https://raw.githubusercontent.com/wiki/chocolatey/choco/images/gifs/choco_upgrade.gif) + + +## Options and Switches + +**NOTE:** Options and switches apply to all items passed, so if you are + running a command like install that allows installing multiple + packages, and you use `--version=1.0.0`, it is going to look for and + try to install version 1.0.0 of every package passed. So please split + out multiple package calls when wanting to pass specific options. + +Includes [[default options/switches|CommandsReference#default-options-and-switches]] (included below for completeness). + +~~~ + + + + -?, --help, -h + Prints out the help menu. + + -d, --debug + Debug - Run in Debug Mode. + + -v, --verbose + Verbose - See verbose messaging. + + --acceptlicense, --accept-license + AcceptLicense - Accept license dialogs automatically. + + -y, --yes, --confirm + Confirm all prompts - Chooses affirmative answer instead of prompting. + Implies --accept-license + + -f, --force + Force - force the behavior + + --noop, --whatif, --what-if + NoOp - Don't actually do anything. + + -r, --limitoutput, --limit-output + LimitOutput - Limit the output to essential information + + --timeout, --execution-timeout=VALUE + CommandExecutionTimeout (in seconds) - The time to allow a command to + finish before timing out. Overrides the default execution timeout in the + configuration of 2700 seconds. + + -c, --cache, --cachelocation, --cache-location=VALUE + CacheLocation - Location for download cache, defaults to %TEMP% or value + in chocolatey.config file. + + --allowunofficial, --allow-unofficial, --allowunofficialbuild, --allow-unofficial-build + AllowUnofficialBuild - When not using the official build you must set + this flag for choco to continue. + + --failstderr, --failonstderr, --fail-on-stderr, --fail-on-standard-error, --fail-on-error-output + FailOnStandardError - Fail on standard error output (stderr), typically + received when running external commands during install providers. This + overrides the feature failOnStandardError. + + --use-system-powershell + UseSystemPowerShell - Execute PowerShell using an external process + instead of the built-in PowerShell host. Available in 0.9.10+. + + -s, --source=VALUE + Source - The source to find the package(s) to install. Special sources + include: ruby, webpi, cygwin, windowsfeatures, and python. Defaults to + default feeds. + + --version=VALUE + Version - A specific version to install. Defaults to unspecified. + + --pre, --prerelease + Prerelease - Include Prereleases? Defaults to false. + + --x86, --forcex86 + ForceX86 - Force x86 (32bit) installation on 64 bit systems. Defaults to + false. + + --ia, --installargs, --installarguments, --install-arguments=VALUE + InstallArguments - Install Arguments to pass to the native installer in + the package. Defaults to unspecified. + + -o, --override, --overrideargs, --overridearguments, --override-arguments + OverrideArguments - Should install arguments be used exclusively without + appending to current package passed arguments? Defaults to false. + + --notsilent, --not-silent + NotSilent - Do not install this silently. Defaults to false. + + --params, --parameters, --pkgparameters, --packageparameters, --package-parameters=VALUE + PackageParameters - Parameters to pass to the package. Defaults to + unspecified. + + --allowdowngrade, --allow-downgrade + AllowDowngrade - Should an attempt at downgrading be allowed? Defaults + to false. + + -m, --sxs, --sidebyside, --side-by-side, --allowmultiple, --allow-multiple, --allowmultipleversions, --allow-multiple-versions + AllowMultipleVersions - Should multiple versions of a package be + installed? Defaults to false. + + -i, --ignoredependencies, --ignore-dependencies + IgnoreDependencies - Ignore dependencies when upgrading package(s). + Defaults to false. + + -n, --skippowershell, --skip-powershell, --skipscripts, --skip-scripts, --skip-automation-scripts + Skip Powershell - Do not run chocolateyInstall.ps1. Defaults to false. + + --failonunfound, --fail-on-unfound + Fail On Unfound Packages - If a package is not found in feeds specified, + fail instead of warn. + + --failonnotinstalled, --fail-on-not-installed + Fail On Non-installed Packages - If a package is not already intalled, + fail instead of installing. + + -u, --user=VALUE + User - used with authenticated feeds. Defaults to empty. + + -p, --password=VALUE + Password - the user's password to the source. Defaults to empty. + + --cert=VALUE + Client certificate - PFX pathname for an x509 authenticated feeds. + Defaults to empty. Available in 0.9.10+. + + --cp, --certpassword=VALUE + Certificate Password - the client certificate's password to the source. + Defaults to empty. Available in 0.9.10+. + + --ignorechecksum, --ignore-checksum, --ignorechecksums, --ignore-checksums + IgnoreChecksums - Ignore checksums provided by the package. Available in + 0.9.9.9+. + + --ignorepackagecodes, --ignorepackageexitcodes, --ignore-package-codes, --ignore-package-exit-codes + IgnorePackageExitCodes - Exit with a 0 for success and 1 for non-succes- + s, no matter what package scripts provide for exit codes. Overrides the + default feature 'usePackageExitCodes' set to 'True'. Available in 0.- + 9.10+. + + --usepackagecodes, --usepackageexitcodes, --use-package-codes, --use-package-exit-codes + UsePackageExitCodes - Package scripts can provide exit codes. Use those + for choco's exit code when non-zero (this value can come from a + dependency package). Chocolatey defines valid exit codes as 0, 1605, + 1614, 1641, 3010. Overrides the default feature 'usePackageExitCodes' + set to 'True'. Available in 0.9.10+. + + --except=VALUE + Except - a comma-separated list of package names that should not be + upgraded when upgrading 'all'. Defaults to empty. Available in 0.9.10+. + + --sdc, --skipdownloadcache, --skip-download-cache + Skip Download Cache - Use the original download even if a private CDN + cache is available for a package. Overrides the default feature + 'downloadCache' set to 'True'. Available in 0.9.10+. [Licensed versions](https://chocolatey.org/compare) + only. + + --dc, --downloadcache, --download-cache, --use-download-cache + Use Download Cache - Use private CDN cache if available for a package. + Overrides the default feature 'downloadCache' set to 'True'. Available + in 0.9.10+. [Licensed versions](https://chocolatey.org/compare) only. + + --svc, --skipvirus, --skip-virus, --skipviruscheck, --skip-virus-check + Skip Virus Check - Skip the virus check for downloaded files on this ru- + n. Overrides the default feature 'virusCheck' set to 'True'. Available + in 0.9.10+. [Licensed versions](https://chocolatey.org/compare) only. + + --virus, --viruscheck, --virus-check + Virus Check - check downloaded files for viruses. Overrides the default + feature 'virusCheck' set to 'True'. Available in 0.9.10+. Licensed + versions only. + + --viruspositivesmin, --virus-positives-minimum=VALUE + Virus Check Minimum Scan Result Positives - the minimum number of scan + result positives required to flag a package. Used when virusScannerType + is VirusTotal. Overrides the default configuration value + 'virusCheckMinimumPositives' set to '5'. Available in 0.9.10+. Licensed + versions only. + + --dir, --directory, --installdir, --installdirectory, --install-dir, --install-directory=VALUE + Install Directory Override - Override the default installation director- + y. Chocolatey will automatically determine the type of installer and + pass the appropriate arguments to override the install directory. The + package must use Chocolatey install helpers and be installing an + installer for software. Available in 0.9.10+. [Licensed versions](https://chocolatey.org/compare) only. + +~~~ + +[[Command Reference|CommandsReference]] + + +***NOTE:*** This documentation has been automatically generated from `choco upgrade -h`. + diff --git a/docs/generated/CommandsVersion.md b/docs/generated/CommandsVersion.md new file mode 100644 index 0000000000..234a6b1c65 --- /dev/null +++ b/docs/generated/CommandsVersion.md @@ -0,0 +1,87 @@ +# [DEPRECATED] Version Command (choco version) + +**NOTE:** Version has been deprecated and will be removed in version 1.0.0. + + If you are attempting to get local installed items, use + `choco list -lo`. + + If you want to know what has available upgrades, use + `choco upgrade -whatif` or [[`choco outdated`|Commandsoutdated]]. + +## Options and Switches + +**NOTE:** Options and switches apply to all items passed, so if you are + running a command like install that allows installing multiple + packages, and you use `--version=1.0.0`, it is going to look for and + try to install version 1.0.0 of every package passed. So please split + out multiple package calls when wanting to pass specific options. + +Includes [[default options/switches|CommandsReference#default-options-and-switches]] (included below for completeness). + +~~~ + + -?, --help, -h + Prints out the help menu. + + -d, --debug + Debug - Run in Debug Mode. + + -v, --verbose + Verbose - See verbose messaging. + + --acceptlicense, --accept-license + AcceptLicense - Accept license dialogs automatically. + + -y, --yes, --confirm + Confirm all prompts - Chooses affirmative answer instead of prompting. + Implies --accept-license + + -f, --force + Force - force the behavior + + --noop, --whatif, --what-if + NoOp - Don't actually do anything. + + -r, --limitoutput, --limit-output + LimitOutput - Limit the output to essential information + + --timeout, --execution-timeout=VALUE + CommandExecutionTimeout (in seconds) - The time to allow a command to + finish before timing out. Overrides the default execution timeout in the + configuration of 2700 seconds. + + -c, --cache, --cachelocation, --cache-location=VALUE + CacheLocation - Location for download cache, defaults to %TEMP% or value + in chocolatey.config file. + + --allowunofficial, --allow-unofficial, --allowunofficialbuild, --allow-unofficial-build + AllowUnofficialBuild - When not using the official build you must set + this flag for choco to continue. + + --failstderr, --failonstderr, --fail-on-stderr, --fail-on-standard-error, --fail-on-error-output + FailOnStandardError - Fail on standard error output (stderr), typically + received when running external commands during install providers. This + overrides the feature failOnStandardError. + + --use-system-powershell + UseSystemPowerShell - Execute PowerShell using an external process + instead of the built-in PowerShell host. Available in 0.9.10+. + + -s, --source=VALUE + Source - The source to find the package(s) to install. Special sources + include: ruby, webpi, cygwin, windowsfeatures, and python. Defaults to + default feeds. + + --lo, --localonly + LocalOnly - Only search against local machine items. + + --pre, --prerelease + Prerelease - Include Prereleases? Defaults to false. + +~~~ + +[[Command Reference|CommandsReference]] + + +***NOTE:*** This documentation has been automatically generated from `choco version -h`. + diff --git a/docs/generated/HelpersFormatFileSize.md b/docs/generated/HelpersFormatFileSize.md new file mode 100644 index 0000000000..46dbd59a8a --- /dev/null +++ b/docs/generated/HelpersFormatFileSize.md @@ -0,0 +1,80 @@ +# Format-FileSize + +DO NOT USE. Not part of the public API. + +## Syntax + +~~~powershell +Format-FileSize ` + -Size ` + [-IgnoredArguments ] [] +~~~ + +## Description + +Formats file size into a human readable format. + +## Notes + +Available in 0.9.10+. + +This function is not part of the API. + +## Aliases + +None + +## Inputs + +None + +## Outputs + +None + +## Parameters + +### -Size <Double> +The size of a file in bytes. + +Property | Value +---------------------- | ----- +Aliases | +Required? | true +Position? | 1 +Default Value | 0 +Accept Pipeline Input? | false + +### -IgnoredArguments [<Object[]>] +Allows splatting with arguments that do not apply. Do not use directly. + +Property | Value +---------------------- | ----- +Aliases | +Required? | false +Position? | named +Default Value | +Accept Pipeline Input? | false + +### <CommonParameters> + +This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see `about_CommonParameters` http://go.microsoft.com/fwlink/p/?LinkID=113216 . + + +## Examples + + **EXAMPLE 1** + +~~~powershell +Format-FileSize -Size $fileSizeBytes + +~~~ + +## Links + + * [[Get-WebFile|HelpersGetWebFile]] + + +[[Function Reference|HelpersReference]] + +***NOTE:*** This documentation has been automatically generated from `Import-Module "$env:ChocolateyInstall\helpers\chocolateyInstaller.psm1" -Force; Get-Help Format-FileSize -Full`. diff --git a/docs/generated/HelpersGetChecksumValid.md b/docs/generated/HelpersGetChecksumValid.md new file mode 100644 index 0000000000..3584f84546 --- /dev/null +++ b/docs/generated/HelpersGetChecksumValid.md @@ -0,0 +1,114 @@ +# Get-ChecksumValid + +Checks a file's checksum versus a passed checksum and checksum type. + +## Syntax + +~~~powershell +Get-ChecksumValid ` + -File ` + [-Checksum ] ` + [-ChecksumType ] ` + [-IgnoredArguments ] [] +~~~ + +## Description + +Makes a determination if a file meets an expected checksum. This +function is usually used when comparing a file that is downloaded from +an official distribution point. If the checksum fails to +match, this function throws an error. + +## Notes + +This uses the checksum.exe tool available separately at +https://chocolatey.org/packages/checksum. + +## Aliases + +None + +## Inputs + +None + +## Outputs + +None + +## Parameters + +### -File <String> +The full path to a binary file that is checksummed and compared to the +passed Checksum parameter value. + +Property | Value +---------------------- | ----- +Aliases | +Required? | true +Position? | 1 +Default Value | +Accept Pipeline Input? | false + +### -Checksum [<String>] +The expected checksum hash value of the File resource. The checksum +type is covered by ChecksumType. + +Property | Value +---------------------- | ----- +Aliases | +Required? | false +Position? | 2 +Default Value | +Accept Pipeline Input? | false + +### -ChecksumType [<String>] +The type of checkum that the file is validated with - 'md5', 'sha1', +'sha256' or 'sha512' - defaults to 'md5'. + +MD5 is not recommended as certain organizations need to use FIPS +compliant algorithms for hashing - see +https://support.microsoft.com/en-us/kb/811833 for more details. + +Property | Value +---------------------- | ----- +Aliases | +Required? | false +Position? | 3 +Default Value | md5 +Accept Pipeline Input? | false + +### -IgnoredArguments [<Object[]>] +Allows splatting with arguments that do not apply. Do not use directly. + +Property | Value +---------------------- | ----- +Aliases | +Required? | false +Position? | named +Default Value | +Accept Pipeline Input? | false + +### <CommonParameters> + +This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see `about_CommonParameters` http://go.microsoft.com/fwlink/p/?LinkID=113216 . + + +## Examples + + **EXAMPLE 1** + +~~~powershell +Get-CheckSumValid -File $fileFullPath -CheckSum $checksum -ChecksumType $checksumType + +~~~ + +## Links + + * [[Get-ChocolateyWebFile|HelpersGetChocolateyWebFile]] + * [[Install-ChocolateyPackage|HelpersInstallChocolateyPackage]] + + +[[Function Reference|HelpersReference]] + +***NOTE:*** This documentation has been automatically generated from `Import-Module "$env:ChocolateyInstall\helpers\chocolateyInstaller.psm1" -Force; Get-Help Get-ChecksumValid -Full`. diff --git a/docs/generated/HelpersGetChocolateyUnzip.md b/docs/generated/HelpersGetChocolateyUnzip.md new file mode 100644 index 0000000000..744ca3a21e --- /dev/null +++ b/docs/generated/HelpersGetChocolateyUnzip.md @@ -0,0 +1,127 @@ +# Get-ChocolateyUnzip + +Unzips an archive file and returns the location for further processing. + +## Syntax + +~~~powershell +Get-ChocolateyUnzip ` + -FileFullPath ` + -Destination ` + [-SpecificFolder ] ` + [-PackageName ] ` + [-IgnoredArguments ] [] +~~~ + +## Description + +This unzips files using the 7-zip standalone command line tool 7za.exe. +Supported archive formats are: 7z, lzma, cab, zip, gzip, bzip2, and tar. + +## Notes + +If extraction fails, an exception is thrown. + +If you are embedding files into a package, ensure that you have the +rights to redistribute those files if you are sharing this package +publicly (like on the [community feed](https://chocolatey.org/packages)). Otherwise, please use +Install-ChocolateyZipPackage to download those resources from their +official distribution points. + +## Aliases + +None + +## Inputs + +None + +## Outputs + +None + +## Parameters + +### -FileFullPath <String> +This is the full path to the zip file. If embedding it in the package +next to the install script, the path will be like +`"$(Split-Path -Parent $MyInvocation.MyCommand.Definition)\\file.zip"` + +Property | Value +---------------------- | ----- +Aliases | +Required? | true +Position? | 1 +Default Value | +Accept Pipeline Input? | false + +### -Destination <String> +This is a directory where you would like the unzipped files to end up. +If it does not exist, it will be created. + +Property | Value +---------------------- | ----- +Aliases | +Required? | true +Position? | 2 +Default Value | +Accept Pipeline Input? | false + +### -SpecificFolder [<String>] +OPTIONAL - This is a specific directory within zip file to extract. + +Property | Value +---------------------- | ----- +Aliases | +Required? | false +Position? | 3 +Default Value | +Accept Pipeline Input? | false + +### -PackageName [<String>] +OPTIONAL - This will faciliate logging unzip activity for subsequent +uninstalls + +Property | Value +---------------------- | ----- +Aliases | +Required? | false +Position? | 4 +Default Value | +Accept Pipeline Input? | false + +### -IgnoredArguments [<Object[]>] +Allows splatting with arguments that do not apply. Do not use directly. + +Property | Value +---------------------- | ----- +Aliases | +Required? | false +Position? | named +Default Value | +Accept Pipeline Input? | false + +### <CommonParameters> + +This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see `about_CommonParameters` http://go.microsoft.com/fwlink/p/?LinkID=113216 . + + +## Examples + + **EXAMPLE 1** + +~~~powershell + +# Path to the folder where the script is executing +$toolsDir = (Split-Path -parent $MyInvocation.MyCommand.Definition) +Get-ChocolateyUnzip -FileFullPath "c:\someFile.zip" -Destination $toolsDir +~~~ + +## Links + + * [[Install-ChocolateyZipPackage|HelpersInstallChocolateyZipPackage]] + + +[[Function Reference|HelpersReference]] + +***NOTE:*** This documentation has been automatically generated from `Import-Module "$env:ChocolateyInstall\helpers\chocolateyInstaller.psm1" -Force; Get-Help Get-ChocolateyUnzip -Full`. diff --git a/docs/generated/HelpersGetChocolateyWebFile.md b/docs/generated/HelpersGetChocolateyWebFile.md new file mode 100644 index 0000000000..2df6079c56 --- /dev/null +++ b/docs/generated/HelpersGetChocolateyWebFile.md @@ -0,0 +1,273 @@ +# Get-ChocolateyWebFile + +Downloads a file from the internets. + +## Syntax + +~~~powershell +Get-ChocolateyWebFile ` + -PackageName ` + -FileFullPath ` + [-Url ] ` + [-Url64bit ] ` + [-Checksum ] ` + [-ChecksumType ] ` + [-Checksum64 ] ` + [-ChecksumType64 ] ` + [-Options ] ` + [-GetOriginalFileName] ` + [-IgnoredArguments ] [] +~~~ + +## Description + +This will download a file from a url, tracking with a progress bar. +It returns the filepath to the downloaded file when it is complete. + +## Notes + +Chocolatey works best when the packages contain the software it is +managing and doesn't require downloads. However most software in the +Windows world requires redistribution rights and when sharing packages +publicly (like on the [community feed](https://chocolatey.org/packages)), maintainers may not have those +aforementioned rights. Chocolatey understands how to work with that, +hence this function. You are not subject to this limitation with +internal packages. + +## Aliases + +None + +## Inputs + +None + +## Outputs + +None + +## Parameters + +### -PackageName <String> +The name of the package - while this is an arbitrary value, it's +recommended that it matches the package id. + +Property | Value +---------------------- | ----- +Aliases | +Required? | true +Position? | 1 +Default Value | +Accept Pipeline Input? | false + +### -FileFullPath <String> +This is the full path of the resulting file name. + +Property | Value +---------------------- | ----- +Aliases | +Required? | true +Position? | 2 +Default Value | +Accept Pipeline Input? | false + +### -Url [<String>] +This is the 32 bit url to download the resource from. This resource can +be used on 64 bit systems when a package has both a Url and Url64bit +specified if a user passes `--forceX86`. If there is only a 64 bit url +available, please remove do not use the paramter (only use Url64bit). +Will fail on 32bit systems if missing or if a user attempts to force +a 32 bit installation on a 64 bit system. + +Prefer HTTPS when available. Can be HTTP, FTP, or File URIs. + +Property | Value +---------------------- | ----- +Aliases | +Required? | false +Position? | 3 +Default Value | +Accept Pipeline Input? | false + +### -Url64bit [<String>] +OPTIONAL - If there is a 64 bit resource available, use this +parameter. Chocolatey will automatically determine if the user is +running a 64 bit OS or not and adjust accordingly. Please note that +the 32 bit url will be used in the absence of this. This parameter +should only be used for 64 bit native software. If the original Url +contains both (which is quite rare), set this to '$url' Otherwise remove +this parameter. + +Prefer HTTPS when available. Can be HTTP, FTP, or File URIs. + +Property | Value +---------------------- | ----- +Aliases | +Required? | false +Position? | 4 +Default Value | +Accept Pipeline Input? | false + +### -Checksum [<String>] +OPTIONAL (Highly recommended) - The checksum hash value of the Url +resource. This allows a checksum to be validated for files that are not +local. The checksum type is covered by ChecksumType. + +Property | Value +---------------------- | ----- +Aliases | +Required? | false +Position? | named +Default Value | +Accept Pipeline Input? | false + +### -ChecksumType [<String>] +OPTIONAL - The type of checkum that the file is validated with - valid +values are 'md5', 'sha1', 'sha256' or 'sha512' - defaults to 'md5'. + +MD5 is not recommended as certain organizations need to use FIPS +compliant algorithms for hashing - see +https://support.microsoft.com/en-us/kb/811833 for more details. + +Property | Value +---------------------- | ----- +Aliases | +Required? | false +Position? | named +Default Value | +Accept Pipeline Input? | false + +### -Checksum64 [<String>] +OPTIONAL (Highly recommended) - The checksum hash value of the Url64bit +resource. This allows a checksum to be validated for files that are not +local. The checksum type is covered by ChecksumType64. + +Property | Value +---------------------- | ----- +Aliases | +Required? | false +Position? | named +Default Value | +Accept Pipeline Input? | false + +### -ChecksumType64 [<String>] +OPTIONAL - The type of checkum that the file is validated with - valid +values are 'md5', 'sha1', 'sha256' or 'sha512' - defaults to +ChecksumType parameter value. + +MD5 is not recommended as certain organizations need to use FIPS +compliant algorithms for hashing - see +https://support.microsoft.com/en-us/kb/811833 for more details. + +Property | Value +---------------------- | ------------- +Aliases | +Required? | false +Position? | named +Default Value | $checksumType +Accept Pipeline Input? | false + +### -Options [<Hashtable>] +OPTIONAL - Specify custom headers. Available in 0.9.10+. + +Property | Value +---------------------- | -------------- +Aliases | +Required? | false +Position? | named +Default Value | @{Headers=@{}} +Accept Pipeline Input? | false + +### -GetOriginalFileName +OPTIONAL switch to allow Chocolatey to determine the original file name +from the url resource. + +Property | Value +---------------------- | ----- +Aliases | +Required? | false +Position? | named +Default Value | False +Accept Pipeline Input? | false + +### -IgnoredArguments [<Object[]>] +Allows splatting with arguments that do not apply. Do not use directly. + +Property | Value +---------------------- | ----- +Aliases | +Required? | false +Position? | named +Default Value | +Accept Pipeline Input? | false + +### <CommonParameters> + +This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see `about_CommonParameters` http://go.microsoft.com/fwlink/p/?LinkID=113216 . + + +## Examples + + **EXAMPLE 1** + +~~~powershell +Get-ChocolateyWebFile '__NAME__' 'C:\somepath\somename.exe' 'URL' '64BIT_URL_DELETE_IF_NO_64BIT' + +~~~ + +**EXAMPLE 2** + +~~~powershell + +# Download from an HTTPS location +$toolsDir = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)" +Get-ChocolateyWebFile -PackageName 'bob' -FileFullPath "$toolsDir\bob.exe" -Url 'https://somewhere/bob.exe' +~~~ + +**EXAMPLE 3** + +~~~powershell + +# Download from FTP +$toolsDir = "$(Split-Path -Parent $MyInvocation.MyCommand.Definition)" +Get-ChocolateyWebFile -PackageName 'bob' -FileFullPath "$toolsDir\bob.exe" -Url 'ftp://somewhere/bob.exe' +~~~ + +**EXAMPLE 4** + +~~~powershell + +# Download from a file share +$toolsDir = "$(Split-Path -Parent $MyInvocation.MyCommand.Definition)" +Get-ChocolateyWebFile -PackageName 'bob' -FileFullPath "$toolsDir\bob.exe" -Url 'file:///\\fileshare\location\bob.exe' +~~~ + +**EXAMPLE 5** + +~~~powershell + +$options = +@{ + Headers = @{ + Accept = 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8'; + 'Accept-Charset' = 'ISO-8859-1,utf-8;q=0.7,*;q=0.3'; + 'Accept-Language' = 'en-GB,en-US;q=0.8,en;q=0.6'; + Cookie = 'requiredinfo=info'; + Referer = 'https://somelocation.com/'; + } +} + +Get-ChocolateyWebFile -PackageName 'package' -FileFullPath "$(Split-Path -Parent $MyInvocation.MyCommand.Definition)\thefile.exe" -Url 'https://somelocation.com/thefile.exe' -Options $options +~~~ + +## Links + + * [[Install-ChocolateyPackage|HelpersInstallChocolateyPackage]] + * [[Get-WebFile|HelpersGetWebFile]] + * [[Get-WebFileName|HelpersGetWebFileName]] + * [[Get-FtpFile|HelpersGetFtpFile]] + + +[[Function Reference|HelpersReference]] + +***NOTE:*** This documentation has been automatically generated from `Import-Module "$env:ChocolateyInstall\helpers\chocolateyInstaller.psm1" -Force; Get-Help Get-ChocolateyWebFile -Full`. diff --git a/docs/generated/HelpersGetEnvironmentVariable.md b/docs/generated/HelpersGetEnvironmentVariable.md new file mode 100644 index 0000000000..845127df79 --- /dev/null +++ b/docs/generated/HelpersGetEnvironmentVariable.md @@ -0,0 +1,119 @@ +# Get-EnvironmentVariable + +Gets an Environment Variable. + +## Syntax + +~~~powershell +Get-EnvironmentVariable ` + -Name ` + -Scope {Process | User | Machine} ` + [-PreserveVariables] ` + [-IgnoredArguments ] [] +~~~ + +## Description + +This will will get an environment variable based on the variable name +and scope while accounting whether to expand the variable or not +(e.g.: `%TEMP%`-> `C:\User\Username\AppData\Local\Temp`). + +## Notes + +This helper reduces the number of lines one would have to write to get +environment variables, mainly when not expanding the variables is a +must. + +## Aliases + +None + +## Inputs + +None + +## Outputs + +None + +## Parameters + +### -Name <String> +The environemnt variable you want to get the value from. + +Property | Value +---------------------- | ----- +Aliases | +Required? | true +Position? | 1 +Default Value | +Accept Pipeline Input? | false + +### -Scope +The environemnt variable target scope. This is `Process`, `User`, or +`Machine`. + + +Valid options: Process, User, Machine + +Property | Value +---------------------- | ----- +Aliases | +Required? | true +Position? | 2 +Default Value | +Accept Pipeline Input? | false + +### -PreserveVariables +A switch parameter stating whether you want to expand the variables or +not. Defaults to false. Available in 0.9.10+. + +Property | Value +---------------------- | ----- +Aliases | +Required? | false +Position? | named +Default Value | False +Accept Pipeline Input? | false + +### -IgnoredArguments [<Object[]>] +Allows splatting with arguments that do not apply. Do not use directly. + +Property | Value +---------------------- | ----- +Aliases | +Required? | false +Position? | 3 +Default Value | +Accept Pipeline Input? | false + +### <CommonParameters> + +This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see `about_CommonParameters` http://go.microsoft.com/fwlink/p/?LinkID=113216 . + + +## Examples + + **EXAMPLE 1** + +~~~powershell +Get-EnvironmentVariable -Name 'TEMP' -Scope User -PreserveVariables + +~~~ + +**EXAMPLE 2** + +~~~powershell +Get-EnvironmentVariable -Name 'PATH' -Scope Machine + +~~~ + +## Links + + * [[Get-EnvironmentVariableNames|HelpersGetEnvironmentVariableNames]] + * [[Set-EnvironmentVariable|HelpersSetEnvironmentVariable]] + + +[[Function Reference|HelpersReference]] + +***NOTE:*** This documentation has been automatically generated from `Import-Module "$env:ChocolateyInstall\helpers\chocolateyInstaller.psm1" -Force; Get-Help Get-EnvironmentVariable -Full`. diff --git a/docs/generated/HelpersGetEnvironmentVariableNames.md b/docs/generated/HelpersGetEnvironmentVariableNames.md new file mode 100644 index 0000000000..c77180ec97 --- /dev/null +++ b/docs/generated/HelpersGetEnvironmentVariableNames.md @@ -0,0 +1,55 @@ +# Get-EnvironmentVariableNames + +Gets all environment variable names. + +## Syntax + +~~~powershell +Get-EnvironmentVariableNames ` + [-Scope {Process | User | Machine}] +~~~ + +## Description + +Provides a list of environment variable names based on the scope. This +can be used to loop through the list and generate names. + +## Notes + +Process dumps the current environment variable names in memory / +session. The other scopes refer to the registry values. + +## Aliases + +None + +## Inputs + +None + +## Outputs + +None + +## Parameters + + + +## Examples + + **EXAMPLE 1** + +~~~powershell +Get-EnvironmentVariableNames -Scope Machine + +~~~ + +## Links + + * [[Get-EnvironmentVariable|HelpersGetEnvironmentVariable]] + * [[Set-EnvironmentVariable|HelpersSetEnvironmentVariable]] + + +[[Function Reference|HelpersReference]] + +***NOTE:*** This documentation has been automatically generated from `Import-Module "$env:ChocolateyInstall\helpers\chocolateyInstaller.psm1" -Force; Get-Help Get-EnvironmentVariableNames -Full`. diff --git a/docs/generated/HelpersGetFtpFile.md b/docs/generated/HelpersGetFtpFile.md new file mode 100644 index 0000000000..9f533cf53a --- /dev/null +++ b/docs/generated/HelpersGetFtpFile.md @@ -0,0 +1,123 @@ +# Get-FtpFile + +Downloads a file from a File Transfter Protocol (FTP) location. + +## Syntax + +~~~powershell +Get-FtpFile ` + [-Url ] ` + -FileName ` + [-Username ] ` + [-Password ] ` + [-Quiet] ` + [-IgnoredArguments ] [] +~~~ + +## Description + +This will download a file from an FTP location, saving the file to the +FileName location specified. + +## Notes + +This is a low-level function and not recommended for use in package +scripts. It is recommended you call `Get-ChocolateyWebFile` instead. + +## Aliases + +None + +## Inputs + +None + +## Outputs + +None + +## Parameters + +### -Url [<String>] +This is the url to download the file from. + +Property | Value +---------------------- | ----- +Aliases | +Required? | false +Position? | 1 +Default Value | +Accept Pipeline Input? | false + +### -FileName <String> +This is the full path to the file to create. If FTPing to the +package folder next to the install script, the path will be like +`"$(Split-Path -Parent $MyInvocation.MyCommand.Definition)\\file.exe"` + +Property | Value +---------------------- | ----- +Aliases | +Required? | true +Position? | 2 +Default Value | +Accept Pipeline Input? | false + +### -Username [<String>] +The user account to connect to FTP with. + +Property | Value +---------------------- | ----- +Aliases | +Required? | false +Position? | 3 +Default Value | +Accept Pipeline Input? | false + +### -Password [<String>] +The password for the user account on the FTP server. + +Property | Value +---------------------- | ----- +Aliases | +Required? | false +Position? | 4 +Default Value | +Accept Pipeline Input? | false + +### -Quiet +Silences the progress output. + +Property | Value +---------------------- | ----- +Aliases | +Required? | false +Position? | named +Default Value | False +Accept Pipeline Input? | false + +### -IgnoredArguments [<Object[]>] +Allows splatting with arguments that do not apply. Do not use directly. + +Property | Value +---------------------- | ----- +Aliases | +Required? | false +Position? | named +Default Value | +Accept Pipeline Input? | false + +### <CommonParameters> + +This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see `about_CommonParameters` http://go.microsoft.com/fwlink/p/?LinkID=113216 . + + + +## Links + + * [[Get-ChocolateyWebFile|HelpersGetChocolateyWebFile]] + * [[Get-WebFile|HelpersGetWebFile]] + + +[[Function Reference|HelpersReference]] + +***NOTE:*** This documentation has been automatically generated from `Import-Module "$env:ChocolateyInstall\helpers\chocolateyInstaller.psm1" -Force; Get-Help Get-FtpFile -Full`. diff --git a/docs/generated/HelpersGetOSArchitectureWidth.md b/docs/generated/HelpersGetOSArchitectureWidth.md new file mode 100644 index 0000000000..16983305ac --- /dev/null +++ b/docs/generated/HelpersGetOSArchitectureWidth.md @@ -0,0 +1,46 @@ +# Get-OSArchitectureWidth + +Get the operating system architecture address width. + +## Syntax + +~~~powershell +Get-OSArchitectureWidth ` + [-Compare ] +~~~ + +## Description + +This will return the system architecture address width (probably 32 or +64 bit). If you pass a comparison, it will return true or false instead +of {`32`|`64`}. + +## Notes + +When your installation script has to know what architecture it is run +on, this simple function comes in handy. + +Available as `Get-OSArchitectureWidth` in 0.9.10+. If you need +compatibility with pre 0.9.10, please use the alias `Get-ProcessorBits`. + +## Aliases + +None + +## Inputs + +None + +## Outputs + +None + +## Parameters + + + + + +[[Function Reference|HelpersReference]] + +***NOTE:*** This documentation has been automatically generated from `Import-Module "$env:ChocolateyInstall\helpers\chocolateyInstaller.psm1" -Force; Get-Help Get-OSArchitectureWidth -Full`. diff --git a/docs/generated/HelpersGetToolsLocation.md b/docs/generated/HelpersGetToolsLocation.md new file mode 100644 index 0000000000..15af756a88 --- /dev/null +++ b/docs/generated/HelpersGetToolsLocation.md @@ -0,0 +1,53 @@ +# Get-ToolsLocation + +Gets the top level location for tools/software installed outside of +package folders. + +## Syntax + +~~~powershell +Get-ToolsLocation +~~~ + +## Description + +Creates or uses an environment variable that a user can control to +communicate with packages about where they would like software that is +not installed through native installers, but doesn't make much sense +to be kept in package folders. Most software coming in packages stays +with the package itself, but there are some things that seem to fall +out of this category, like things that have plugins that are installed +into the same directory as the tool. Having that all combined in the +same package directory could get tricky. + +## Notes + +This is the successor to the poorly named `Get-BinRoot`. Available as +`Get-ToolsLocation` in 0.9.10+. If you need compatibility with pre +0.9.10, please use `Get-BinRoot`. + +Sets an environment variable called `ChocolateyToolsLocation`. If the +older `ChocolateyBinRoot` is set, it uses the value from that and +removes the older variable. + +## Aliases + +None + +## Inputs + +None + +## Outputs + +None + +## Parameters + + + + + +[[Function Reference|HelpersReference]] + +***NOTE:*** This documentation has been automatically generated from `Import-Module "$env:ChocolateyInstall\helpers\chocolateyInstaller.psm1" -Force; Get-Help Get-ToolsLocation -Full`. diff --git a/docs/generated/HelpersGetUACEnabled.md b/docs/generated/HelpersGetUACEnabled.md new file mode 100644 index 0000000000..3e8e2e2278 --- /dev/null +++ b/docs/generated/HelpersGetUACEnabled.md @@ -0,0 +1,41 @@ +# Get-UACEnabled + +Determines if UAC (User Account Control) is turned on or off. + +## Syntax + +~~~powershell +Get-UACEnabled +~~~ + +## Description + +This is a low level function used by Chocolatey to decide whether +prompting for elevated privileges is necessary or not. + +## Notes + +This checks the `EnableLUA` registry value to be determine the state of +a system. + +## Aliases + +None + +## Inputs + +None + +## Outputs + +None + +## Parameters + + + + + +[[Function Reference|HelpersReference]] + +***NOTE:*** This documentation has been automatically generated from `Import-Module "$env:ChocolateyInstall\helpers\chocolateyInstaller.psm1" -Force; Get-Help Get-UACEnabled -Full`. diff --git a/docs/generated/HelpersGetVirusCheckValid.md b/docs/generated/HelpersGetVirusCheckValid.md new file mode 100644 index 0000000000..64a5abe060 --- /dev/null +++ b/docs/generated/HelpersGetVirusCheckValid.md @@ -0,0 +1,81 @@ +# Get-VirusCheckValid + +Used in Pro/Business editions. Runtime virus check against downloaded +resources. + +## Syntax + +~~~powershell +Get-VirusCheckValid ` + [-Url ] ` + [-File ] ` + [-IgnoredArguments ] [] +~~~ + +## Description + +Run a runtime malware check against downloaded resources prior to +allowing Chocolatey to execute a file. This is available in 0.9.10+ only +in Pro / Business editions. + +## Notes + +Only [licensed editions](https://chocolatey.org/compare) of [Chocolatey pro](https://chocolatey.org/compare)vide runtime malware protection. + +## Aliases + +None + +## Inputs + +None + +## Outputs + +None + +## Parameters + +### -Url [<String>] +Not used + +Property | Value +---------------------- | ----- +Aliases | +Required? | false +Position? | 1 +Default Value | +Accept Pipeline Input? | false + +### -File [<String>] +The full file path to the file to verify against anti-virus scanners. + +Property | Value +---------------------- | ----- +Aliases | +Required? | false +Position? | 2 +Default Value | +Accept Pipeline Input? | false + +### -IgnoredArguments [<Object[]>] +Allows splatting with arguments that do not apply. Do not use directly. + +Property | Value +---------------------- | ----- +Aliases | +Required? | false +Position? | named +Default Value | +Accept Pipeline Input? | false + +### <CommonParameters> + +This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see `about_CommonParameters` http://go.microsoft.com/fwlink/p/?LinkID=113216 . + + + + +[[Function Reference|HelpersReference]] + +***NOTE:*** This documentation has been automatically generated from `Import-Module "$env:ChocolateyInstall\helpers\chocolateyInstaller.psm1" -Force; Get-Help Get-VirusCheckValid -Full`. diff --git a/docs/generated/HelpersGetWebFile.md b/docs/generated/HelpersGetWebFile.md new file mode 100644 index 0000000000..67b3a2e3a9 --- /dev/null +++ b/docs/generated/HelpersGetWebFile.md @@ -0,0 +1,139 @@ +# Get-WebFile + +Downloads a file from an HTTP/HTTPS location. Prefer HTTPS when +available. + +## Syntax + +~~~powershell +Get-WebFile ` + [-Url ] ` + [-FileName ] ` + [-UserAgent ] ` + [-Passthru] ` + [-Quiet] ` + [-Options ] ` + [-IgnoredArguments ] [] +~~~ + +## Description + +This will download a file from an HTTP/HTTPS location, saving the file +to the FileName location specified. + +## Notes + +This is a low-level function and not recommended for use in package +scripts. It is recommended you call `Get-ChocolateyWebFile` instead. + +## Aliases + +None + +## Inputs + +None + +## Outputs + +None + +## Parameters + +### -Url [<String>] +This is the url to download the file from. Prefer HTTPS when available. + +Property | Value +---------------------- | ----- +Aliases | +Required? | false +Position? | 1 +Default Value | +Accept Pipeline Input? | false + +### -FileName [<String>] +This is the full path to the file to create. If downloading to the +package folder next to the install script, the path will be like +`"$(Split-Path -Parent $MyInvocation.MyCommand.Definition)\\file.exe"` + +Property | Value +---------------------- | ----- +Aliases | +Required? | false +Position? | 2 +Default Value | +Accept Pipeline Input? | false + +### -UserAgent [<String>] +The user agent to use as part of the request. Defaults to 'chocolatey +command line'. + +Property | Value +---------------------- | ----------------------- +Aliases | +Required? | false +Position? | 3 +Default Value | chocolatey command line +Accept Pipeline Input? | false + +### -Passthru +DO NOT USE - holdover from original function. + +Property | Value +---------------------- | ----- +Aliases | +Required? | false +Position? | named +Default Value | False +Accept Pipeline Input? | false + +### -Quiet +Silences the progress output. + +Property | Value +---------------------- | ----- +Aliases | +Required? | false +Position? | named +Default Value | False +Accept Pipeline Input? | false + +### -Options [<Hashtable>] +OPTIONAL - Specify custom headers. Available in 0.9.10+. + +Property | Value +---------------------- | -------------- +Aliases | +Required? | false +Position? | named +Default Value | @{Headers=@{}} +Accept Pipeline Input? | false + +### -IgnoredArguments [<Object[]>] +Allows splatting with arguments that do not apply. Do not use directly. + +Property | Value +---------------------- | ----- +Aliases | +Required? | false +Position? | named +Default Value | +Accept Pipeline Input? | false + +### <CommonParameters> + +This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see `about_CommonParameters` http://go.microsoft.com/fwlink/p/?LinkID=113216 . + + + +## Links + + * [[Get-ChocolateyWebFile|HelpersGetChocolateyWebFile]] + * [[Get-FtpFile|HelpersGetFtpFile]] + * [[Get-WebHeaders|HelpersGetWebHeaders]] + * [[Get-WebFileName|HelpersGetWebFileName]] + + +[[Function Reference|HelpersReference]] + +***NOTE:*** This documentation has been automatically generated from `Import-Module "$env:ChocolateyInstall\helpers\chocolateyInstaller.psm1" -Force; Get-Help Get-WebFile -Full`. diff --git a/docs/generated/HelpersGetWebFileName.md b/docs/generated/HelpersGetWebFileName.md new file mode 100644 index 0000000000..5a8d5b002f --- /dev/null +++ b/docs/generated/HelpersGetWebFileName.md @@ -0,0 +1,116 @@ +# Get-WebFileName + +Gets the original file name from a url. Used by Get-WebFile to determine +the original file name for a file. + +## Syntax + +~~~powershell +Get-WebFileName ` + [-Url ] ` + -DefaultName ` + [-UserAgent ] ` + [-IgnoredArguments ] [] +~~~ + +## Description + +Uses several techniques to determine the original file name of the file +based on the url for the file. + +## Notes + +Available in 0.9.10+. +Falls back to DefaultName when the name cannot be determined. + +Chocolatey works best when the packages contain the software it is +managing and doesn't require downloads. However most software in the +Windows world requires redistribution rights and when sharing packages +publicly (like on the [community feed](https://chocolatey.org/packages)), maintainers may not have those +aforementioned rights. Chocolatey understands how to work with that, +hence this function. You are not subject to this limitation with +internal packages. + +## Aliases + +None + +## Inputs + +None + +## Outputs + +None + +## Parameters + +### -Url [<String>] +This is the url to a file that will be possibly downloaded. + +Property | Value +---------------------- | ----- +Aliases | +Required? | false +Position? | 1 +Default Value | +Accept Pipeline Input? | false + +### -DefaultName <String> +The name of the file to use when not able to determine the file name +from the url response. + +Property | Value +---------------------- | ----- +Aliases | +Required? | true +Position? | 2 +Default Value | +Accept Pipeline Input? | false + +### -UserAgent [<String>] +The user agent to use as part of the request. Defaults to 'chocolatey +command line'. + +Property | Value +---------------------- | ----------------------- +Aliases | +Required? | false +Position? | named +Default Value | chocolatey command line +Accept Pipeline Input? | false + +### -IgnoredArguments [<Object[]>] +Allows splatting with arguments that do not apply. Do not use directly. + +Property | Value +---------------------- | ----- +Aliases | +Required? | false +Position? | named +Default Value | +Accept Pipeline Input? | false + +### <CommonParameters> + +This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see `about_CommonParameters` http://go.microsoft.com/fwlink/p/?LinkID=113216 . + + +## Examples + + **EXAMPLE 1** + +~~~powershell +Get-WebFileName -Url $url -DefaultName $originalFileName + +~~~ + +## Links + + * [[Get-WebHeaders|HelpersGetWebHeaders]] + * [[Get-ChocolateyWebFile|HelpersGetChocolateyWebFile]] + + +[[Function Reference|HelpersReference]] + +***NOTE:*** This documentation has been automatically generated from `Import-Module "$env:ChocolateyInstall\helpers\chocolateyInstaller.psm1" -Force; Get-Help Get-WebFileName -Full`. diff --git a/docs/generated/HelpersGetWebHeaders.md b/docs/generated/HelpersGetWebHeaders.md new file mode 100644 index 0000000000..e591c99563 --- /dev/null +++ b/docs/generated/HelpersGetWebHeaders.md @@ -0,0 +1,87 @@ +# Get-WebHeaders + +Gets the request/response headers for a url. + +## Syntax + +~~~powershell +Get-WebHeaders ` + [-Url ] ` + [-UserAgent ] ` + [-IgnoredArguments ] [] +~~~ + +## Description + +This is a low-level function that is used by Chocolatey to get the +headers for a request/response to better help when getting and +validating internet resources. + +## Notes + +Not recommended for use in package scripts. + +## Aliases + +None + +## Inputs + +None + +## Outputs + +None + +## Parameters + +### -Url [<String>] +This is the url to get a request/response from. + +Property | Value +---------------------- | ----- +Aliases | +Required? | false +Position? | 1 +Default Value | +Accept Pipeline Input? | false + +### -UserAgent [<String>] +The user agent to use as part of the request. Defaults to 'chocolatey +command line'. + +Property | Value +---------------------- | ----------------------- +Aliases | +Required? | false +Position? | 2 +Default Value | chocolatey command line +Accept Pipeline Input? | false + +### -IgnoredArguments [<Object[]>] +Allows splatting with arguments that do not apply. Do not use directly. + +Property | Value +---------------------- | ----- +Aliases | +Required? | false +Position? | named +Default Value | +Accept Pipeline Input? | false + +### <CommonParameters> + +This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see `about_CommonParameters` http://go.microsoft.com/fwlink/p/?LinkID=113216 . + + + +## Links + + * [[Get-ChocolateyWebFile|HelpersGetChocolateyWebFile]] + * [[Get-WebFileName|HelpersGetWebFileName]] + * [[Get-WebFile|HelpersGetWebFile]] + + +[[Function Reference|HelpersReference]] + +***NOTE:*** This documentation has been automatically generated from `Import-Module "$env:ChocolateyInstall\helpers\chocolateyInstaller.psm1" -Force; Get-Help Get-WebHeaders -Full`. diff --git a/docs/generated/HelpersInstallBinFile.md b/docs/generated/HelpersInstallBinFile.md new file mode 100644 index 0000000000..a7c59f738e --- /dev/null +++ b/docs/generated/HelpersInstallBinFile.md @@ -0,0 +1,128 @@ +# Install-BinFile + +Creates a shim (or batch redirect) for a file that is on the PATH. + +## Syntax + +~~~powershell +Install-BinFile ` + -Name ` + -Path ` + [-UseStart] ` + [-Command ] ` + [-IgnoredArguments ] [] +~~~ + +## Description + +Chocolatey installs have the folder `$($env:ChocolateyInstall)\bin` +included in the PATH environment variable. Chocolatey automatically +shims executables in package folders that are not explicitly ignored, +putting them into the bin folder (and subsequently onto the PATH). + +When you have other files you want to shim to add them to the PATH or +if you want to handle the shimming explicitly, use this function. + +If you do use this function, ensure you also add `Uninstall-BinFile` to +your `chocolateyUninstall.ps1` script as Chocolatey will not +automatically clean up shims created with this function. + +## Notes + +Not normally needed for exe files in the package folder, those are +automatically discovered and added as shims after the install script +completes. + +## Aliases + +None + +## Inputs + +None + +## Outputs + +None + +## Parameters + +### -Name <String> +The name of the redirect file, will have .exe appended to it. + +Property | Value +---------------------- | ----- +Aliases | +Required? | true +Position? | 1 +Default Value | +Accept Pipeline Input? | false + +### -Path <String> +The path to the original file. Can be relative from +`$($env:ChocolateyInstall)\bin` back to your file or a full path to the +file. + +Property | Value +---------------------- | ----- +Aliases | +Required? | true +Position? | 2 +Default Value | +Accept Pipeline Input? | false + +### -UseStart +This should be passed if the shim should not wait on the action to +complete. This is usually the case with GUI apps, you don't want the +command shell blocked waiting for the GUI app to be shut back down. + +Property | Value +---------------------- | ----- +Aliases | isGui +Required? | false +Position? | named +Default Value | False +Accept Pipeline Input? | false + +### -Command [<String>] +OPTIONAL - This is any additional command arguments you want passed +every time to the command. This is not normally used, but may be +necessary if you are calling something and then your application. For +example if you are calling Java with your JAR, the command would be the +JAR file plus any other options to start Java appropriately. + +Property | Value +---------------------- | ----- +Aliases | +Required? | false +Position? | named +Default Value | +Accept Pipeline Input? | false + +### -IgnoredArguments [<Object[]>] +Allows splatting with arguments that do not apply. Do not use directly. + +Property | Value +---------------------- | ----- +Aliases | +Required? | false +Position? | named +Default Value | +Accept Pipeline Input? | false + +### <CommonParameters> + +This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see `about_CommonParameters` http://go.microsoft.com/fwlink/p/?LinkID=113216 . + + + +## Links + + * [[Uninstall-BinFile|HelpersUninstallBinFile]] + * [[Install-ChocolateyShortcut|HelpersInstallChocolateyShortcut]] + * [[Install-ChocolateyPath|HelpersInstallChocolateyPath]] + + +[[Function Reference|HelpersReference]] + +***NOTE:*** This documentation has been automatically generated from `Import-Module "$env:ChocolateyInstall\helpers\chocolateyInstaller.psm1" -Force; Get-Help Install-BinFile -Full`. diff --git a/docs/generated/HelpersInstallChocolateyDesktopLink.md b/docs/generated/HelpersInstallChocolateyDesktopLink.md new file mode 100644 index 0000000000..fa6e903307 --- /dev/null +++ b/docs/generated/HelpersInstallChocolateyDesktopLink.md @@ -0,0 +1,90 @@ +# Install-ChocolateyDesktopLink + +DEPRECATED - This adds a shortcut on the desktop to the specified file path. + +## Syntax + +~~~powershell +Install-ChocolateyDesktopLink ` + -TargetFilePath ` + [-IgnoredArguments ] [] +~~~ + +## Description + +Determines the desktop folder and creates a shortcut to the specified +file path. Will not throw errors if it fails. + +It is recommended you use `Install-ChocolateyShorctut` instead of this +method as this has been deprecated. + +## Notes + +Deprecated in favor of [[`Install-ChocolateyShortcut`|HelpersInstallChocolateyShortcut]]. +If this errors, such as it will if being installed under the local +SYSTEM account, it will display a warning instead of failing a package +installation. + +Will not throw an error if it fails. + +## Aliases + +None + +## Inputs + +None + +## Outputs + +None + +## Parameters + +### -TargetFilePath <String> +This is the location to the application/executable file that you want to +add a shortcut to on the desktop. This is mandatory. + +Property | Value +---------------------- | ----- +Aliases | +Required? | true +Position? | 1 +Default Value | +Accept Pipeline Input? | false + +### -IgnoredArguments [<Object[]>] +Allows splatting with arguments that do not apply. Do not use directly. + +Property | Value +---------------------- | ----- +Aliases | +Required? | false +Position? | named +Default Value | +Accept Pipeline Input? | false + +### <CommonParameters> + +This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see `about_CommonParameters` http://go.microsoft.com/fwlink/p/?LinkID=113216 . + + +## Examples + + **EXAMPLE 1** + +~~~powershell + +# This will create a new Desktop Shortcut pointing at the NHibernate +# Profiler exe. +Install-ChocolateyDesktopLink -TargetFilePath "C:\tools\NHibernatProfiler\nhprof.exe" +~~~ + +## Links + + * [[Install-ChocolateyShortcut|HelpersInstallChocolateyShortcut]] + + +[[Function Reference|HelpersReference]] + +***NOTE:*** This documentation has been automatically generated from `Import-Module "$env:ChocolateyInstall\helpers\chocolateyInstaller.psm1" -Force; Get-Help Install-ChocolateyDesktopLink -Full`. diff --git a/docs/generated/HelpersInstallChocolateyEnvironmentVariable.md b/docs/generated/HelpersInstallChocolateyEnvironmentVariable.md new file mode 100644 index 0000000000..0a66a2ab04 --- /dev/null +++ b/docs/generated/HelpersInstallChocolateyEnvironmentVariable.md @@ -0,0 +1,142 @@ +# Install-ChocolateyEnvironmentVariable + +**NOTE:** Administrative Access Required when `-VariableType 'Machine'.` + +Creates a persistent environment variable. + +## Syntax + +~~~powershell +Install-ChocolateyEnvironmentVariable ` + [-VariableName ] ` + [-VariableValue ] ` + [-VariableType {Process | User | Machine}] ` + [-IgnoredArguments ] [] +~~~ + +## Description + +Install-ChocolateyEnvironmentVariable creates an environment variable +with the specified name and value. The variable is persistent and +will remain after reboots and across multiple PowerShell and command +line sessions. The variable can be scoped either to the User or to +the Machine. If Machine level scoping is specified, the command is +elevated to an administrative session. + +## Notes + +This command will assert UAC/Admin privileges on the machine when +`-VariableType Machine`. + +This will add the environment variable to the current session. + +## Aliases + +None + +## Inputs + +None + +## Outputs + +None + +## Parameters + +### -VariableName [<String>] +The name or key of the environment variable + +Property | Value +---------------------- | ----- +Aliases | +Required? | false +Position? | 1 +Default Value | +Accept Pipeline Input? | false + +### -VariableValue [<String>] +A string value assigned to the above name. + +Property | Value +---------------------- | ----- +Aliases | +Required? | false +Position? | 2 +Default Value | +Accept Pipeline Input? | false + +### -VariableType +Specifies whether this variable is to be accesible at either the +individual user level or at the Machine level. + + +Valid options: Process, User, Machine + +Property | Value +---------------------- | ----- +Aliases | +Required? | false +Position? | 3 +Default Value | User +Accept Pipeline Input? | false + +### -IgnoredArguments [<Object[]>] +Allows splatting with arguments that do not apply. Do not use directly. + +Property | Value +---------------------- | ----- +Aliases | +Required? | false +Position? | named +Default Value | +Accept Pipeline Input? | false + +### <CommonParameters> + +This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see `about_CommonParameters` http://go.microsoft.com/fwlink/p/?LinkID=113216 . + + +## Examples + + **EXAMPLE 1** + +~~~powershell + +# Creates a User environment variable "JAVA_HOME" pointing to +# "d:\oracle\jdk\bin". +Install-ChocolateyEnvironmentVariable "JAVA_HOME" "d:\oracle\jdk\bin" +~~~ + +**EXAMPLE 2** + +~~~powershell + +# Creates a User environment variable "_NT_SYMBOL_PATH" pointing to +# "symsrv*symsrv.dll*f:\localsymbols*http://msdl.microsoft.com/download/symbols". +# The command will be elevated to admin priviledges. +Install-ChocolateyEnvironmentVariable ` + -VariableName "_NT_SYMBOL_PATH" ` + -VariableValue "symsrv*symsrv.dll*f:\localsymbols*http://msdl.microsoft.com/download/symbols" ` + -VariableType Machine +~~~ + +**EXAMPLE 3** + +~~~powershell + +# Remove an environment variable +Install-ChocolateyEnvironmentVariable -VariableName 'bob' -VariableValue $null +~~~ + +## Links + + * [[Uninstall-ChocolateyEnvironmentVariable|HelpersUninstallChocolateyEnvironmentVariable]] + * [[Get-EnvironmentVariable|HelpersGetEnvironmentVariable]] + * [[Set-EnvironmentVariable|HelpersSetEnvironmentVariable]] + * [[Install-ChocolateyPath|HelpersInstallChocolateyPath]] + + +[[Function Reference|HelpersReference]] + +***NOTE:*** This documentation has been automatically generated from `Import-Module "$env:ChocolateyInstall\helpers\chocolateyInstaller.psm1" -Force; Get-Help Install-ChocolateyEnvironmentVariable -Full`. diff --git a/docs/generated/HelpersInstallChocolateyExplorerMenuItem.md b/docs/generated/HelpersInstallChocolateyExplorerMenuItem.md new file mode 100644 index 0000000000..08b66341f1 --- /dev/null +++ b/docs/generated/HelpersInstallChocolateyExplorerMenuItem.md @@ -0,0 +1,145 @@ +# Install-ChocolateyExplorerMenuItem + +**NOTE:** Administrative Access Required. + +Creates a windows explorer context menu item that can be associated with +a command + +## Syntax + +~~~powershell +Install-ChocolateyExplorerMenuItem ` + -MenuKey ` + [-MenuLabel ] ` + [-Command ] ` + [-Type ] ` + [-IgnoredArguments ] [] +~~~ + +## Description + +Install-ChocolateyExplorerMenuItem can add an entry in the context menu +of Windows Explorer. The menu item is given a text label and a command. +The command can be any command accepted on the windows command line. The +menu item can be applied to either folder items or file items. + +Because this command accesses and edits the root class registry node, it +will be elevated to admin. + +## Notes + +This command will assert UAC/Admin privileges on the machine. + +Chocolatey will automatically add the path of the file or folder clicked +to the command. This is done simply by appending a %1 to the end of the +command. + +## Aliases + +None + +## Inputs + +None + +## Outputs + +None + +## Parameters + +### -MenuKey <String> +A unique string to identify this menu item in the registry + +Property | Value +---------------------- | ----- +Aliases | +Required? | true +Position? | 1 +Default Value | +Accept Pipeline Input? | false + +### -MenuLabel [<String>] +The string that will be displayed in the context menu + +Property | Value +---------------------- | ----- +Aliases | +Required? | false +Position? | 2 +Default Value | +Accept Pipeline Input? | false + +### -Command [<String>] +A command line command that will be invoked when the menu item is +selected + +Property | Value +---------------------- | ----- +Aliases | +Required? | false +Position? | 3 +Default Value | +Accept Pipeline Input? | false + +### -Type [<String>] +Specifies if the menu item should be applied to a folder or a file + +Property | Value +---------------------- | ----- +Aliases | +Required? | false +Position? | 4 +Default Value | file +Accept Pipeline Input? | false + +### -IgnoredArguments [<Object[]>] +Allows splatting with arguments that do not apply. Do not use directly. + +Property | Value +---------------------- | ----- +Aliases | +Required? | false +Position? | named +Default Value | +Accept Pipeline Input? | false + +### <CommonParameters> + +This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see `about_CommonParameters` http://go.microsoft.com/fwlink/p/?LinkID=113216 . + + +## Examples + + **EXAMPLE 1** + +~~~powershell + +# This will create a context menu item in Windows Explorer when any file +# is right clicked. The menu item will appear with the text "Open with +# Sublime Text 2" and will invoke sublime text 2 when selected. +$sublimeDir = (Get-ChildItem $env:ALLUSERSPROFILE\chocolatey\lib\sublimetext* | select $_.last) +$sublimeExe = "$sublimeDir\tools\sublime_text.exe" +Install-ChocolateyExplorerMenuItem "sublime" "Open with Sublime Text 2" $sublimeExe +~~~ + +**EXAMPLE 2** + +~~~powershell + +# This will create a context menu item in Windows Explorer when any +# folder is right clicked. The menu item will appear with the text +# "Open with Sublime Text 2" and will invoke sublime text 2 when selected. +$sublimeDir = (Get-ChildItem $env:ALLUSERSPROFILE\chocolatey\lib\sublimetext* | select $_.last) +$sublimeExe = "$sublimeDir\tools\sublime_text.exe" +Install-ChocolateyExplorerMenuItem "sublime" "Open with Sublime Text 2" $sublimeExe "directory" +~~~ + +## Links + + * [[Install-ChocolateyShortcut|HelpersInstallChocolateyShortcut]] + + +[[Function Reference|HelpersReference]] + +***NOTE:*** This documentation has been automatically generated from `Import-Module "$env:ChocolateyInstall\helpers\chocolateyInstaller.psm1" -Force; Get-Help Install-ChocolateyExplorerMenuItem -Full`. diff --git a/docs/generated/HelpersInstallChocolateyFileAssociation.md b/docs/generated/HelpersInstallChocolateyFileAssociation.md new file mode 100644 index 0000000000..49f4e6da75 --- /dev/null +++ b/docs/generated/HelpersInstallChocolateyFileAssociation.md @@ -0,0 +1,95 @@ +# Install-ChocolateyFileAssociation + +**NOTE:** Administrative Access Required. + +Creates an association between a file extension and a executable. + +## Syntax + +~~~powershell +Install-ChocolateyFileAssociation ` + -Extension ` + -Executable ` + [-IgnoredArguments ] [] +~~~ + +## Description + +Install-ChocolateyFileAssociation can associate a file extension +with a downloaded application. Once this command has created an +association, all invocations of files with the specified extension +will be opened via the executable specified. + +## Notes + +This command will assert UAC/Admin privileges on the machine. + +## Aliases + +None + +## Inputs + +None + +## Outputs + +None + +## Parameters + +### -Extension <String> +The file extension to be associated. + +Property | Value +---------------------- | ----- +Aliases | +Required? | true +Position? | 1 +Default Value | +Accept Pipeline Input? | false + +### -Executable <String> +The path to the application's executable to be associated. + +Property | Value +---------------------- | ----- +Aliases | +Required? | true +Position? | 2 +Default Value | +Accept Pipeline Input? | false + +### -IgnoredArguments [<Object[]>] +Allows splatting with arguments that do not apply. Do not use directly. + +Property | Value +---------------------- | ----- +Aliases | +Required? | false +Position? | named +Default Value | +Accept Pipeline Input? | false + +### <CommonParameters> + +This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see `about_CommonParameters` http://go.microsoft.com/fwlink/p/?LinkID=113216 . + + +## Examples + + **EXAMPLE 1** + +~~~powershell + +# This will create an association between Sublime Text 2 and all .txt +# files. Any .txt file opened will by default open with Sublime Text 2. +$sublimeDir = (Get-ChildItem $env:ALLUSERSPROFILE\chocolatey\lib\sublimetext* | select $_.last) +$sublimeExe = "$sublimeDir\tools\sublime_text.exe" +Install-ChocolateyFileAssociation ".txt" $sublimeExe +~~~ + + +[[Function Reference|HelpersReference]] + +***NOTE:*** This documentation has been automatically generated from `Import-Module "$env:ChocolateyInstall\helpers\chocolateyInstaller.psm1" -Force; Get-Help Install-ChocolateyFileAssociation -Full`. diff --git a/docs/generated/HelpersInstallChocolateyInstallPackage.md b/docs/generated/HelpersInstallChocolateyInstallPackage.md new file mode 100644 index 0000000000..e6005987c6 --- /dev/null +++ b/docs/generated/HelpersInstallChocolateyInstallPackage.md @@ -0,0 +1,223 @@ +# Install-ChocolateyInstallPackage + +**NOTE:** Administrative Access Required. + +Installs software into "Programs and Features". Use +Install-ChocolateyPackage when software must be downloaded first. + +## Syntax + +~~~powershell +Install-ChocolateyInstallPackage ` + -PackageName ` + [-FileType ] ` + [-SilentArgs ] ` + -File ` + [-ValidExitCodes ] ` + [-UseOnlyPackageSilentArguments] ` + [-IgnoredArguments ] [] +~~~ + +## Description + +This will run an installer (local file) on your machine. + +## Notes + +This command will assert UAC/Admin privileges on the machine. + +If you are embedding files into a package, ensure that you have the +rights to redistribute those files if you are sharing this package +publicly (like on the [community feed](https://chocolatey.org/packages)). Otherwise, please use +Install-ChocolateyPackage to download those resources from their +official distribution points. + +This is a native installer wrapper function. A "true" package will +contain all the run time files and not an installer. That could come +pre-zipped and require unzipping in a PowerShell script. Chocolatey +works best when the packages contain the software it is managing. Most +software in the Windows world comes as installers and Chocolatey +understands how to work with that, hence this wrapper function. + +## Aliases + +None + +## Inputs + +None + +## Outputs + +None + +## Parameters + +### -PackageName <String> +The name of the package - while this is an arbitrary value, it's +recommended that it matches the package id. + +Property | Value +---------------------- | ----- +Aliases | +Required? | true +Position? | 1 +Default Value | +Accept Pipeline Input? | false + +### -FileType [<String>] +This is the extension of the file. This can be 'exe', 'msi', or 'msu'. +[Licensed editions](https://chocolatey.org/compare) of Chocolatey use this to automatically determine +silent arguments. If this is not provided, Chocolatey will +automatically determine this using the downloaded file's extension. + +Property | Value +---------------------- | -------------------------- +Aliases | installerType, installType +Required? | false +Position? | 2 +Default Value | exe +Accept Pipeline Input? | false + +### -SilentArgs [<String>] +OPTIONAL - These are the parameters to pass to the native installer, +including any arguments to make the installer silent/unattended. +Pro/Business Editions of Chocolatey will automatically determine the +installer type and merge the arguments with what is provided here. + +Try any of the to get the silent installer - +`/s /S /q /Q /quiet /silent /SILENT /VERYSILENT`. With msi it is always +`/quiet`. Please pass it in still but it will be overridden by +Chocolatey to `/quiet`. If you don't pass anything it could invoke the +installer with out any arguments. That means a nonsilent installer. + +Please include the `notSilent` tag in your Chocolatey package if you +are not setting up a silent/unattended package. Please note that if you +are submitting to the [community repository](https://chocolatey.org/packages), it is nearly a requirement +for the package to be completely unattended. + +Property | Value +---------------------- | ----- +Aliases | +Required? | false +Position? | 3 +Default Value | +Accept Pipeline Input? | false + +### -File <String> +Full file path to native installer to run. If embedding in the package, +you can get it to the path with +`"$(Split-Path -parent $MyInvocation.MyCommand.Definition)\\INSTALLER_FILE"` + +Property | Value +---------------------- | ----- +Aliases | +Required? | true +Position? | 4 +Default Value | +Accept Pipeline Input? | false + +### -ValidExitCodes [<Object>] +Array of exit codes indicating success. Defaults to `@(0)`. + +Property | Value +---------------------- | ----- +Aliases | +Required? | false +Position? | named +Default Value | @(0) +Accept Pipeline Input? | false + +### -UseOnlyPackageSilentArguments +Do not allow choco to provide/merge additional silent arguments and +only use the ones available with the package. Available in 0.9.10+. + +Property | Value +---------------------- | ------------------------ +Aliases | useOnlyPackageSilentArgs +Required? | false +Position? | named +Default Value | False +Accept Pipeline Input? | false + +### -IgnoredArguments [<Object[]>] +Allows splatting with arguments that do not apply. Do not use directly. + +Property | Value +---------------------- | ----- +Aliases | +Required? | false +Position? | named +Default Value | +Accept Pipeline Input? | false + +### <CommonParameters> + +This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see `about_CommonParameters` http://go.microsoft.com/fwlink/p/?LinkID=113216 . + + +## Examples + + **EXAMPLE 1** + +~~~powershell + +$packageName= 'bob' +$toolsDir = "$(Split-Path -Parent $MyInvocation.MyCommand.Definition)" +$fileLocation = Join-Path $toolsDir 'INSTALLER_EMBEDDED_IN_PACKAGE' + +$packageArgs = @{ + packageName = $packageName + fileType = 'msi' + file = $fileLocation + silentArgs = "/qn /norestart" + validExitCodes= @(0, 3010, 1641) + softwareName = 'Bob*' +} + +Install-ChocolateyInstallPackage @packageArgs +~~~ + +**EXAMPLE 2** + +~~~powershell + +$packageArgs = @{ + packageName = 'bob' + fileType = 'exe' + file = '\\SHARE_LOCATION\to\INSTALLER_FILE' + silentArgs = "/S" + validExitCodes= @(0) + softwareName = 'Bob*' +} + +Install-ChocolateyInstallPackage @packageArgs +~~~ + +**EXAMPLE 3** + +~~~powershell +Install-ChocolateyInstallPackage 'bob' 'exe' '/S' "$(Split-Path -Parent $MyInvocation.MyCommand.Definition)\bob.exe" + +~~~ + +**EXAMPLE 4** + +~~~powershell + +Install-ChocolateyInstallPackage -PackageName 'bob' -FileType 'exe' ` + -SilentArgs '/S' ` + -File "$(Split-Path -Parent $MyInvocation.MyCommand.Definition)\bob.exe" ` + -ValidExitCodes = @(0) +~~~ + +## Links + + * [[Install-ChocolateyPackage|HelpersInstallChocolateyPackage]] + * [[Uninstall-ChocolateyPackage|HelpersUninstallChocolateyPackage]] + * [[Start-ChocolateyProcessAsAdmin|HelpersStartChocolateyProcessAsAdmin]] + + +[[Function Reference|HelpersReference]] + +***NOTE:*** This documentation has been automatically generated from `Import-Module "$env:ChocolateyInstall\helpers\chocolateyInstaller.psm1" -Force; Get-Help Install-ChocolateyInstallPackage -Full`. diff --git a/docs/generated/HelpersInstallChocolateyPackage.md b/docs/generated/HelpersInstallChocolateyPackage.md new file mode 100644 index 0000000000..11b8df799b --- /dev/null +++ b/docs/generated/HelpersInstallChocolateyPackage.md @@ -0,0 +1,356 @@ +# Install-ChocolateyPackage + +**NOTE:** Administrative Access Required. + +Installs software into "Programs and Features" based on a remote file +download. Use Install-ChocolateyInstallPackage when local or embedded +file. + +## Syntax + +~~~powershell +Install-ChocolateyPackage ` + -PackageName ` + [-FileType ] ` + [-SilentArgs ] ` + [-Url ] ` + [-Url64bit ] ` + [-ValidExitCodes ] ` + [-Checksum ] ` + [-ChecksumType ] ` + [-Checksum64 ] ` + [-ChecksumType64 ] ` + [-Options ] ` + [-UseOnlyPackageSilentArguments] ` + [-IgnoredArguments ] [] +~~~ + +## Description + +This will download a native installer from a url and install it on your +machine. Has error handling built in. + +If you are embedding the file(s) directly in the package (or do not need +to download a file first), use Install-ChocolateyInstallPackage instead. + +## Notes + +This command will assert UAC/Admin privileges on the machine. + +This is a native installer wrapper function. A "true" package will +contain all the run time files and not an installer. That could come +pre-zipped and require unzipping in a PowerShell script. Chocolatey +works best when the packages contain the software it is managing. Most +software in the Windows world comes as installers and Chocolatey +understands how to work with that, hence this wrapper function. + +Chocolatey works best when the packages contain the software it is +managing and doesn't require downloads. However most software in the +Windows world requires redistribution rights and when sharing packages +publicly (like on the [community feed](https://chocolatey.org/packages)), maintainers may not have those +aforementioned rights. Chocolatey understands how to work with that, +hence this function. You are not subject to this limitation with +internal packages. + +## Aliases + +None + +## Inputs + +None + +## Outputs + +None + +## Parameters + +### -PackageName <String> +The name of the package - while this is an arbitrary value, it's +recommended that it matches the package id. + +Property | Value +---------------------- | ----- +Aliases | +Required? | true +Position? | 1 +Default Value | +Accept Pipeline Input? | false + +### -FileType [<String>] +This is the extension of the file. This can be 'exe', 'msi', or 'msu'. +[Licensed editions](https://chocolatey.org/compare) of Chocolatey use this to automatically determine +silent arguments. If this is not provided, Chocolatey will +automatically determine this using the downloaded file's extension. + +Property | Value +---------------------- | -------------------------- +Aliases | installerType, installType +Required? | false +Position? | 2 +Default Value | exe +Accept Pipeline Input? | false + +### -SilentArgs [<String>] +OPTIONAL - These are the parameters to pass to the native installer, +including any arguments to make the installer silent/unattended. +[Licensed editions](https://chocolatey.org/compare) of Chocolatey will automatically determine the +installer type and merge the arguments with what is provided here. + +Try any of the to get the silent (unattended) installer - +`/s /S /q /Q /quiet /silent /SILENT /VERYSILENT`. With msi it is always +`/quiet`. Please pass it in still but it will be overridden by +Chocolatey to `/quiet`. If you don't pass anything it could invoke the +installer with out any arguments. That means a nonsilent installer. + +Please include the `notSilent` tag in your Chocolatey package if you +are not setting up a silent/unattended package. Please note that if you +are submitting to the [community repository](https://chocolatey.org/packages), it is nearly a requirement +for the package to be completely unattended. + +Property | Value +---------------------- | ----- +Aliases | +Required? | false +Position? | 3 +Default Value | +Accept Pipeline Input? | false + +### -Url [<String>] +This is the 32 bit url to download the resource from. This resource can +be used on 64 bit systems when a package has both a Url and Url64bit +specified if a user passes `--forceX86`. If there is only a 64 bit url +available, please remove do not use the paramter (only use Url64bit). +Will fail on 32bit systems if missing or if a user attempts to force +a 32 bit installation on a 64 bit system. + +Prefer HTTPS when available. Can be HTTP, FTP, or File URIs. + +Property | Value +---------------------- | ----- +Aliases | +Required? | false +Position? | 4 +Default Value | +Accept Pipeline Input? | false + +### -Url64bit [<String>] +OPTIONAL - If there is a 64 bit resource available, use this +parameter. Chocolatey will automatically determine if the user is +running a 64 bit OS or not and adjust accordingly. Please note that +the 32 bit url will be used in the absence of this. This parameter +should only be used for 64 bit native software. If the original Url +contains both (which is quite rare), set this to '$url' Otherwise remove +this parameter. + +Prefer HTTPS when available. Can be HTTP, FTP, or File URIs. + +Property | Value +---------------------- | ----- +Aliases | url64 +Required? | false +Position? | 5 +Default Value | +Accept Pipeline Input? | false + +### -ValidExitCodes [<Object>] +Array of exit codes indicating success. Defaults to `@(0)`. + +Property | Value +---------------------- | ----- +Aliases | +Required? | false +Position? | named +Default Value | @(0) +Accept Pipeline Input? | false + +### -Checksum [<String>] +OPTIONAL (Highly recommended) - The checksum hash value of the Url +resource. This allows a checksum to be validated for files that are not +local. The checksum type is covered by ChecksumType. + +Property | Value +---------------------- | ----- +Aliases | +Required? | false +Position? | named +Default Value | +Accept Pipeline Input? | false + +### -ChecksumType [<String>] +OPTIONAL - The type of checkum that the file is validated with - valid +values are 'md5', 'sha1', 'sha256' or 'sha512' - defaults to 'md5'. + +MD5 is not recommended as certain organizations need to use FIPS +compliant algorithms for hashing - see +https://support.microsoft.com/en-us/kb/811833 for more details. + +Property | Value +---------------------- | ----- +Aliases | +Required? | false +Position? | named +Default Value | +Accept Pipeline Input? | false + +### -Checksum64 [<String>] +OPTIONAL (Highly recommended) - The checksum hash value of the Url64bit +resource. This allows a checksum to be validated for files that are not +local. The checksum type is covered by ChecksumType64. + +Property | Value +---------------------- | ----- +Aliases | +Required? | false +Position? | named +Default Value | +Accept Pipeline Input? | false + +### -ChecksumType64 [<String>] +OPTIONAL - The type of checkum that the file is validated with - valid +values are 'md5', 'sha1', 'sha256' or 'sha512' - defaults to +ChecksumType parameter value. + +MD5 is not recommended as certain organizations need to use FIPS +compliant algorithms for hashing - see +https://support.microsoft.com/en-us/kb/811833 for more details. + +Property | Value +---------------------- | ----- +Aliases | +Required? | false +Position? | named +Default Value | +Accept Pipeline Input? | false + +### -Options [<Hashtable>] +OPTIONAL - Specify custom headers. Available in 0.9.10+. + +Property | Value +---------------------- | -------------- +Aliases | +Required? | false +Position? | named +Default Value | @{Headers=@{}} +Accept Pipeline Input? | false + +### -UseOnlyPackageSilentArguments +Do not allow choco to provide/merge additional silent arguments and only +use the ones available with the package. Available in 0.9.10+. + +Property | Value +---------------------- | ------------------------ +Aliases | useOnlyPackageSilentArgs +Required? | false +Position? | named +Default Value | False +Accept Pipeline Input? | false + +### -IgnoredArguments [<Object[]>] +Allows splatting with arguments that do not apply. Do not use directly. + +Property | Value +---------------------- | ----- +Aliases | +Required? | false +Position? | named +Default Value | +Accept Pipeline Input? | false + +### <CommonParameters> + +This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see `about_CommonParameters` http://go.microsoft.com/fwlink/p/?LinkID=113216 . + + +## Examples + + **EXAMPLE 1** + +~~~powershell + +$packageName= 'bob' +$toolsDir = "$(Split-Path -Parent $MyInvocation.MyCommand.Definition)" +$url = 'https://somewhere.com/file.msi' +$url64 = 'https://somewhere.com/file-x64.msi' + +$packageArgs = @{ + packageName = $packageName + fileType = 'msi' + url = $url + url64bit = $url64 + silentArgs = "/qn /norestart" + validExitCodes= @(0, 3010, 1641) + softwareName = 'Bob*' + checksum = '12345' + checksumType = 'sha1' + checksum64 = '123356' + checksumType64= 'sha256' +} + +Install-ChocolateyPackage @packageArgs +~~~ + +**EXAMPLE 2** + +~~~powershell + +Install-ChocolateyPackage 'StExBar' 'msi' '/quiet' ` + 'http://stexbar.googlecode.com/files/StExBar-1.8.3.msi' ` + 'http://stexbar.googlecode.com/files/StExBar64-1.8.3.msi' +~~~ + +**EXAMPLE 3** + +~~~powershell + +Install-ChocolateyPackage 'mono' 'exe' '/SILENT' ` + 'http://somehwere/something.exe' -ValidExitCodes @(0,21) +~~~ + +**EXAMPLE 4** + +~~~powershell + +Install-ChocolateyPackage 'ruby.devkit' 'exe' '/SILENT' ` + 'http://cdn.rubyinstaller.org/archives/devkits/DevKit-mingw64-32-4.7.2-20130224-1151-sfx.exe' ` + 'http://cdn.rubyinstaller.org/archives/devkits/DevKit-mingw64-64-4.7.2-20130224-1432-sfx.exe' ` + -checksum '9383f12958aafc425923e322460a84de' -checksumType = 'md5' ` + -checksum64 'ce99d873c1acc8bffc639bd4e764b849' +~~~ + +**EXAMPLE 5** + +~~~powershell +Install-ChocolateyPackage 'bob' 'exe' '/S' 'https://somewhere/bob.exe' 'https://somewhere/bob-x64.exe' + +~~~ + +**EXAMPLE 6** + +~~~powershell + +$options = +@{ + Headers = @{ + Accept = 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8'; + 'Accept-Charset' = 'ISO-8859-1,utf-8;q=0.7,*;q=0.3'; + 'Accept-Language' = 'en-GB,en-US;q=0.8,en;q=0.6'; + Cookie = 'requiredinfo=info'; + Referer = 'https://somelocation.com/'; + } +} + +Install-ChocolateyPackage -PackageName 'package' -FileType 'exe' -SilentArgs '/S' 'https://somelocation.com/thefile.exe' -Options $options +~~~ + +## Links + + * [[Get-ChocolateyWebFile|HelpersGetChocolateyWebFile]] + * [[Install-ChocolateyInstallPackage|HelpersInstallChocolateyInstallPackage]] + * [[Install-ChocolateyZipPackage|HelpersInstallChocolateyZipPackage]] + + +[[Function Reference|HelpersReference]] + +***NOTE:*** This documentation has been automatically generated from `Import-Module "$env:ChocolateyInstall\helpers\chocolateyInstaller.psm1" -Force; Get-Help Install-ChocolateyPackage -Full`. diff --git a/docs/generated/HelpersInstallChocolateyPath.md b/docs/generated/HelpersInstallChocolateyPath.md new file mode 100644 index 0000000000..99302978e7 --- /dev/null +++ b/docs/generated/HelpersInstallChocolateyPath.md @@ -0,0 +1,111 @@ +# Install-ChocolateyPath + +**NOTE:** Administrative Access Required when `-PathType 'Machine'.` + +This puts a directory to the PATH environment variable. + +## Syntax + +~~~powershell +Install-ChocolateyPath ` + -PathToInstall ` + [-PathType {Process | User | Machine}] ` + [-IgnoredArguments ] [] +~~~ + +## Description + +Looks at both PATH environment variables to ensure a path variable +correctly shows up on the right PATH. + +## Notes + +This command will assert UAC/Admin privileges on the machine if +`-PathType 'Machine'`. + +This is used when the application/tool is not being linked by Chocolatey +(not in the lib folder). + +## Aliases + +None + +## Inputs + +None + +## Outputs + +None + +## Parameters + +### -PathToInstall <String> +The full path to a location to add / ensure is in the PATH. + +Property | Value +---------------------- | ----- +Aliases | +Required? | true +Position? | 1 +Default Value | +Accept Pipeline Input? | false + +### -PathType +Which PATH to add it to. If specifying `Machine`, this requires admin +privileges to run correctly. + + +Valid options: Process, User, Machine + +Property | Value +---------------------- | ----- +Aliases | +Required? | false +Position? | 2 +Default Value | User +Accept Pipeline Input? | false + +### -IgnoredArguments [<Object[]>] +Allows splatting with arguments that do not apply. Do not use directly. + +Property | Value +---------------------- | ----- +Aliases | +Required? | false +Position? | named +Default Value | +Accept Pipeline Input? | false + +### <CommonParameters> + +This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see `about_CommonParameters` http://go.microsoft.com/fwlink/p/?LinkID=113216 . + + +## Examples + + **EXAMPLE 1** + +~~~powershell +Install-ChocolateyPath -PathToInstall "$($env:SystemDrive)\tools\gittfs" + +~~~ + +**EXAMPLE 2** + +~~~powershell +Install-ChocolateyPath "$($env:SystemDrive)\Program Files\MySQL\MySQL Server 5.5\bin" -PathType 'Machine' + +~~~ + +## Links + + * [[Install-ChocolateyEnvironmentVariable|HelpersInstallChocolateyEnvironmentVariable]] + * [[Get-EnvironmentVariable|HelpersGetEnvironmentVariable]] + * [[Set-EnvironmentVariable|HelpersSetEnvironmentVariable]] + * [[Get-ToolsLocation|HelpersGetToolsLocation]] + + +[[Function Reference|HelpersReference]] + +***NOTE:*** This documentation has been automatically generated from `Import-Module "$env:ChocolateyInstall\helpers\chocolateyInstaller.psm1" -Force; Get-Help Install-ChocolateyPath -Full`. diff --git a/docs/generated/HelpersInstallChocolateyPinnedTaskBarItem.md b/docs/generated/HelpersInstallChocolateyPinnedTaskBarItem.md new file mode 100644 index 0000000000..e33ae773e4 --- /dev/null +++ b/docs/generated/HelpersInstallChocolateyPinnedTaskBarItem.md @@ -0,0 +1,79 @@ +# Install-ChocolateyPinnedTaskBarItem + +Creates an item in the task bar linking to the provided path. + +## Syntax + +~~~powershell +Install-ChocolateyPinnedTaskBarItem ` + -TargetFilePath ` + [-IgnoredArguments ] [] +~~~ + + +## Notes + +Does not work with SYSTEM, but does not error. It warns with the error +message. + +## Aliases + +None + +## Inputs + +None + +## Outputs + +None + +## Parameters + +### -TargetFilePath <String> +The path to the application that should be launched when clicking on the +task bar icon. + +Property | Value +---------------------- | ----- +Aliases | +Required? | true +Position? | 1 +Default Value | +Accept Pipeline Input? | false + +### -IgnoredArguments [<Object[]>] +Allows splatting with arguments that do not apply. Do not use directly. + +Property | Value +---------------------- | ----- +Aliases | +Required? | false +Position? | named +Default Value | +Accept Pipeline Input? | false + +### <CommonParameters> + +This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see `about_CommonParameters` http://go.microsoft.com/fwlink/p/?LinkID=113216 . + + +## Examples + + **EXAMPLE 1** + +~~~powershell + +# This will create a Visual Studio task bar icon. +Install-ChocolateyPinnedTaskBarItem -TargetFilePath "${env:ProgramFiles(x86)}\Microsoft Visual Studio 11.0\Common7\IDE\devenv.exe" +~~~ + +## Links + + * [[Install-ChocolateyShortcut|HelpersInstallChocolateyShortcut]] + * [[Install-ChocolateyExplorerMenuItem|HelpersInstallChocolateyExplorerMenuItem]] + + +[[Function Reference|HelpersReference]] + +***NOTE:*** This documentation has been automatically generated from `Import-Module "$env:ChocolateyInstall\helpers\chocolateyInstaller.psm1" -Force; Get-Help Install-ChocolateyPinnedTaskBarItem -Full`. diff --git a/docs/generated/HelpersInstallChocolateyPowershellCommand.md b/docs/generated/HelpersInstallChocolateyPowershellCommand.md new file mode 100644 index 0000000000..a7136bb38b --- /dev/null +++ b/docs/generated/HelpersInstallChocolateyPowershellCommand.md @@ -0,0 +1,246 @@ +# Install-ChocolateyPowershellCommand + +Installs a PowerShell Script as a command + +## Syntax + +~~~powershell +Install-ChocolateyPowershellCommand ` + [-PackageName ] ` + -PsFileFullPath ` + [-Url ] ` + [-Url64bit ] ` + [-Checksum ] ` + [-ChecksumType ] ` + [-Checksum64 ] ` + [-ChecksumType64 ] ` + [-Options ] ` + [-IgnoredArguments ] [] +~~~ + +## Description + +This will install a PowerShell script as a command on your system. Like +an executable can be run from a batch redirect, this will do the same, +calling PowerShell with this command and passing your arguments to it. +If you include a url, it will first download the PowerShell file. + +## Notes + +Chocolatey works best when the packages contain the software it is +managing and doesn't require downloads. However most software in the +Windows world requires redistribution rights and when sharing packages +publicly (like on the [community feed](https://chocolatey.org/packages)), maintainers may not have those +aforementioned rights. Chocolatey understands how to work with that, +hence this function. You are not subject to this limitation with +internal packages. + +## Aliases + +None + +## Inputs + +None + +## Outputs + +None + +## Parameters + +### -PackageName [<String>] +The name of the package - while this is an arbitrary value, it's +recommended that it matches the package id. + +Property | Value +---------------------- | ----- +Aliases | +Required? | false +Position? | 1 +Default Value | +Accept Pipeline Input? | false + +### -PsFileFullPath <String> +Full file path to PowerShell file to turn into a command. If embedding +it in the package next to the install script, the path will be like +`"$(Split-Path -parent $MyInvocation.MyCommand.Definition)\\Script.ps1"` + +Property | Value +---------------------- | ----- +Aliases | +Required? | true +Position? | 2 +Default Value | +Accept Pipeline Input? | false + +### -Url [<String>] +This is the 32 bit url to download the resource from. This resource can +be used on 64 bit systems when a package has both a Url and Url64bit +specified if a user passes `--forceX86`. If there is only a 64 bit url +available, please remove do not use the paramter (only use Url64bit). +Will fail on 32bit systems if missing or if a user attempts to force +a 32 bit installation on a 64 bit system. + +Prefer HTTPS when available. Can be HTTP, FTP, or File URIs. + +Property | Value +---------------------- | ----- +Aliases | +Required? | false +Position? | 3 +Default Value | +Accept Pipeline Input? | false + +### -Url64bit [<String>] +OPTIONAL - If there is a 64 bit resource available, use this +parameter. Chocolatey will automatically determine if the user is +running a 64 bit OS or not and adjust accordingly. Please note that +the 32 bit url will be used in the absence of this. This parameter +should only be used for 64 bit native software. If the original Url +contains both (which is quite rare), set this to '$url' Otherwise remove +this parameter. + +Prefer HTTPS when available. Can be HTTP, FTP, or File URIs. + +Property | Value +---------------------- | ----- +Aliases | url64 +Required? | false +Position? | 4 +Default Value | +Accept Pipeline Input? | false + +### -Checksum [<String>] +OPTIONAL (Highly recommended) - The checksum hash value of the Url +resource. This allows a checksum to be validated for files that are not +local. The checksum type is covered by ChecksumType. + +Property | Value +---------------------- | ----- +Aliases | +Required? | false +Position? | named +Default Value | +Accept Pipeline Input? | false + +### -ChecksumType [<String>] +OPTIONAL - The type of checkum that the file is validated with - valid +values are 'md5', 'sha1', 'sha256' or 'sha512' - defaults to 'md5'. + +MD5 is not recommended as certain organizations need to use FIPS +compliant algorithms for hashing - see +https://support.microsoft.com/en-us/kb/811833 for more details. + +Property | Value +---------------------- | ----- +Aliases | +Required? | false +Position? | named +Default Value | +Accept Pipeline Input? | false + +### -Checksum64 [<String>] +OPTIONAL (Highly recommended) - The checksum hash value of the Url64bit +resource. This allows a checksum to be validated for files that are not +local. The checksum type is covered by ChecksumType64. + +Property | Value +---------------------- | ----- +Aliases | +Required? | false +Position? | named +Default Value | +Accept Pipeline Input? | false + +### -ChecksumType64 [<String>] +OPTIONAL - The type of checkum that the file is validated with - valid +values are 'md5', 'sha1', 'sha256' or 'sha512' - defaults to +ChecksumType parameter value. + +MD5 is not recommended as certain organizations need to use FIPS +compliant algorithms for hashing - see +https://support.microsoft.com/en-us/kb/811833 for more details. + +Property | Value +---------------------- | ----- +Aliases | +Required? | false +Position? | named +Default Value | +Accept Pipeline Input? | false + +### -Options [<Hashtable>] +OPTIONAL - Specify custom headers. Available in 0.9.10+. + +Property | Value +---------------------- | -------------- +Aliases | +Required? | false +Position? | named +Default Value | @{Headers=@{}} +Accept Pipeline Input? | false + +### -IgnoredArguments [<Object[]>] +Allows splatting with arguments that do not apply. Do not use directly. + +Property | Value +---------------------- | ----- +Aliases | +Required? | false +Position? | named +Default Value | +Accept Pipeline Input? | false + +### <CommonParameters> + +This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see `about_CommonParameters` http://go.microsoft.com/fwlink/p/?LinkID=113216 . + + +## Examples + + **EXAMPLE 1** + +~~~powershell + +$psFile = Join-Path $(Split-Path -Parent $MyInvocation.MyCommand.Definition) "Install-WindowsImage.ps1" +Install-ChocolateyPowershellCommand -PackageName 'installwindowsimage.powershell' -PSFileFullPath $psFile +~~~ + +**EXAMPLE 2** + +~~~powershell + +$psFile = Join-Path $(Split-Path -Parent $MyInvocation.MyCommand.Definition) ` + "Install-WindowsImage.ps1" +Install-ChocolateyPowershellCommand ` + -PackageName 'installwindowsimage.powershell' ` + -PSFileFullPath $psFile ` + -PSFileFullPath $psFile ` + -Url 'http://somewhere.com/downloads/Install-WindowsImage.ps1' +~~~ + +**EXAMPLE 3** + +~~~powershell + +$psFile = Join-Path $(Split-Path -Parent $MyInvocation.MyCommand.Definition) ` + "Install-WindowsImage.ps1" +Install-ChocolateyPowershellCommand ` + -PackageName 'installwindowsimage.powershell' ` + -PSFileFullPath $psFile ` + -Url 'http://somewhere.com/downloads/Install-WindowsImage.ps1' ` + -Url64 'http://somewhere.com/downloads/Install-WindowsImagex64.ps1' +~~~ + +## Links + + * [[Get-ChocolateyWebFile|HelpersGetChocolateyWebFile]] + * [[Install-ChocolateyInstallPackage|HelpersInstallChocolateyInstallPackage]] + * [[Install-ChocolateyPackage|HelpersInstallChocolateyPackage]] + * [[Install-ChocolateyZipPackage|HelpersInstallChocolateyZipPackage]] + + +[[Function Reference|HelpersReference]] + +***NOTE:*** This documentation has been automatically generated from `Import-Module "$env:ChocolateyInstall\helpers\chocolateyInstaller.psm1" -Force; Get-Help Install-ChocolateyPowershellCommand -Full`. diff --git a/docs/generated/HelpersInstallChocolateyShortcut.md b/docs/generated/HelpersInstallChocolateyShortcut.md new file mode 100644 index 0000000000..97641a6650 --- /dev/null +++ b/docs/generated/HelpersInstallChocolateyShortcut.md @@ -0,0 +1,168 @@ +# Install-ChocolateyShortcut + +Creates a shortcut + +## Syntax + +~~~powershell +Install-ChocolateyShortcut ` + -ShortcutFilePath ` + -TargetPath ` + [-WorkingDirectory ] ` + [-Arguments ] ` + [-IconLocation ] ` + [-Description ] ` + [-IgnoredArguments ] [] +~~~ + +## Description + +This adds a shortcut, at the specified location, with the option to specify +a number of additional properties for the shortcut, such as Working Directory, +Arguments, Icon Location, and Description. + +## Notes + +If this errors, as it may if being run under the local SYSTEM account with +particular folder that SYSTEM doesn't have, it will display a warning instead +of failing a package installation. + +## Aliases + +None + +## Inputs + +None + +## Outputs + +None + +## Parameters + +### -ShortcutFilePath <String> +The full absolute path to where the shortcut should be created. This is mandatory. + +Property | Value +---------------------- | ----- +Aliases | +Required? | true +Position? | 1 +Default Value | +Accept Pipeline Input? | false + +### -TargetPath <String> +The full absolute path to the target for new shortcut. This is mandatory. + +Property | Value +---------------------- | ----- +Aliases | +Required? | true +Position? | 2 +Default Value | +Accept Pipeline Input? | false + +### -WorkingDirectory [<String>] +The full absolute path of the Working Directory that will be used by +the new shortcut. This is optional + +Property | Value +---------------------- | ----- +Aliases | +Required? | false +Position? | 3 +Default Value | +Accept Pipeline Input? | false + +### -Arguments [<String>] +Additonal arguments that should be passed along to the new shortcut. This +is optional. + +Property | Value +---------------------- | ----- +Aliases | +Required? | false +Position? | 4 +Default Value | +Accept Pipeline Input? | false + +### -IconLocation [<String>] +The full absolute path to an icon file to be used for the new shortcut. This +is optional. + +Property | Value +---------------------- | ----- +Aliases | +Required? | false +Position? | 5 +Default Value | +Accept Pipeline Input? | false + +### -Description [<String>] +A text description to be associated with the new description. This is optional. + +Property | Value +---------------------- | ----- +Aliases | +Required? | false +Position? | 6 +Default Value | +Accept Pipeline Input? | false + +### -IgnoredArguments [<Object[]>] +Allows splatting with arguments that do not apply. Do not use directly. + +Property | Value +---------------------- | ----- +Aliases | +Required? | false +Position? | named +Default Value | +Accept Pipeline Input? | false + +### <CommonParameters> + +This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see `about_CommonParameters` http://go.microsoft.com/fwlink/p/?LinkID=113216 . + + +## Examples + + **EXAMPLE 1** + +~~~powershell + +# This will create a new shortcut at the location of "C:\test.lnk" and +# link to the file located at "C:\text.exe" + +Install-ChocolateyShortcut -ShortcutFilePath "C:\test.lnk" -TargetPath "C:\test.exe" +~~~ + +**EXAMPLE 2** + +~~~powershell + +# This will create a new shortcut at the location of "C:\notepad.lnk" +# and link to the Notepad application. In addition, other properties +# are being set to specify the working directory, an icon to be used for +# the shortcut, along with a description and arguments. + +Install-ChocolateyShortcut ` + -ShortcutFilePath "C:\notepad.lnk" ` + -TargetPath "C:\Windows\System32\notepad.exe" ` + -WorkDirectory "C:\" ` + -Arguments "C:\test.txt" ` + -IconLocation "C:\test.ico" ` + -Description "This is the description" +~~~ + +## Links + + * [[Install-ChocolateyDesktopLink|HelpersInstallChocolateyDesktopLink]] + * [[Install-ChocolateyExplorerMenuItem|HelpersInstallChocolateyExplorerMenuItem]] + * [[Install-ChocolateyPinnedTaskBarItem|HelpersInstallChocolateyPinnedTaskBarItem]] + + +[[Function Reference|HelpersReference]] + +***NOTE:*** This documentation has been automatically generated from `Import-Module "$env:ChocolateyInstall\helpers\chocolateyInstaller.psm1" -Force; Get-Help Install-ChocolateyShortcut -Full`. diff --git a/docs/generated/HelpersInstallChocolateyVsixPackage.md b/docs/generated/HelpersInstallChocolateyVsixPackage.md new file mode 100644 index 0000000000..09f665b10c --- /dev/null +++ b/docs/generated/HelpersInstallChocolateyVsixPackage.md @@ -0,0 +1,179 @@ +# Install-ChocolateyVsixPackage + +Downloads and installs a VSIX package for Visual Studio + +## Syntax + +~~~powershell +Install-ChocolateyVsixPackage ` + -PackageName ` + [-VsixUrl ] ` + [-VsVersion ] ` + [-Checksum ] ` + [-ChecksumType ] ` + [-Options ] ` + [-IgnoredArguments ] [] +~~~ + +## Description + +VSIX packages are Extensions for the Visual Studio IDE. The Visual +Studio Gallery at http://visualstudiogallery.msdn.microsoft.com/ is the +public extension feed and hosts thousands of extensions. You can locate +a VSIX Url by finding the download link of Visual Studio extensions on +the Visual Studio Gallery. + +## Notes + +Chocolatey works best when the packages contain the software it is +managing and doesn't require downloads. However most software in the +Windows world requires redistribution rights and when sharing packages +publicly (like on the [community feed](https://chocolatey.org/packages)), maintainers may not have those +aforementioned rights. Chocolatey understands how to work with that, +hence this function. You are not subject to this limitation with +internal packages. + +## Aliases + +None + +## Inputs + +None + +## Outputs + +None + +## Parameters + +### -PackageName <String> +The name of the package - while this is an arbitrary value, it's +recommended that it matches the package id. + +Property | Value +---------------------- | ----- +Aliases | +Required? | true +Position? | 1 +Default Value | +Accept Pipeline Input? | false + +### -VsixUrl [<String>] +The URL of the package to be installed. + +Prefer HTTPS when available. Can be HTTP, FTP, or File URIs. + +Property | Value +---------------------- | ----- +Aliases | +Required? | false +Position? | 2 +Default Value | +Accept Pipeline Input? | false + +### -VsVersion [<Int32>] +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. + +Property | Value +---------------------- | ----- +Aliases | +Required? | false +Position? | 3 +Default Value | 0 +Accept Pipeline Input? | false + +### -Checksum [<String>] +OPTIONAL (Highly recommended) - The checksum hash value of the Url +resource. This allows a checksum to be validated for files that are not +local. The checksum type is covered by ChecksumType. + +Property | Value +---------------------- | ----- +Aliases | +Required? | false +Position? | named +Default Value | +Accept Pipeline Input? | false + +### -ChecksumType [<String>] +OPTIONAL - The type of checkum that the file is validated with - valid +values are 'md5', 'sha1', 'sha256' or 'sha512' - defaults to 'md5'. + +MD5 is not recommended as certain organizations need to use FIPS +compliant algorithms for hashing - see +https://support.microsoft.com/en-us/kb/811833 for more details. + +Property | Value +---------------------- | ----- +Aliases | +Required? | false +Position? | named +Default Value | +Accept Pipeline Input? | false + +### -Options [<Hashtable>] +OPTIONAL - Specify custom headers. Available in 0.9.10+. + +Property | Value +---------------------- | -------------- +Aliases | +Required? | false +Position? | named +Default Value | @{Headers=@{}} +Accept Pipeline Input? | false + +### -IgnoredArguments [<Object[]>] +Allows splatting with arguments that do not apply. Do not use directly. + +Property | Value +---------------------- | ----- +Aliases | +Required? | false +Position? | named +Default Value | +Accept Pipeline Input? | false + +### <CommonParameters> + +This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see `about_CommonParameters` http://go.microsoft.com/fwlink/p/?LinkID=113216 . + + +## Examples + + **EXAMPLE 1** + +~~~powershell + +# This downloads the AutoWrockTestable VSIX from the Visual Studio +# Gallery and installs it to the latest version of VS. + +Install-ChocolateyVsixPackage -PackageName "MyPackage" ` + -VsixUrl http://visualstudiogallery.msdn.microsoft.com/ea3a37c9-1c76-4628-803e-b10a109e7943/file/73131/1/AutoWrockTestable.vsix +~~~ + +**EXAMPLE 2** + +~~~powershell + +# This downloads the AutoWrockTestable VSIX from the Visual Studio +# Gallery and installs it to Visual Studio 2012 (v11.0). + +Install-ChocolateyVsixPackage -PackageName "MyPackage" ` + -VsixUrl http://visualstudiogallery.msdn.microsoft.com/ea3a37c9-1c76-4628-803e-b10a109e7943/file/73131/1/AutoWrockTestable.vsix ` + -VsVersion 11 +~~~ + +## Links + + * [[Install-ChocolateyPackage|HelpersInstallChocolateyPackage]] + * [[Install-ChocolateyInstallPackage|HelpersInstallChocolateyInstallPackage]] + * [[Install-ChocolateyZipPackage|HelpersInstallChocolateyZipPackage]] + + +[[Function Reference|HelpersReference]] + +***NOTE:*** This documentation has been automatically generated from `Import-Module "$env:ChocolateyInstall\helpers\chocolateyInstaller.psm1" -Force; Get-Help Install-ChocolateyVsixPackage -Full`. diff --git a/docs/generated/HelpersInstallChocolateyZipPackage.md b/docs/generated/HelpersInstallChocolateyZipPackage.md new file mode 100644 index 0000000000..c431446ffa --- /dev/null +++ b/docs/generated/HelpersInstallChocolateyZipPackage.md @@ -0,0 +1,247 @@ +# Install-ChocolateyZipPackage + +Downloads file from a url and unzips it on your machine. Use +Get-ChocolateyUnzip when local or embedded file. + +## Syntax + +~~~powershell +Install-ChocolateyZipPackage ` + -PackageName ` + [-Url ] ` + -UnzipLocation ` + [-Url64bit ] ` + [-SpecificFolder ] ` + [-Checksum ] ` + [-ChecksumType ] ` + [-Checksum64 ] ` + [-ChecksumType64 ] ` + [-Options ] ` + [-IgnoredArguments ] [] +~~~ + +## Description + +This will download a file from a url and unzip it on your machine. +If you are embedding the file(s) directly in the package (or do not need +to download a file first), use Get-ChocolateyUnzip instead. + +## Notes + +Chocolatey works best when the packages contain the software it is +managing and doesn't require downloads. However most software in the +Windows world requires redistribution rights and when sharing packages +publicly (like on the [community feed](https://chocolatey.org/packages)), maintainers may not have those +aforementioned rights. Chocolatey understands how to work with that, +hence this function. You are not subject to this limitation with +internal packages. + +## Aliases + +None + +## Inputs + +None + +## Outputs + +None + +## Parameters + +### -PackageName <String> +The name of the package - while this is an arbitrary value, it's +recommended that it matches the package id. + +Property | Value +---------------------- | ----- +Aliases | +Required? | true +Position? | 1 +Default Value | +Accept Pipeline Input? | false + +### -Url [<String>] +This is the 32 bit url to download the resource from. This resource can +be used on 64 bit systems when a package has both a Url and Url64bit +specified if a user passes `--forceX86`. If there is only a 64 bit url +available, please remove do not use the paramter (only use Url64bit). +Will fail on 32bit systems if missing or if a user attempts to force +a 32 bit installation on a 64 bit system. + +Prefer HTTPS when available. Can be HTTP, FTP, or File URIs. + +Property | Value +---------------------- | ----- +Aliases | +Required? | false +Position? | 2 +Default Value | +Accept Pipeline Input? | false + +### -UnzipLocation <String> +This is the full path to a location to unzip the contents to, most +likely your script folder. If unzipping to your package folder, the path +will be like +`"$(Split-Path -Parent $MyInvocation.MyCommand.Definition)\\file.exe"` + +Property | Value +---------------------- | ----------- +Aliases | destination +Required? | true +Position? | 3 +Default Value | +Accept Pipeline Input? | false + +### -Url64bit [<String>] +OPTIONAL - If there is a 64 bit resource available, use this +parameter. Chocolatey will automatically determine if the user is +running a 64 bit OS or not and adjust accordingly. Please note that +the 32 bit url will be used in the absence of this. This parameter +should only be used for 64 bit native software. If the original Url +contains both (which is quite rare), set this to '$url' Otherwise remove +this parameter. + +Prefer HTTPS when available. Can be HTTP, FTP, or File URIs. + +Property | Value +---------------------- | ----- +Aliases | url64 +Required? | false +Position? | 4 +Default Value | +Accept Pipeline Input? | false + +### -SpecificFolder [<String>] +Property | Value +---------------------- | ----- +Aliases | +Required? | false +Position? | named +Default Value | +Accept Pipeline Input? | false + +### -Checksum [<String>] +OPTIONAL (Highly recommended) - The checksum hash value of the Url +resource. This allows a checksum to be validated for files that are not +local. The checksum type is covered by ChecksumType. + +Property | Value +---------------------- | ----- +Aliases | +Required? | false +Position? | named +Default Value | +Accept Pipeline Input? | false + +### -ChecksumType [<String>] +OPTIONAL - The type of checkum that the file is validated with - valid +values are 'md5', 'sha1', 'sha256' or 'sha512' - defaults to 'md5'. + +MD5 is not recommended as certain organizations need to use FIPS +compliant algorithms for hashing - see +https://support.microsoft.com/en-us/kb/811833 for more details. + +Property | Value +---------------------- | ----- +Aliases | +Required? | false +Position? | named +Default Value | +Accept Pipeline Input? | false + +### -Checksum64 [<String>] +OPTIONAL (Highly recommended) - The checksum hash value of the Url64bit +resource. This allows a checksum to be validated for files that are not +local. The checksum type is covered by ChecksumType64. + +Property | Value +---------------------- | ----- +Aliases | +Required? | false +Position? | named +Default Value | +Accept Pipeline Input? | false + +### -ChecksumType64 [<String>] +OPTIONAL - The type of checkum that the file is validated with - valid +values are 'md5', 'sha1', 'sha256' or 'sha512' - defaults to +ChecksumType parameter value. + +MD5 is not recommended as certain organizations need to use FIPS +compliant algorithms for hashing - see +https://support.microsoft.com/en-us/kb/811833 for more details. + +Property | Value +---------------------- | ----- +Aliases | +Required? | false +Position? | named +Default Value | +Accept Pipeline Input? | false + +### -Options [<Hashtable>] +OPTIONAL - Specify custom headers. Available in 0.9.10+. + +Property | Value +---------------------- | -------------- +Aliases | +Required? | false +Position? | named +Default Value | @{Headers=@{}} +Accept Pipeline Input? | false + +### -IgnoredArguments [<Object[]>] +Allows splatting with arguments that do not apply. Do not use directly. + +Property | Value +---------------------- | ----- +Aliases | +Required? | false +Position? | named +Default Value | +Accept Pipeline Input? | false + +### <CommonParameters> + +This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see `about_CommonParameters` http://go.microsoft.com/fwlink/p/?LinkID=113216 . + + +## Examples + + **EXAMPLE 1** + +~~~powershell +Install-ChocolateyZipPackage -PackageName 'gittfs' -Url 'https://github.com/downloads/spraints/git-tfs/GitTfs-0.11.0.zip' -UnzipLocation $gittfsPath + +~~~ + +**EXAMPLE 2** + +~~~powershell + +Install-ChocolateyZipPackage -PackageName 'sysinternals' ` + -Url 'http://download.sysinternals.com/Files/SysinternalsSuite.zip' ` + -UnzipLocation "$(Split-Path -Parent $MyInvocation.MyCommand.Definition)" +~~~ + +**EXAMPLE 3** + +~~~powershell + +Install-ChocolateyZipPackage -PackageName 'sysinternals' ` + -Url 'http://download.sysinternals.com/Files/SysinternalsSuite.zip' ` + -UnzipLocation "$(Split-Path -Parent $MyInvocation.MyCommand.Definition)" ` + -Url64 'http://download.sysinternals.com/Files/SysinternalsSuitex64.zip' +~~~ + +## Links + + * [[Get-ChocolateyWebFile|HelpersGetChocolateyWebFile]] + * [[Get-ChocolateyUnzip|HelpersGetChocolateyUnzip]] + + +[[Function Reference|HelpersReference]] + +***NOTE:*** This documentation has been automatically generated from `Import-Module "$env:ChocolateyInstall\helpers\chocolateyInstaller.psm1" -Force; Get-Help Install-ChocolateyZipPackage -Full`. diff --git a/docs/generated/HelpersInstallVsix.md b/docs/generated/HelpersInstallVsix.md new file mode 100644 index 0000000000..a63d9e6665 --- /dev/null +++ b/docs/generated/HelpersInstallVsix.md @@ -0,0 +1,83 @@ +# Install-Vsix + +DO NOT USE. Not part of the public API. + +## Syntax + +~~~powershell +Install-Vsix ` + -Installer ` + -InstallFile ` + [-IgnoredArguments ] [] +~~~ + +## Description + +Installs a VSIX package into a particular version of Visual Studio. + +## Notes + +This is not part of the public API. Please use +Install-ChocolateyVsixPackage instead. + +## Aliases + +None + +## Inputs + +None + +## Outputs + +None + +## Parameters + +### -Installer <String> +The path to the VSIX installer + +Property | Value +---------------------- | ----- +Aliases | +Required? | true +Position? | 1 +Default Value | +Accept Pipeline Input? | false + +### -InstallFile <String> +The VSIX file that is being installed. + +Property | Value +---------------------- | ----- +Aliases | +Required? | true +Position? | 2 +Default Value | +Accept Pipeline Input? | false + +### -IgnoredArguments [<Object[]>] +Allows splatting with arguments that do not apply. Do not use directly. + +Property | Value +---------------------- | ----- +Aliases | +Required? | false +Position? | named +Default Value | +Accept Pipeline Input? | false + +### <CommonParameters> + +This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see `about_CommonParameters` http://go.microsoft.com/fwlink/p/?LinkID=113216 . + + + +## Links + + * [[Install-ChocolateyVsixPackage|HelpersInstallChocolateyVsixPackage]] + + +[[Function Reference|HelpersReference]] + +***NOTE:*** This documentation has been automatically generated from `Import-Module "$env:ChocolateyInstall\helpers\chocolateyInstaller.psm1" -Force; Get-Help Install-Vsix -Full`. diff --git a/docs/generated/HelpersReference.md b/docs/generated/HelpersReference.md new file mode 100644 index 0000000000..bc6c9e63ca --- /dev/null +++ b/docs/generated/HelpersReference.md @@ -0,0 +1,111 @@ +# PowerShell Functions aka Helpers Reference + +## Main Functions + +These functions call other functions and many times may be the only thing you need in your [[chocolateyInstall.ps1 file|ChocolateyInstallPS1]]. + +* [[Install-ChocolateyPackage|HelpersInstallChocolateyPackage]] +* [[Install-ChocolateyZipPackage|HelpersInstallChocolateyZipPackage]] +* [[Install-ChocolateyPowershellCommand|HelpersInstallChocolateyPowershellCommand]] +* [[Install-ChocolateyVsixPackage|HelpersInstallChocolateyVsixPackage]] + +## Error / Success Functions + +* [[Write-ChocolateySuccess|HelpersWriteChocolateySuccess]] - **DEPRECATED** +* [[Write-ChocolateyFailure|HelpersWriteChocolateyFailure]] - **DEPRECATED** + +You really don't need a try catch with Chocolatey PowerShell files anymore. + +## More Functions + +### Administrative Access Functions + +When creating packages that need to run one of the following commands below, one should add the tag `admin` to the nuspec. + +* [[Install-ChocolateyPackage|HelpersInstallChocolateyPackage]] +* [[Start-ChocolateyProcessAsAdmin|HelpersStartChocolateyProcessAsAdmin]] +* [[Install-ChocolateyInstallPackage|HelpersInstallChocolateyInstallPackage]] +* [[Install-ChocolateyPath|HelpersInstallChocolateyPath]] - when specifying machine path +* [[Install-ChocolateyEnvironmentVariable|HelpersInstallChocolateyEnvironmentVariable]] - when specifying machine path +* [[Install-ChocolateyExplorerMenuItem|HelpersInstallChocolateyExplorerMenuItem]] +* [[Install-ChocolateyFileAssociation|HelpersInstallChocolateyFileAssociation]] + +### Non-Administrator Safe Functions + +When you have a need to run Chocolatey without Administrative access required (non-default install location), you can run the following functions without administrative access. + +These are the functions from above as one list. + +* [[Install-ChocolateyZipPackage|HelpersInstallChocolateyZipPackage]] +* [[Install-ChocolateyPowershellCommand|HelpersInstallChocolateyPowershellCommand]] +* [[Write-ChocolateySuccess|HelpersWriteChocolateySuccess]] +* [[Write-ChocolateyFailure|HelpersWriteChocolateyFailure]] +* [[Get-ChocolateyWebFile|HelpersGetChocolateyWebFile]] +* [[Get-ChocolateyUnzip|HelpersGetChocolateyUnzip]] +* [[Install-ChocolateyPath|HelpersInstallChocolateyPath]] - when specifying user path +* [[Install-ChocolateyEnvironmentVariable|HelpersInstallChocolateyEnvironmentVariable]] - when specifying user path +* [[Install-ChocolateyDesktopLink|HelpersInstallChocolateyDesktopLink]] - **DEPRECATED** - see [[Install-ChocolateyShortcut|HelpersInstallChocolateyShortcut]] +* [[Install-ChocolateyPinnedTaskBarItem|HelpersInstallChocolateyPinnedTaskBarItem]] +* [[Install-ChocolateyShortcut|HelpersInstallChocolateyShortcut]] - v0.9.9+ +* [[Update-SessionEnvironment|HelpersUpdateSessionEnvironment]] + +## Complete List (alphabetical order) + + * [[Get-ToolsLocation|HelpersGetToolsLocation]] + * [[Get-OSArchitectureWidth|HelpersGetOSArchitectureWidth]] + * [[Uninstall-BinFile|HelpersUninstallBinFile]] + * [[Format-FileSize|HelpersFormatFileSize]] + * [[Get-ChecksumValid|HelpersGetChecksumValid]] + * [[Get-ChocolateyUnzip|HelpersGetChocolateyUnzip]] + * [[Get-ChocolateyWebFile|HelpersGetChocolateyWebFile]] + * [[Get-EnvironmentVariable|HelpersGetEnvironmentVariable]] + * [[Get-EnvironmentVariableNames|HelpersGetEnvironmentVariableNames]] + * [[Get-FtpFile|HelpersGetFtpFile]] + * [[Get-OSArchitectureWidth|HelpersGetOSArchitectureWidth]] + * [[Get-ToolsLocation|HelpersGetToolsLocation]] + * [[Get-UACEnabled|HelpersGetUACEnabled]] + * [[Get-VirusCheckValid|HelpersGetVirusCheckValid]] + * [[Get-WebFile|HelpersGetWebFile]] + * [[Get-WebFileName|HelpersGetWebFileName]] + * [[Get-WebHeaders|HelpersGetWebHeaders]] + * [[Install-BinFile|HelpersInstallBinFile]] + * [[Install-ChocolateyDesktopLink|HelpersInstallChocolateyDesktopLink]] + * [[Install-ChocolateyEnvironmentVariable|HelpersInstallChocolateyEnvironmentVariable]] + * [[Install-ChocolateyExplorerMenuItem|HelpersInstallChocolateyExplorerMenuItem]] + * [[Install-ChocolateyFileAssociation|HelpersInstallChocolateyFileAssociation]] + * [[Install-ChocolateyInstallPackage|HelpersInstallChocolateyInstallPackage]] + * [[Install-ChocolateyPackage|HelpersInstallChocolateyPackage]] + * [[Install-ChocolateyPath|HelpersInstallChocolateyPath]] + * [[Install-ChocolateyPinnedTaskBarItem|HelpersInstallChocolateyPinnedTaskBarItem]] + * [[Install-ChocolateyPowershellCommand|HelpersInstallChocolateyPowershellCommand]] + * [[Install-ChocolateyShortcut|HelpersInstallChocolateyShortcut]] + * [[Install-ChocolateyVsixPackage|HelpersInstallChocolateyVsixPackage]] + * [[Install-ChocolateyZipPackage|HelpersInstallChocolateyZipPackage]] + * [[Install-Vsix|HelpersInstallVsix]] + * [[Set-EnvironmentVariable|HelpersSetEnvironmentVariable]] + * [[Set-PowerShellExitCode|HelpersSetPowerShellExitCode]] + * [[Start-ChocolateyProcessAsAdmin|HelpersStartChocolateyProcessAsAdmin]] + * [[Test-ProcessAdminRights|HelpersTestProcessAdminRights]] + * [[Uninstall-BinFile|HelpersUninstallBinFile]] + * [[Uninstall-ChocolateyEnvironmentVariable|HelpersUninstallChocolateyEnvironmentVariable]] + * [[Uninstall-ChocolateyPackage|HelpersUninstallChocolateyPackage]] + * [[Uninstall-ChocolateyZipPackage|HelpersUninstallChocolateyZipPackage]] + * [[Update-SessionEnvironment|HelpersUpdateSessionEnvironment]] + * [[Write-ChocolateyFailure|HelpersWriteChocolateyFailure]] + * [[Write-ChocolateySuccess|HelpersWriteChocolateySuccess]] + * [[Write-FileUpdateLog|HelpersWriteFileUpdateLog]] +## Variables + +There are also a number of environment variables providing access to some values from the nuspec and other information that may be useful. They are accessed via `$env:variableName`. + +* __chocolateyPackageFolder__ = the folder where Chocolatey has downloaded and extracted the NuGet package, typically `C:\ProgramData\chocolatey\lib\packageName`. +* __chocolateyPackageName__ (since 0.9.9.0) = The package name, which is equivalent to the `` tag in the nuspec +* __chocolateyPackageVersion__ (since 0.9.9.0) = The package version, which is equivalent to the `` tag in the nuspec + +`chocolateyPackageVersion` may be particularly useful, since that would allow you in some cases to create packages for new releases of the updated software by only changing the `` in the nuspec and not having to touch the `chocolateyInstall.ps1` at all. An example of this: + +~~~powershell +$url = "http://www.thesoftware.com/downloads/thesoftware-$env:chocolateyPackageVersion.zip" + +Install-ChocolateyZipPackage '$env:chocolateyPackageName' $url $binRoot +~~~ diff --git a/docs/generated/HelpersSetEnvironmentVariable.md b/docs/generated/HelpersSetEnvironmentVariable.md new file mode 100644 index 0000000000..980c9871a0 --- /dev/null +++ b/docs/generated/HelpersSetEnvironmentVariable.md @@ -0,0 +1,98 @@ +# Set-EnvironmentVariable + +**NOTE:** Administrative Access Required when `-Scope 'Machine'.` + +DO NOT USE. Not part of the public API. Use +`Install-ChocolateyEnvironmentVariable` instead. + +## Syntax + +~~~powershell +Set-EnvironmentVariable ` + -Name ` + [-Value ] ` + [-Scope {Process | User | Machine}] ` + [-IgnoredArguments ] [] +~~~ + +## Description + +Saves an environment variable. + +## Notes + +This command will assert UAC/Admin privileges on the machine if +`-Scope 'Machine'`. + +## Aliases + +None + +## Inputs + +None + +## Outputs + +None + +## Parameters + +### -Name <String> +Property | Value +---------------------- | ----- +Aliases | +Required? | true +Position? | 1 +Default Value | +Accept Pipeline Input? | false + +### -Value [<String>] +Property | Value +---------------------- | ----- +Aliases | +Required? | false +Position? | 2 +Default Value | +Accept Pipeline Input? | false + +### -Scope + +Valid options: Process, User, Machine + +Property | Value +---------------------- | ----- +Aliases | +Required? | false +Position? | 3 +Default Value | +Accept Pipeline Input? | false + +### -IgnoredArguments [<Object[]>] +Allows splatting with arguments that do not apply. Do not use directly. + +Property | Value +---------------------- | ----- +Aliases | +Required? | false +Position? | named +Default Value | +Accept Pipeline Input? | false + +### <CommonParameters> + +This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see `about_CommonParameters` http://go.microsoft.com/fwlink/p/?LinkID=113216 . + + + +## Links + + * [[Install-ChocolateyEnvironmentVariable|HelpersInstallChocolateyEnvironmentVariable]] + * [[Uninstall-ChocolateyEnvironmentVariable|HelpersUninstallChocolateyEnvironmentVariable]] + * [[Install-ChocolateyPath|HelpersInstallChocolateyPath]] + * [[Get-EnvironmentVariable|HelpersGetEnvironmentVariable]] + + +[[Function Reference|HelpersReference]] + +***NOTE:*** This documentation has been automatically generated from `Import-Module "$env:ChocolateyInstall\helpers\chocolateyInstaller.psm1" -Force; Get-Help Set-EnvironmentVariable -Full`. diff --git a/docs/generated/HelpersSetPowerShellExitCode.md b/docs/generated/HelpersSetPowerShellExitCode.md new file mode 100644 index 0000000000..43e97711e2 --- /dev/null +++ b/docs/generated/HelpersSetPowerShellExitCode.md @@ -0,0 +1,75 @@ +# Set-PowerShellExitCode + +Sets the exit code for the PowerShell scripts. + +## Syntax + +~~~powershell +Set-PowerShellExitCode ` + -ExitCode ` + [-IgnoredArguments ] [] +~~~ + +## Description + +Sets the exit code as an environment variable that is checked and used +as the exit code for the package at the end of the package script. + +## Notes + +This tells PowerShell that it should prepare to shut down. + +## Aliases + +None + +## Inputs + +None + +## Outputs + +None + +## Parameters + +### -ExitCode <Int32> +The exit code to set. + +Property | Value +---------------------- | ----- +Aliases | +Required? | true +Position? | 1 +Default Value | 0 +Accept Pipeline Input? | false + +### -IgnoredArguments [<Object[]>] +Allows splatting with arguments that do not apply. Do not use directly. + +Property | Value +---------------------- | ----- +Aliases | +Required? | false +Position? | named +Default Value | +Accept Pipeline Input? | false + +### <CommonParameters> + +This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see `about_CommonParameters` http://go.microsoft.com/fwlink/p/?LinkID=113216 . + + +## Examples + + **EXAMPLE 1** + +~~~powershell +Set-PowerShellExitCode 3010 + +~~~ + + +[[Function Reference|HelpersReference]] + +***NOTE:*** This documentation has been automatically generated from `Import-Module "$env:ChocolateyInstall\helpers\chocolateyInstaller.psm1" -Force; Get-Help Set-PowerShellExitCode -Full`. diff --git a/docs/generated/HelpersStartChocolateyProcessAsAdmin.md b/docs/generated/HelpersStartChocolateyProcessAsAdmin.md new file mode 100644 index 0000000000..3550040a7b --- /dev/null +++ b/docs/generated/HelpersStartChocolateyProcessAsAdmin.md @@ -0,0 +1,153 @@ +# Start-ChocolateyProcessAsAdmin + +**NOTE:** Administrative Access Required. + +Runs a process with administrative privileges. If `-ExeToRun` is not +specified, it is run with PowerShell. + +## Syntax + +~~~powershell +Start-ChocolateyProcessAsAdmin ` + -Statements ` + [-ExeToRun ] ` + [-Minimized] ` + [-NoSleep] ` + [-ValidExitCodes ] ` + [-IgnoredArguments ] [] +~~~ + + +## Notes + +This command will assert UAC/Admin privileges on the machine. + +## Aliases + +None + +## Inputs + +None + +## Outputs + +None + +## Parameters + +### -Statements <String> +Arguments to pass to `ExeToRun` or the PowerShell script block to be +run. + +Property | Value +---------------------- | ----- +Aliases | +Required? | true +Position? | 1 +Default Value | +Accept Pipeline Input? | false + +### -ExeToRun [<String>] +The executable/application/installer to run. Defaults to `'powershell'`. + +Property | Value +---------------------- | ---------- +Aliases | +Required? | false +Position? | 2 +Default Value | powershell +Accept Pipeline Input? | false + +### -Minimized +Switch indicating if a Windows pops up (if not called with a silent +argument) that it should be minimized. + +Property | Value +---------------------- | ----- +Aliases | +Required? | false +Position? | named +Default Value | False +Accept Pipeline Input? | false + +### -NoSleep +Used only when calling PowerShell - indicates the window that is opened +should return instantly when it is complete. + +Property | Value +---------------------- | ----- +Aliases | +Required? | false +Position? | named +Default Value | False +Accept Pipeline Input? | false + +### -ValidExitCodes [<Object>] +Array of exit codes indicating success. Defaults to `@(0)`. + +Property | Value +---------------------- | ----- +Aliases | +Required? | false +Position? | named +Default Value | @(0) +Accept Pipeline Input? | false + +### -IgnoredArguments [<Object[]>] +Allows splatting with arguments that do not apply. Do not use directly. + +Property | Value +---------------------- | ----- +Aliases | +Required? | false +Position? | named +Default Value | +Accept Pipeline Input? | false + +### <CommonParameters> + +This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see `about_CommonParameters` http://go.microsoft.com/fwlink/p/?LinkID=113216 . + + +## Examples + + **EXAMPLE 1** + +~~~powershell +Start-ChocolateyProcessAsAdmin -Statements "$msiArgs" -ExeToRun 'msiexec' + +~~~ + +**EXAMPLE 2** + +~~~powershell +Start-ChocolateyProcessAsAdmin -Statements "$silentArgs" -ExeToRun $file + +~~~ + +**EXAMPLE 3** + +~~~powershell +Start-ChocolateyProcessAsAdmin -Statements "$silentArgs" -ExeToRun $file -ValidExitCodes @(0,21) + +~~~ + +**EXAMPLE 4** + +~~~powershell + +# Run PowerShell statements +$psFile = Join-Path "$(Split-Path -parent $MyInvocation.MyCommand.Definition)" 'someInstall.ps1' +Start-ChocolateyProcessAsAdmin "& `'$psFile`'" +~~~ + +## Links + + * [[Install-ChocolateyPackage|HelpersInstallChocolateyPackage]] + * [[Install-ChocolateyInstallPackage|HelpersInstallChocolateyInstallPackage]] + + +[[Function Reference|HelpersReference]] + +***NOTE:*** This documentation has been automatically generated from `Import-Module "$env:ChocolateyInstall\helpers\chocolateyInstaller.psm1" -Force; Get-Help Start-ChocolateyProcessAsAdmin -Full`. diff --git a/docs/generated/HelpersTestProcessAdminRights.md b/docs/generated/HelpersTestProcessAdminRights.md new file mode 100644 index 0000000000..b5ccf4271b --- /dev/null +++ b/docs/generated/HelpersTestProcessAdminRights.md @@ -0,0 +1,43 @@ +# Test-ProcessAdminRights + +Tests whether the current process is running with administrative rights. + +## Syntax + +~~~powershell +Test-ProcessAdminRights +~~~ + +## Description + +This function checks whether the current process has administrative +rights by checking if the current user identity is a member of the +Administrators group. It returns `$true` if the current process is +running with administrative rights, `$false` otherwise. + +On Windows Vista and later, with UAC enabled, the returned value +represents the actual rights available to the process, e.g. if it +returns `$true`, the process is running elevated. + + +## Aliases + +None + +## Inputs + +None + +## Outputs + +None + +## Parameters + + + + + +[[Function Reference|HelpersReference]] + +***NOTE:*** This documentation has been automatically generated from `Import-Module "$env:ChocolateyInstall\helpers\chocolateyInstaller.psm1" -Force; Get-Help Test-ProcessAdminRights -Full`. diff --git a/docs/generated/HelpersUnInstallChocolateyZipPackage.md b/docs/generated/HelpersUnInstallChocolateyZipPackage.md new file mode 100644 index 0000000000..091333585f --- /dev/null +++ b/docs/generated/HelpersUnInstallChocolateyZipPackage.md @@ -0,0 +1,95 @@ +# Uninstall-ChocolateyZipPackage + +Uninstalls a previous installed zip package + +## Syntax + +~~~powershell +Uninstall-ChocolateyZipPackage ` + -PackageName ` + -ZipFileName ` + [-IgnoredArguments ] [] +~~~ + +## Description + +This will uninstall a zip file if installed via Install-ChocolateyZipPackage. +This is not necessary if the files are unzipped to the package location. + +## 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. + +## Aliases + +None + +## Inputs + +None + +## Outputs + +None + +## Parameters + +### -PackageName <String> +The name of the package - while this is an arbitrary value, it's +recommended that it matches the package id. + +Property | Value +---------------------- | ----- +Aliases | +Required? | true +Position? | 1 +Default Value | +Accept Pipeline Input? | false + +### -ZipFileName <String> +This is the zip filename originally installed. + +Property | Value +---------------------- | ----- +Aliases | +Required? | true +Position? | 2 +Default Value | +Accept Pipeline Input? | false + +### -IgnoredArguments [<Object[]>] +Allows splatting with arguments that do not apply. Do not use directly. + +Property | Value +---------------------- | ----- +Aliases | +Required? | false +Position? | named +Default Value | +Accept Pipeline Input? | false + +### <CommonParameters> + +This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see `about_CommonParameters` http://go.microsoft.com/fwlink/p/?LinkID=113216 . + + +## Examples + + **EXAMPLE 1** + +~~~powershell +Uninstall-ChocolateyZipPackage '__NAME__' 'filename.zip' + +~~~ + +## Links + + * [[Install-ChocolateyZipPackage|HelpersInstallChocolateyZipPackage]] + * [[Uninstall-ChocolateyPackage|HelpersUninstallChocolateyPackage]] + + +[[Function Reference|HelpersReference]] + +***NOTE:*** This documentation has been automatically generated from `Import-Module "$env:ChocolateyInstall\helpers\chocolateyInstaller.psm1" -Force; Get-Help Uninstall-ChocolateyZipPackage -Full`. diff --git a/docs/generated/HelpersUninstallBinFile.md b/docs/generated/HelpersUninstallBinFile.md new file mode 100644 index 0000000000..3a0d809fcb --- /dev/null +++ b/docs/generated/HelpersUninstallBinFile.md @@ -0,0 +1,91 @@ +# Uninstall-BinFile + +Removes a shim (or batch redirect) for a file. + +## Syntax + +~~~powershell +Uninstall-BinFile ` + -Name ` + [-Path ] ` + [-IgnoredArguments ] [] +~~~ + +## Description + +Chocolatey installs have the folder `$($env:ChocolateyInstall)\bin` +included in the PATH environment variable. Chocolatey automatically +shims executables in package folders that are not explicitly ignored, +putting them into the bin folder (and subsequently onto the PATH). + +When you have other files you have shimmed, you need to use this +function to remove them from the bin folder. + +## Notes + +Not normally needed for exe files in the package folder, those are +automatically discovered and the shims removed. + +## Aliases + +None + +## Inputs + +None + +## Outputs + +None + +## Parameters + +### -Name <String> +The name of the redirect file without ".exe" appended to it. + +Property | Value +---------------------- | ----- +Aliases | +Required? | true +Position? | 1 +Default Value | +Accept Pipeline Input? | false + +### -Path [<String>] +The path to the original file. Can be relative from +`$($env:ChocolateyInstall)\bin` back to your file or a full path to the +file. + +Property | Value +---------------------- | ----- +Aliases | +Required? | false +Position? | 2 +Default Value | +Accept Pipeline Input? | false + +### -IgnoredArguments [<Object[]>] +Allows splatting with arguments that do not apply. Do not use directly. + +Property | Value +---------------------- | ----- +Aliases | +Required? | false +Position? | named +Default Value | +Accept Pipeline Input? | false + +### <CommonParameters> + +This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see `about_CommonParameters` http://go.microsoft.com/fwlink/p/?LinkID=113216 . + + + +## Links + + * [[Install-BinFile|HelpersInstallBinFile]] + + +[[Function Reference|HelpersReference]] + +***NOTE:*** This documentation has been automatically generated from `Import-Module "$env:ChocolateyInstall\helpers\chocolateyInstaller.psm1" -Force; Get-Help Uninstall-BinFile -Full`. diff --git a/docs/generated/HelpersUninstallChocolateyEnvironmentVariable.md b/docs/generated/HelpersUninstallChocolateyEnvironmentVariable.md new file mode 100644 index 0000000000..961e9c031d --- /dev/null +++ b/docs/generated/HelpersUninstallChocolateyEnvironmentVariable.md @@ -0,0 +1,116 @@ +# Uninstall-ChocolateyEnvironmentVariable + +**NOTE:** Administrative Access Required when `-VariableType 'Machine'.` + +Removes a persistent environment variable. + +## Syntax + +~~~powershell +Uninstall-ChocolateyEnvironmentVariable ` + -VariableName ` + [-VariableType {Process | User | Machine}] ` + [-IgnoredArguments ] [] +~~~ + +## Description + +Uninstall-ChocolateyEnvironmentVariable removes an environment variable +with the specified name and value. The variable can be scoped either to +the User or to the Machine. If Machine level scoping is specified, the +command is elevated to an administrative session. + +## Notes + +Available in 0.9.10+. If you need compatibility with older versions, +use Install-ChocolateyEnvironmentVariable and set `-VariableValue $null` + +This command will assert UAC/Admin privileges on the machine when +`-VariableType Machine`. + +This will remove the environment variable from the current session. + +## Aliases + +None + +## Inputs + +None + +## Outputs + +None + +## Parameters + +### -VariableName <String> +The name or key of the environment variable to remove. + +Property | Value +---------------------- | ----- +Aliases | +Required? | true +Position? | 1 +Default Value | +Accept Pipeline Input? | false + +### -VariableType +Specifies whether this variable is at either the individual User level +or at the Machine level. + + +Valid options: Process, User, Machine + +Property | Value +---------------------- | ----- +Aliases | +Required? | false +Position? | 2 +Default Value | User +Accept Pipeline Input? | false + +### -IgnoredArguments [<Object[]>] +Allows splatting with arguments that do not apply. Do not use directly. + +Property | Value +---------------------- | ----- +Aliases | +Required? | false +Position? | named +Default Value | +Accept Pipeline Input? | false + +### <CommonParameters> + +This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see `about_CommonParameters` http://go.microsoft.com/fwlink/p/?LinkID=113216 . + + +## Examples + + **EXAMPLE 1** + +~~~powershell + +# Remove an environment variable +Uninstall-ChocolateyEnvironmentVariable -VariableName 'bob' +~~~ + +**EXAMPLE 2** + +~~~powershell + +# Remove an environment variable from Machine +Uninstall-ChocolateyEnvironmentVariable -VariableName 'bob' -VariableType 'Machine' +~~~ + +## Links + + * [[Install-ChocolateyEnvironmentVariable|HelpersInstallChocolateyEnvironmentVariable]] + * [[Set-EnvironmentVariable|HelpersSetEnvironmentVariable]] + * [[Install-ChocolateyPath|HelpersInstallChocolateyPath]] + + +[[Function Reference|HelpersReference]] + +***NOTE:*** This documentation has been automatically generated from `Import-Module "$env:ChocolateyInstall\helpers\chocolateyInstaller.psm1" -Force; Get-Help Uninstall-ChocolateyEnvironmentVariable -Full`. diff --git a/docs/generated/HelpersUninstallChocolateyPackage.md b/docs/generated/HelpersUninstallChocolateyPackage.md new file mode 100644 index 0000000000..e364853ba5 --- /dev/null +++ b/docs/generated/HelpersUninstallChocolateyPackage.md @@ -0,0 +1,170 @@ +# Uninstall-ChocolateyPackage + +Uninstalls software from "Programs and Features". + +## Syntax + +~~~powershell +Uninstall-ChocolateyPackage ` + -PackageName ` + [-FileType ] ` + [-SilentArgs ] ` + [-File ] ` + [-ValidExitCodes ] ` + [-IgnoredArguments ] [] +~~~ + +## Description + +This will uninstall software from your machine (in Programs and +Features). This may not be necessary if Auto Uninstaller is turned on. + +Choco 0.9.9+ automatically tracks registry changes for "Programs and +Features" of the underlying software's native installers when +installing packages. The "Automatic Uninstaller" (auto uninstaller) +service is a feature that can use that information to automatically +determine how to uninstall these natively installed applications. This +means that a package may not need an explicit chocolateyUninstall.ps1 +to reverse the installation done in the install script. + +With auto uninstaller turned off, a chocolateyUninstall.ps1 is required +to perform uninstall from "Programs and Features". In the absence of +chocolateyUninstall.ps1, choco uninstall only removes the package from +Chocolatey but does not remove the sofware from your system without +auto uninstaller. + +## Notes + +May not be required. Starting in 0.9.10+, the Automatic Uninstaller +(AutoUninstaller) is turned on by default. + +## Aliases + +None + +## Inputs + +None + +## Outputs + +None + +## Parameters + +### -PackageName <String> +The name of the package - while this is an arbitrary value, it's +recommended that it matches the package id. + +Property | Value +---------------------- | ----- +Aliases | +Required? | true +Position? | 1 +Default Value | +Accept Pipeline Input? | false + +### -FileType [<String>] +This is the extension of the file. This should be either exe or msi. + +Property | Value +---------------------- | ------------- +Aliases | installerType +Required? | false +Position? | 2 +Default Value | exe +Accept Pipeline Input? | false + +### -SilentArgs [<String>] +OPTIONAL - These are the parameters to pass to the native uninstaller, +including any arguments to make the uninstaller silent/unattended. +[Licensed editions](https://chocolatey.org/compare) of Chocolatey will automatically determine the +installer type and merge the arguments with what is provided here. + +Try any of the to get the silent (unattended) uninstaller - +`/s /S /q /Q /quiet /silent /SILENT /VERYSILENT`. With msi it is always +`/quiet`. Please pass it in still but it will be overridden by +Chocolatey to `/quiet`. If you don't pass anything it could invoke the +installer with out any arguments. That means a nonsilent installer. + +Please include the `notSilent` tag in your Chocolatey package if you +are not setting up a silent/unattended package. Please note that if you +are submitting to the [community repository](https://chocolatey.org/packages), it is nearly a requirement +for the package to be completely unattended. + +Property | Value +---------------------- | ----- +Aliases | +Required? | false +Position? | 3 +Default Value | +Accept Pipeline Input? | false + +### -File [<String>] +The full path to the native uninstaller to run. + +Property | Value +---------------------- | ----- +Aliases | +Required? | false +Position? | 4 +Default Value | +Accept Pipeline Input? | false + +### -ValidExitCodes [<Object>] +Array of exit codes indicating success. Defaults to `@(0)`. + +Property | Value +---------------------- | ----- +Aliases | +Required? | false +Position? | named +Default Value | @(0) +Accept Pipeline Input? | false + +### -IgnoredArguments [<Object[]>] +Allows splatting with arguments that do not apply. Do not use directly. + +Property | Value +---------------------- | ----- +Aliases | +Required? | false +Position? | named +Default Value | +Accept Pipeline Input? | false + +### <CommonParameters> + +This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see `about_CommonParameters` http://go.microsoft.com/fwlink/p/?LinkID=113216 . + + +## Examples + + **EXAMPLE 1** + +~~~powershell +Uninstall-ChocolateyPackage '__NAME__' 'EXE_OR_MSI' 'SILENT_ARGS' 'FilePath' + +~~~ + +**EXAMPLE 2** + +~~~powershell + +Uninstall-ChocolateyPackage -PackageName $packageName ` + -FileType $installerType ` + -SilentArgs "$silentArgs" ` + -ValidExitCodes $validExitCodes ` + -File "$file" +~~~ + +## Links + + * [[Install-ChocolateyPackage|HelpersInstallChocolateyPackage]] + * [[Install-ChocolateyInstallPackage|HelpersInstallChocolateyInstallPackage]] + * [[Uninstall-ChocolateyZipPackage|HelpersUninstallChocolateyZipPackage]] + + +[[Function Reference|HelpersReference]] + +***NOTE:*** This documentation has been automatically generated from `Import-Module "$env:ChocolateyInstall\helpers\chocolateyInstaller.psm1" -Force; Get-Help Uninstall-ChocolateyPackage -Full`. diff --git a/docs/generated/HelpersUpdateSessionEnvironment.md b/docs/generated/HelpersUpdateSessionEnvironment.md new file mode 100644 index 0000000000..9be80bdf4c --- /dev/null +++ b/docs/generated/HelpersUpdateSessionEnvironment.md @@ -0,0 +1,54 @@ +# Update-SessionEnvironment + +Updates the environment variables of the current powershell session with +any environment variable changes that may have occured during a +Chocolatey package install. + +## Syntax + +~~~powershell +Update-SessionEnvironment +~~~ + +## Description + +When Chocolatey installs a package, the package author may add or change +certain environment variables that will affect how the application runs +or how it is accessed. Often, these changes are not visible to the +current PowerShell session. This means the user needs to open a new +PowerShell session before these settings take effect which can render +the installed application nonfunctional until that time. + +Use the Update-SessionEnvironment command to refresh the current +PowerShell session with all environment settings possibly performed by +Chocolatey package installs. + +## Notes + +This method is also added to the user's PowerShell profile as +`refreshenv`. When called as `refreshenv`, the method will provide +additional output. + +Preserves `PSModulePath` as set by the process starting in 0.9.10. + +## Aliases + +None + +## Inputs + +None + +## Outputs + +None + +## Parameters + + + + + +[[Function Reference|HelpersReference]] + +***NOTE:*** This documentation has been automatically generated from `Import-Module "$env:ChocolateyInstall\helpers\chocolateyInstaller.psm1" -Force; Get-Help Update-SessionEnvironment -Full`. diff --git a/docs/generated/HelpersWriteChocolateyFailure.md b/docs/generated/HelpersWriteChocolateyFailure.md new file mode 100644 index 0000000000..a3e9f074b3 --- /dev/null +++ b/docs/generated/HelpersWriteChocolateyFailure.md @@ -0,0 +1,86 @@ +# Write-ChocolateyFailure + +DEPRECATED - DO NOT USE. + +## Syntax + +~~~powershell +Write-ChocolateyFailure ` + [-PackageName ] ` + [-FailureMessage ] ` + [-IgnoredArguments ] [] +~~~ + +## Description + +Throws the error message as an error. + +## Notes + +This has been deprecated and is no longer useful as of 0.9.9. Instead +please just use `throw $_.Exception` when catching errors. Although +try/catch is no longer necessary unless you want to do some error +handling. + +## Aliases + +None + +## Inputs + +None + +## Outputs + +None + +## Parameters + +### -PackageName [<String>] +The name of the package - while this is an arbitrary value, it's +recommended that it matches the package id. + +Property | Value +---------------------- | ----- +Aliases | +Required? | false +Position? | 1 +Default Value | +Accept Pipeline Input? | false + +### -FailureMessage [<String>] +The message to throw an error with. + +Property | Value +---------------------- | ----- +Aliases | +Required? | false +Position? | 2 +Default Value | +Accept Pipeline Input? | false + +### -IgnoredArguments [<Object[]>] +Allows splatting with arguments that do not apply. Do not use directly. + +Property | Value +---------------------- | ----- +Aliases | +Required? | false +Position? | 3 +Default Value | +Accept Pipeline Input? | false + +### <CommonParameters> + +This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see `about_CommonParameters` http://go.microsoft.com/fwlink/p/?LinkID=113216 . + + + +## Links + + * [[Write-ChocolateySuccess|HelpersWriteChocolateySuccess]] + + +[[Function Reference|HelpersReference]] + +***NOTE:*** This documentation has been automatically generated from `Import-Module "$env:ChocolateyInstall\helpers\chocolateyInstaller.psm1" -Force; Get-Help Write-ChocolateyFailure -Full`. diff --git a/docs/generated/HelpersWriteChocolateySuccess.md b/docs/generated/HelpersWriteChocolateySuccess.md new file mode 100644 index 0000000000..f48e391bf3 --- /dev/null +++ b/docs/generated/HelpersWriteChocolateySuccess.md @@ -0,0 +1,74 @@ +# Write-ChocolateySuccess + +DEPRECATED - DO NOT USE. + +## Syntax + +~~~powershell +Write-ChocolateySuccess ` + [-PackageName ] ` + [-IgnoredArguments ] [] +~~~ + +## Description + +Writes a success message for a package. + +## Notes + +This has been deprecated and is no longer useful as of 0.9.9. Instead +please just use `throw $_.Exception` when catching errors. Although +try/catch is no longer necessary unless you want to do some error +handling. + +## Aliases + +None + +## Inputs + +None + +## Outputs + +None + +## Parameters + +### -PackageName [<String>] +The name of the package - while this is an arbitrary value, it's +recommended that it matches the package id. + +Property | Value +---------------------- | ----- +Aliases | +Required? | false +Position? | 1 +Default Value | +Accept Pipeline Input? | false + +### -IgnoredArguments [<Object[]>] +Allows splatting with arguments that do not apply. Do not use directly. + +Property | Value +---------------------- | ----- +Aliases | +Required? | false +Position? | 2 +Default Value | +Accept Pipeline Input? | false + +### <CommonParameters> + +This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see `about_CommonParameters` http://go.microsoft.com/fwlink/p/?LinkID=113216 . + + + +## Links + + * [[Write-ChocolateyFailure|HelpersWriteChocolateyFailure]] + + +[[Function Reference|HelpersReference]] + +***NOTE:*** This documentation has been automatically generated from `Import-Module "$env:ChocolateyInstall\helpers\chocolateyInstaller.psm1" -Force; Get-Help Write-ChocolateySuccess -Full`. diff --git a/docs/generated/HelpersWriteFileUpdateLog.md b/docs/generated/HelpersWriteFileUpdateLog.md new file mode 100644 index 0000000000..e1508473ad --- /dev/null +++ b/docs/generated/HelpersWriteFileUpdateLog.md @@ -0,0 +1,103 @@ +# Write-FileUpdateLog + +DEPRECATED - DO NOT USE. Will be removed in v1. + +## Syntax + +~~~powershell +Write-FileUpdateLog ` + [-LogFilePath ] ` + [-LocationToMonitor ] ` + [-ScriptToRun ] ` + [-ArgumentList ] ` + [-IgnoredArguments ] [] +~~~ + +## Description + +Monitors a location and writes changes to a log file. + +## Notes + +DEPRECATED. + +Has issues with paths longer than 260 characters. See +https://github.com/chocolatey/choco/issues/156 + +## Aliases + +None + +## Inputs + +None + +## Outputs + +None + +## Parameters + +### -LogFilePath [<String>] +The full path to where to write the log file. + +Property | Value +---------------------- | ----- +Aliases | +Required? | false +Position? | 1 +Default Value | +Accept Pipeline Input? | false + +### -LocationToMonitor [<String>] +The location to watch for changes at. + +Property | Value +---------------------- | ----- +Aliases | +Required? | false +Position? | 2 +Default Value | +Accept Pipeline Input? | false + +### -ScriptToRun [<ScriptBlock>] +The script block of what to run and monitor changes. + +Property | Value +---------------------- | ----- +Aliases | +Required? | false +Position? | 3 +Default Value | +Accept Pipeline Input? | false + +### -ArgumentList [<Object[]>] +Property | Value +---------------------- | ----- +Aliases | +Required? | false +Position? | 4 +Default Value | +Accept Pipeline Input? | false + +### -IgnoredArguments [<Object[]>] +Allows splatting with arguments that do not apply. Do not use directly. + +Property | Value +---------------------- | ----- +Aliases | +Required? | false +Position? | 5 +Default Value | +Accept Pipeline Input? | false + +### <CommonParameters> + +This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see `about_CommonParameters` http://go.microsoft.com/fwlink/p/?LinkID=113216 . + + + + +[[Function Reference|HelpersReference]] + +***NOTE:*** This documentation has been automatically generated from `Import-Module "$env:ChocolateyInstall\helpers\chocolateyInstaller.psm1" -Force; Get-Help Write-FileUpdateLog -Full`. diff --git a/nuget/chocolatey/chocolatey.nuspec b/nuget/chocolatey/chocolatey.nuspec index dd257a9b8b..0e5650bd98 100644 --- a/nuget/chocolatey/chocolatey.nuspec +++ b/nuget/chocolatey/chocolatey.nuspec @@ -137,7 +137,7 @@ If you need the previous behavior, be sure to disable the feature `usePackageExi * Fix - Logger doesn't clear cached NullLoggers - see [#516](https://github.com/chocolatey/choco/issues/516) * Fix - DISM "/All" argument in the wrong position - see [#480](https://github.com/chocolatey/choco/issues/480) * Fix - Pro - Installing/uninstalling extensions should rename files in use - see [#594](https://github.com/chocolatey/choco/issues/594) - * Fix - Running Get-FileName in PowerShell 5 fails and sometimes causes package errors - see [#603](https://github.com/chocolatey/choco/issues/603) + * Fix - Running Get-WebFileName in PowerShell 5 fails and sometimes causes package errors - see [#603](https://github.com/chocolatey/choco/issues/603) * Fix - Merging assemblies on a machine running .Net 4.5 or higher produces binaries incompatible with .Net 4 - see [#392](https://github.com/chocolatey/choco/issues/392) * Fix - API - Incorrect log4net version in chocolatey.lib dependencies - see [#390](https://github.com/chocolatey/choco/issues/390) * [POSH Host] Fix - Message after Download progress is on the same line sometimes - see [#525](https://github.com/chocolatey/choco/issues/525) diff --git a/src/chocolatey.resources/chocolatey.resources.csproj b/src/chocolatey.resources/chocolatey.resources.csproj index 43c4e25c67..a6c0124ecf 100644 --- a/src/chocolatey.resources/chocolatey.resources.csproj +++ b/src/chocolatey.resources/chocolatey.resources.csproj @@ -48,7 +48,7 @@ - + @@ -140,6 +140,12 @@ + + + + + +