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.