Choco For Windows
I installed Chocolatey as per the instructions on the website (https://chocolatey.org/install).
The 'choco' command works fine when I run it normally on cmd but returns the following error when run as administrator:
The install choco install -y wget 7zip.commandline
fails if not run as administrator.
How do I fix 'not recognized' error in admin cmd?
Make that gold medal yours. Impress the judges with stellar gymnastics moves, including side aerials, triple full layouts, triple pikes, backward rolls, and more. Skyrim free pc full version 2012 olympic gymnastics results.
5 Answers
- First, ensure that you are using an administrative shell of command prompt(https://www.howtogeek.com/194041/how-to-open-the-command-prompt-as-administrator-in-windows-8.1/).
- Copy the below text into the command prompt.
@'%SystemRoot%System32WindowsPowerShellv1.0powershell.exe' -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command 'iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))' && SET 'PATH=%PATH%;%ALLUSERSPROFILE%chocolateybin'.
Then press enter key from the keyboard. After few seconds you get complete info about current installation.
If you don't see any errors. Type choco or choco -? now.
First Open the Command prompt as administrator and then run -
And then restart the Command prompt, now choco is successfully installed
I was able to get the installation to work using C:ProgramDatachocolateybinchoco.exe install -y wget 7zip.commandline
. I'm still wondering why the choco
command isn't working when cmd is run as administrator. I would appreciate any help. Cheers!
Hi for installing choco on your windows system, follow these steps:
- First open cmd as admistrator.
- copy this command in the cmd (as administrator):
@'%SystemRoot%System32WindowsPowerShellv1.0powershell.exe' -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command 'iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))' && SET 'PATH=%PATH%;%ALLUSERSPROFILE%chocolateybin'
This will download the required dependency for choco and install it in your windows system.
For cross check run the choco command, for ex:
The choco
environment variable
has been altered. I ran into a similar problem when I tried setting env variable
for Java SDK
, but I was quick to recognize it when I ran the commands
presented to me in the documentation which completely overwrites my env Path variable
.
If you are sure you've choco installed. Check your System variables
and look for Path variable
if it has some values like C:ProgramDatachocolateychoco.exe;C:ProgramDatachocolateybin
if not add
it.
And you can save you time by installing it. Installing via cmd line
Powershell:
Copy and Paste the code below to your PowerShell
OR Window CMD.exe:
After installation: run choco
you see the version of chocolatey installed. Mine
hopefully this help read more