diff --git a/input/en-us/create/functions/index.md b/input/en-us/create/functions/index.md index de2a2d644e..3cd65ff19e 100644 --- a/input/en-us/create/functions/index.md +++ b/input/en-us/create/functions/index.md @@ -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 diff --git a/input/en-us/faqs.md b/input/en-us/faqs.md index 0701f315ca..6258c7ab1d 100644 --- a/input/en-us/faqs.md +++ b/input/en-us/faqs.md @@ -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?