Chocolatey in Windows Powershell

Asked

Viewed 147 times

2

I’m trying to use native windows Powershell commands to install Chocolatey packages but when I use a command like Get-ChocolateyVersion get the error message:

C: Program Files Windowspowershell Modules Chocolatey 0.0.48 Chocolatey.psm1:1597 character:9 + Throw "Chocolatey Software not found

However the file exists and is installed in the correct path except that my machine is in en-br so the folder is "Program Files" and not Program Files. However I tried to change the environment variable to point to the correct folder but it does not help anything once you execute the command it falls into the same error.

I tried to:

$env:ProgramFiles = "C:\Arquivos de Programas"

Set-Variable -Name ProgramFiles -Value "C:\Arquivos de Programas"

In both cases if I do echo $env:ProgramFiles it prints the value I put but if I run the command Get-ChocolateyVersion he points again the wrong way.

1 answer

0


Confirm that there is a system variable called ChocolateyInstall and that its value is the correct path to the folder where the Chocolatey is installed.

Example:

$env:ChocolateyInstall = "%ProgramData%\chocolatey"

Browser other questions tagged

You are not signed in. Login or sign up in order to post.