Closed redactedscribe closed 2 weeks ago
I suspect what can be happening here:
In order to work properly, if UniGetUI detects that chocolatey is not installed, and that the user has chocolatey enabled, it creates the required Environment Variables in order for chocolatey to work.
Therefore, when attempting to install chocolatey again, the installer picks those variables and follows them. Chocolatey gets installed on the old location.
Then, UniGetUI attempts to migrate Chocolatey to the new location (see your logs), and apparent is not updating the environment path variables accordingly, and then chocolatey is getting installed again on the old location.
I will try to fix this
Ah, an environment variable. That makes sense. I had a look:
Variable: chocolateyinstall
Value: C:\Users\User\AppData\Local\Programs\WingetUI\choco-cli
UniGetUI also adds C:\Users\User\AppData\Local\UniGetUI\Chocolatey\bin
to PATH
.
After removing chocolateyinstall
and the UniGetUI path from PATH
, winget install chocolatey
installs to C:\ProgramData\chocolatey now. I will see what UniGetUI thinks of this.
Result: With Use system Chocolatey disabled, Chocolatey is not found. Enabling Use system Chocolatey now finds the system one:
[01/07/2024 20:56:01] ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
█▀▀▀▀▀▀▀▀▀▀▀▀▀ MANAGER LOADED ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
█ Name: Chocolatey
█ Enabled: True
█ Found: True
█ Fancye exe name: choco.exe
█ Executable path: C:\ProgramData\chocolatey\bin\choco.exe
█ Call arguments:
█ Version:
█ 2.3.0
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
Thanks @marticliment.
UniGetUI also adds
C:\Users\User\AppData\Local\UniGetUI\Chocolatey\bin
toPATH
This is expected. Perhaps I need to add the chocolateyinstall
variable to the chocolatey migrator
Please confirm these before moving forward
UniGetUI Version
3.1.0 beta 1
Windows version, edition and architecture
Windows 11 Pro
Describe your issue
I'm not sure what's happening here, but I'm attempting to install Chocolatey onto my system so that UniGetUI can use a system choco.exe. To do this, I'm using winget.exe directly via a console:
winget install chocolatey
which installs https://github.com/chocolatey/choco/releases/download/2.3.0/chocolatey-2.3.0.0.msi. For some reason I can't understand, this is getting installed to %LOCALAPPDATA%\Programs\WingetUI\choco-cli when the two projects Chocolatey and UniGetUI (WingetUI) are unrelated.Because it looks like UniGetUI is somehow redirecting the Chocolatey MSI installation to install to %LOCALAPPDATA%\Programs\WingetUI\choco-cli, when re-lauching UniGetUI it does a bunch of copies from this path to the new %LOCALAPPDATA%\UniGetUI\Chocolatey path. This means even though I am trying to install Chocolatey to the system, UniGetUI is copying it to the normal bundled Chocolatey's location and using that instead.
Before installing Chocolatey, UniGetUI could not find the exe. After installation, it can, but it copies it to the bundled location and uses that, even though "Use system Chocolatey" has been enabled throughout this whole process.
I'm confused.
Steps to reproduce the issue
winget install chocolatey
.UniGetUI Log
Package Managers Logs
After step 5, this is the log state:
Relevant information
No response
Screenshots and videos
No response