Get-ChocolateyPath

Get-ChocolateyPath

Get-ChocolateyPath

Retrieve the paths available to be used by maintainers of packages.

Syntax

Get-ChocolateyPath `
  -PathType <String> [<CommonParameters>]

Description

This function will attempt to retrieve the path according to the specified Path Type to a valid location that can be used by maintainers in certain scenarios.

Notes

Available in 1.2.0+.

Aliases

None

Examples

EXAMPLE 1


$path = Get-ChocolateyPath -PathType 'PackagePath'

Inputs

None

Outputs

  • This function outputs the full path stored accordingly with specified path type. If no path could be found, there is no output.

Parameters

-PathType <String>

The type of path that should be looked up. Available values are:

  • PackagePath - The path to the the package that is being installed. Typically C:\ProgramData\chocolatey\lib\<PackageName>
  • InstallPath - The path to where Chocolatey is installed. Typically C:\ProgramData\chocolatey
Property Value
Aliases type
Required? true
Position? 1
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

📝 NOTE This documentation has been automatically generated from Import-Module "$env:ChocolateyInstall\helpers\chocolateyInstaller.psm1" -Force; Get-Help Get-ChocolateyPath -Full.

View the source for Get-ChocolateyPath