'How to change Chocolatey's install location?

I installed Rufus with Chocolatey and I couldn't find its install location. After some research, I found that it installed to the hidden "Program Files" directory. I could run it from PowerShell, but the normal Winkey+[appname] search won't work. Is there a way to resolve this so that I can open apps I install in Chocolatey without having to open it from Powershell Admin?



Solution 1:[1]

Note: I don't actually know how to complete what your asking in the text, So I'm just explaining what to do that you asked in the title.

There are 2 ways.

The first way is to create the enviroment value ChocolateyInstall before installing chocolatey and setting the value as where you want to install chocolatey

Step 1: Search Enviroment Variable On the start menu.

Step 2: Create an enviroment variable called ChocolateyInstall

Step 3: Set the value of the variable to where you wanna install Chocolatey (e.g. C:\Directory\Chocolatey)

And also there's the second way.

The second way is by creating a junction link.

Step 1: Open Command Prompt as Administrator

Step 2: Go to where chocolatey would install. (In your case I think it would be C:\Program Files)

C:\Directory> cd "C:\Program Files"

Step 3: Create the junction link To create the junction link you will run

mklink /d Chocolatey X:\Directory

In this case X:\Directory would be where you'd want to install Chocolatey.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 fg_