Skip to content

Commit

Permalink
(chocolatey#170) Mention ChocolateyPackageInstallLocation as a env va…
Browse files Browse the repository at this point in the history
…riable

It is set as available in 0.9.10 or newer, see chocolatey/choco#689
  • Loading branch information
TheCakeIsNaOH committed Apr 20, 2021
1 parent 8388b56 commit eab5b03
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions input/en-us/create/functions/index.md
Expand Up @@ -148,6 +148,7 @@ The following are more advanced settings:
* OS_NAME - The reported name of the OS. (0.9.9+)
* IS_PROCESSELEVATED = Is the process elevated? (0.9.9+)
* ChocolateyToolsLocation - formerly 'ChocolateyBinRoot' ('ChocolateyBinRoot' will be removed with Chocolatey v2.0.0), this is where tools being installed outside of Chocolatey packaging will go. (0.9.10+)
* ChocolateyPackageInstallLocation - Install location of the software that the package installs. Displayed at the end of the package install. (0.9.10+)

#### Set By Options and Configuration

Expand Down
10 changes: 10 additions & 0 deletions input/en-us/faqs.md
Expand Up @@ -325,6 +325,16 @@ Well, if you are not creating packages for the community package repository, you

If you are on a licensed edition of Chocolatey, you can turn on Package Reducer and the first two items above no longer take up any significant space. This can reduce space usage in the order of GBs for some installations of Chocolatey. See [Package Reducer](xref:package-reducer) for more details.

### The install location displayed is incorrect or missing.

For packages that run installers, this can be be caused by installer for the software not setting it's install location.
For portable packages, it can be caused by not using the built in archive PowerShell helpers (e.g. because the software is not inside an archive) or by moving the extracted files after using an archive helper.

The install location which is displayed can be manually set in the `ChocolateyInstall.ps1` with the `$Env:ChocolateyPackageInstallLocation` environment variable.

If you are setting this variable in an installer package, do not hard code it, but instead get the location via checking the uninstall keys in the registry or similar.
The problem is that if this is hard coded for a package that runs an installer, it will display an incorrect location if the install location is changed manually by install arguments or via the licensed ubiquitous install directory switch.

## Videos / Reference

### Where can I learn more?
Expand Down

0 comments on commit eab5b03

Please sign in to comment.