Skip to content

Commit 7d37b7a

Browse files
authored
Merge pull request #1054 from corbob/custom-directory
(#1031) Update wording of custom install location
2 parents c863211 + 1b37b82 commit 7d37b7a

File tree

3 files changed

+18
-6
lines changed

3 files changed

+18
-6
lines changed

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# build output
22
dist/
3+
bin/
4+
cache/
5+
input/
6+
obj/
7+
output/
8+
tools/
39

410
# generated types
511
.astro/

.vscode/settings.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,9 @@
9292
"windirstat",
9393
"xcopy"
9494
],
95+
"cSpell.enableFiletypes": [
96+
"mdx"
97+
],
9598
"languageToolLinter.languageTool.ignoredWordsInWorkspace": [
9699
"format-filesize",
97100
"get-packageparameters",

src/content/docs/en-us/choco/setup.mdx

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -714,14 +714,17 @@ See <Xref title="Installing Chocolatey Behind a Proxy Server" value="proxy-setti
714714

715715
### Installing to a different location
716716

717-
1. Create a __machine__ level (__user__ level will also work) environment variable named `ChocolateyInstall` and set it to the folder you want Chocolatey to install to prior to installation (this environment variable must be set globally or available to PowerShell- it is not enough to simply make it available to your current command prompt session).
717+
The Chocolatey installation script looks for the `ChocolateyInstall` environment variable in order to identify where it should install to. If this environment variable does not exist, it will install Chocolatey to the default location. In order to install to a non-default location, you should set this variable in a way that it is available in the process that will be running the install script. For example you could set the environment variable through the [Windows GUI](https://www.howtogeek.com/787217/how-to-edit-environment-variables-on-windows-10-or-11/), or you could use `setx`](https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/setx).
718+
719+
You can validate that PowerShell has the environment variable by running: `Write-Host $env:ChocolateyInstall`
720+
721+
1. Create an environment variable named `ChocolateyInstall` and set it to the folder you want Chocolatey to install to prior to installation.
718722
1. Don't use `"C:\Chocolatey"` unless necessary.
719-
1. Create the folder manually.
720723
1. If you have already installed (and want to change the location after the fact):
721-
* Follow the above steps.
722-
* Install Chocolatey again.
723-
* Copy/Move over the items from the old lib/bin directory.
724-
* Delete your old install directory.
724+
* Follow the above steps.
725+
* Install Chocolatey again.
726+
* Copy/Move over the items from the old lib/bin directory.
727+
* Delete your old install directory.
725728

726729
<Callout type="info">
727730
There is one really important consideration when installing Chocolatey to a non-default location: Chocolatey only locks down the permissions to Admins when installed to the default location `%PROGRAMDATA%\Chocolatey`, which means the same thing as `%SystemDrive%\ProgramData\Chocolatey`.

0 commit comments

Comments
 (0)