Chocolatey in Windows Powershell

2

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

  

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

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

I've tried:

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

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

In both cases if I make echo $env:ProgramFiles it prints the value I put but if I run the command Get-ChocolateyVersion it points back to the wrong path.

    
asked by anonymous 03.03.2018 / 16:54

1 answer

0

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

Example:

$env:ChocolateyInstall = "%ProgramData%\chocolatey"
    
13.08.2018 / 09:39