See https://github.com/chocolatey/choco for further development
Apache 2.0 - see docs/legal (just LEGAL in the zip folder)
##Please see the wiki
- .NET Framework 4.0
- PowerShell 2.0+
See docs/legal/CREDITS (just LEGAL/Credits in the zip folder)
[DEPRECATED - https://github.com/chocolatey/choco] Chocolatey NuGet - Like apt-get, but for windows.
Home Page: https://chocolatey.org
License: Apache License 2.0
See https://github.com/chocolatey/choco for further development
Apache 2.0 - see docs/legal (just LEGAL in the zip folder)
##Please see the wiki
See docs/legal/CREDITS (just LEGAL/Credits in the zip folder)
The windowpad package is a simple download zip and create shortcut script. It has a dependency on autohotkey, which I've done before. It has a two segment version (1.60
), which I've done before. When I try to debug the package, I get some goofy message
PS> cinst windowpad -source "$pwd"
=====================================================
Chocolatey (0.9.8.12) is installing windowpad (from D:\Users\Anthony) to "C:\Users\Anthon
y Mastrean\AppData\Roaming\Chocolatey\lib"
=====================================================
Package License Acceptance Terms
-------------------------
Please run chocolatey /? for full license acceptance verbage. By installing you accept th
e license for the package you are installing...
-------------------------
-------------------------
NuGet
-------------------------
Version string portion was too short or too long.
=====================================================
Chocolatey has finished installing windowpad
=====================================================
I tried messing with the autohotkey dependency version number (which I know isn't necessary) and it didn't help. I used NuGet directly and was able to unpack the nupkg (obviously, it didn't run the chocolateyInstall
). I put the autohotkey
dependency in the same source directory.
PS> nuget install windowpad -source "$pwd"
But it continues on correctly, so it's not a blocking issue
For a given package's version history on the chocolatey gallery page, the sorting of the versions is using a string based sorting rather then a numeric based one.
See http://chocolatey.org/packages/chocolatey
e.g., "Chocolatey 0.9.8.11" is sorted below "Chocolatey 0.9.8.9"
This would print the same as webpicmd /list /listoption:all
This should take in the nupkg file and an optional source (defaults to http://chocolatey.org/)
This effectively changes cinst to do the same as cinstm.
long as it ends in config
cuninst somepackage
gives the user a choice of what to remove
cuninst somepackage -version 1.23
removes just that version
This would reroute the batch link to the most up to date version. If there are no more versions, delete the batch file.
Look to see if there is an chocolateyUninstall.ps1 file. This file could actually remove applications from the computer. Of course the uninstaller would need to look at the version installed before running the uninstaller in case someone has upgraded.
Uninstall-ChocolateyPackage $packageName $possiblePathsToUninstaller
This may need helpers for the version
A link to help this idea: http://www.appdeploy.com/software/detail.asp?id=266176
Remove the stuff from lib folder as well.
Please create the chocolateyinstall
environment path on installation if it does not exist. It's useful to have when building certain packages that have to do custom work in the $env:chocolateyinstall\bin
path. (for an example, see the wim2vhd package)
Downloading http://chocolatey.org/packages/chocolatey/DownloadPackage to C:\DOCUME1\PABLOD1\CONFIG1\Temp\chocolatey\chocInstall\chocolatey.zip1\PABLOD
Extracting C:\DOCUME1\CONFIG1\Temp\chocolatey\chocInstall\chocolatey.zip to ...
Installing chocolatey on this machine
The term 'remove-module' is not recognized as a cmdlet, function, operable program, or script file. Verify the term and try again.
At C:\DOCUME1\PABLOD1\CONFIG~1\Temp\chocolatey\chocInstall\tools\chocolateyInstall.ps1:7 char:28
remove-module <<<< $moduleName -ErrorAction SilentlyContinue
import-module <<<< -name $psm1File;
This will allow someone to change the install directory without a lot of work.
This is to get allVersions of a package.
and possibly make it configurable
Now that you don't need to assert admin privileges for chocolateyinstall.ps1 prior to running it, there is no reason to pop a second window. The processes that need admin privileges will automatically pop a window and that is fine.
If you install Chocolatey using the easy install on the Chocolatey.org website, you don't get the NuGet.exe
on your command line.
iex ((new-object net.webclient).DownloadString("http://bit.ly/psChocInstall"))
If you go on and update (cup
) or install Chocolatey using Chocolatey (cinst chocolatey
), you get a new NuGet batch file in the %chocolateyInstall%\bin\
path.
It seems like you should get NuGet on your command line as part of the easy install.
Be able to suppress upgrades
http://en.wikipedia.org/wiki/Package_management_system#Upgrade_suppression
This is due to it looking at the wrong location when trying to find the latest version.
The NuGet way, nuget install packages.config
, only downloads the packages. The idea being, you've already installed the packages into the projects, you're just rebuilding a new machine/workspace. Obviously, chocolatey would have different semantics: rebuild a machine from this "manifest" (reinstall or update packages).
chocolatey install packages.config
or
cinst packages.config
Installing a package with a source path containing spaces fails in the NuGet command.
PS> cinst windowpad -source "D:\Users\Anthony Mastrean\Downloads"
=====================================================
Chocolatey (0.9.8.12) is installing windowpad (from D:\Users\Anthony) to "C:\Users\Anthon
y Mastrean\AppData\Roaming\Chocolatey\lib"
=====================================================
Package License Acceptance Terms
-------------------------
Please run chocolatey /? for full license acceptance verbage. By installing you accept th
e license for the package you are installing...
-------------------------
-------------------------
NuGet
-------------------------
Version string portion was too short or too long.
=====================================================
Chocolatey has finished installing windowpad
=====================================================
I want to point to a package and have it look to see if there are any packages installed that meet the standards of the package needs.
For instance, I need to see if ruby is installed. I don't care if it is the zipped version or the full blown install.
If it is not installed, then I would like to default to one of these two (the one that doesn't require an install).
Other use cases, install a pdf reader. I wouldn't necessarily care if it is adobe or foxit. I just want one of these to be installed.
If you do cver with ruby, and you have ruby.devkit installed, one of the results you will get back for the versions is devkit.1.2.3 (instead of only ruby versions).
This issue carries to trying to update and install missing since it is bringing back false positives.
I want to be able to override what the installer knows.
cinst somefile -installArgs "" -override
When an installer fails to install the package should not be put in the lib folder or be removed from the lib folder.
I tried to install completely fresh machine and started with package installation. Chocolatey didn't throw any errors on installation and also didn't install anything. After some research I found that NuGet.exe is not working, but it started to work after I installed Visual Studio and NuGet separately.
I know that it might be NuGet issue, but maybe some NuGet configuration is missing in Chocolatey installation.
If you do a cver on NUnit where it has a 2.5.9 and a 2.5.10, it will incorrectly tell you that 2.5.9 is the newer version.
I should be able to type
cwebpi someproduct
and have it install whatever the item is.
cwebpilist all and have it list the items.
All installs fail to complete, however they do report as installed.
PS C:\Users\John> cinst nodejs
=====================================================
Chocolatey (0.9.8.11) is installing nodejs (from https://go.microsoft.com/fwlink/?LinkID=206669) to "C:\NuGet\lib"
=====================================================
Package License Acceptance Terms
-------------------------
Please run chocolatey /? for full license acceptance verbage. By installing you accept the license for the package you a
re installing...
-------------------------
-------------------------
NuGet
-------------------------
'nodejs 0.5.9' already installed.
-------------------------
-------------------------
Chocolatey Runner (NODEJS)
-------------------------
-------------------------
Chocolatey Installation (chocolateyinstall.ps1)
-------------------------
Looking for chocolateyinstall.ps1 in folder C:\NuGet\lib\nodejs.0.5.9
If chocolateyInstall.ps1 is found, it will be run.
-------------------------
Running powershell -NoProfile -ExecutionPolicy unrestricted -Command "& import-module -name 'C:\NuGet\chocolateyInstall
\helpers\chocolateyInstaller.psm1'; & 'C:\NuGet\lib\nodejs.0.5.9\tools\chocolateyInstall.ps1'". This may take awhile and
permissions may need to be elevated, depending on the package.
Exception calling "Start" with "1" argument(s): "The system cannot find the file specified"
At C:\NuGet\chocolateyInstall\chocolatey.ps1:33 char:43
+ $s = [System.Diagnostics.Process]::Start <<<< ($psi);
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : DotNetMethodException
You cannot call a method on a null-valued expression.
At C:\NuGet\chocolateyInstall\chocolatey.ps1:34 char:17
+ $s.WaitForExit <<<< ();
+ CategoryInfo : InvalidOperation: (WaitForExit:String) [], RuntimeException
+ FullyQualifiedErrorId : InvokeMethodOnNull
[ERROR] Running powershell with -NoProfile -ExecutionPolicy unrestricted -Command "& import-module -name 'C:\NuGet\choc
olateyInstall\helpers\chocolateyInstaller.psm1'; & 'C:\NuGet\lib\nodejs.0.5.9\tools\chocolateyInstall.ps1'" was not succ
essful.
-------------------------
Executable Batch Links
-------------------------
Looking for executables in folder: C:\NuGet\lib\nodejs.0.5.9
Adding batch files for any executables found to a location on PATH. In other words the executable will be available from
ANY command line/powershell prompt.
-------------------------
There are no executables in the package.
-------------------------
=====================================================
Chocolatey has finished installing nodejs
=====================================================
PS C:\Users\John> cver
You have the latest version of chocolatey (0.9.8.11) based on (https://go.microsoft.com/fwlink/?LinkID=206669).
Name Value
---- -----
found 0.9.8.11
latestCompare 00000.00009.00008.00011
latest 0.9.8.11
foundCompare 00000.00009.00008.00011
PS C:\Users\John> cup all
You have the latest version of Console2 (2.0) based on (https://go.microsoft.com/fwlink/?LinkID=206669).
You have the latest version of grepwin (1.5.3) based on (https://go.microsoft.com/fwlink/?LinkID=206669).
You have the latest version of nodejs (0.5.9) based on (https://go.microsoft.com/fwlink/?LinkID=206669).
I found some documentation on the silent install options. (Haven't tried it) http://eecs.wsu.edu/paint.net/doc/2.6/Help/en/UnattendedInstallation.html
I tried to install cUrl, but the package was not found and thus the install failed.
When running cup all, I'm getting this:
curl does not appear to be on (https://go.microsoft.com/fwlink/?LinkID=206669). You have 7.21.7 installed. Interesting...
Something intelligent should be done with failed installs.
There is an error installing notepad++:
Failed to download package correctly. The contents of the package could not be verified.
This will be after 1.0. This is likely going to be a very involved process of getting intimate with the installation types themselves and install directories.
I'm not sure how to best get the "most recent version" link of hg downloaded.
I want to be able to have a powershell script that I can access anywhere on the system and not just from powershell by putting in a batch redirect that calls powershell and passes the script in question.
So if I had a powershell script named install-windowsimage.ps1, I could run this command during install and it would allow me to call install-windowsimage.bat with the arguments.
When I first tried to install chocolatey, I got this error in Powershell:
chocolateyInstall.ps1 cannot be loaded because the
execution of scripts is disabled on this system.
After seeing the rcommended get-help about_signing
(which is several pages long), I turned to DuckDuckGo and found this solution:
Set-ExecutionPolicy RemoteSigned
Now scripts can be executed from Powershell and the installation finishes successfully. Perhaps this information would be helpful to other users new to Powershell who want to install chocolatey. I did not see any mention of it in the installation section of the documentation.
This should take in the nuspec file if specified.
When installing any package ("cinst any_package"
) after creating folder structure and downloading PS files etc. and when it is time for "chocolateyInstall.ps1"
to be executed, nothing happens on my Windows 7 x64.
But when I browse to the "tools"
folder, rename "chocolateyInstall.ps1"
to "chocolateyinstall.ps1"
and "cinst any_package"
again, everything runs fine and package is installed successfully.
My OS language is English but my regional and keyboard settings are Turkish (and I am from Turkey).
I think this is because in Turkish uppercase "i" !== "I"
but uppercase "i" === "İ"
and lowercase "I" === "ı"
and so chocolatey can not find "chocolateyInstall.ps1"
Becuase my OS language is English, maybe this shouldn't be a problem but this is the only logical explanation I could think of.
The latest chocolatey update seems to be leaving some goofy stuff on the console. I did the update with cup
from my console. You can see that here.
Z:\> cup
The most recent version of chocolatey available from (https://go.microsoft.com/fwlink/?Link=206669) is 0.9.8.13. On your machine you have 0.9.8.12 installed.
=====================================================
Chocolatey (0.9.8.12) is installing chocolatey (from https://go.microsoft.com/fwlink/?LinkID=206669) to "D:\packages\lib"
=====================================================
Package License Acceptance Terms
-------------------------
Please run chocolatey /? for full license acceptance verbage. By installing you accept the license for the package you are installing...
-------------------------
-------------------------
NuGet
-------------------------
Successfully installed 'chocolatey 0.9.8.13'.
It did a lot of downloading and made my existing bat files portable. And you can see at the bottom, it leaves some text on the console. It looks like these might have been incorrectly escaped commands or output text.
-------------------------
Executable Batch Links
-------------------------
Looking for executables in folder: D:\packages\lib\chocolatey.0.9.8.13
Adding batch files for any executables found to a location on PATH. In other words the executable will be available from ANY command line/powershell prompt.
-------------------------
Adding D:\packages\bin\NuGet.bat and pointing to D:\packages\lib\chocolatey.0.9.8.13\tools\chocolateyInstall\NuGet.exe
-------------------------
=====================================================
Chocolatey has finished installing chocolatey
=====================================================
'rrentThread.CurrentUICulture' is not recognized as an internal or external command, operable program or batch file.
'import-module' is not recognized as an internal or external command, operable program or batch file.
The specified path is invalid.
The new chocolatey (0.9.8.13) processes existing bat files to make them portable. Then it puts a NuGet.bat
in the bin. That file is not portable.
@echo off
"D:\packages\lib\chocolatey.0.9.8.13\tools\chocolateyInstall\NuGet.exe" %*
This is due to NuGet 1.5 no longer reporting the version if you explicitly tell it what version you are looking for.
This should be a simple fix
As long as the source is not webpi, ruby, nuget.org, or chocolatey, I should be able to install all packages from a custom feed. This will greatly reduce the need to carry around and maintain a file for installations.
Refer to this chocolatey group discussion: How do I use Chocolatey with a private corporate network share based source?
This command
Install-ChocolateyPackage 'mypackage' 'EXE' '/S' '\\mylocalnas\gallery\myproduct.exe'
produces this error
Write-Error : acrview did not finish successfully. Boo to the chocolatey gods!
-----------------------
[ERROR] Property 'CookieContainer' cannot be found on this object; make sure it exists and is settable.
-----------------------
At D:\packages\chocolateyInstall\helpers\chocolateyInstaller.psm1:373 char:13
+ Write-Error <<<< $errorMessage
+ CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException
+ FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Write-Error
Property 'CookieContainer' cannot be found on this object; make sure it exists and is settable.
At D:\packages\chocolateyInstall\helpers\chocolateyInstaller.psm1:510 char:8
+ $req. <<<< CookieContainer = New-Object System.Net.CookieContainer
+ CategoryInfo : InvalidOperation: (:) [], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : PropertyAssignmentException
I want to be able to override what the installer knows.
cinst somefile -installArgs "" -override
I would love to pass cinst somepkg -notsilent so that it would pop up items for me.
I want to be able to call cinst someitem -installArgs "/D:c:\somwhere\else.pdb"
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.