Install-ChocolateyPath

NOTE: Administrative Access Required when -PathType 'Machine'.

This puts a directory to the PATH environment variable.

Syntax

Install-ChocolateyPath `
  -PathToInstall <String> `
  [-PathType {Process | User | Machine}] `
  [-IgnoredArguments <Object[]>] [<CommonParameters>]

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

Examples

EXAMPLE 1

Install-ChocolateyPath -PathToInstall "$($env:SystemDrive)\tools\gittfs"

EXAMPLE 2

Install-ChocolateyPath "$($env:SystemDrive)\Program Files\MySQL\MySQL Server 5.5\bin" -PathType 'Machine'

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 .

Function Reference

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

View the source for Install-ChocolateyPath