Downloads:
21,202
Downloads of v 0.2:
6,140
Last Update:
17 May 2023
Package Maintainer(s):
Software Author(s):
- bcurran3
Tags:
bcurran3 choco protocol cinst chocolateasy winconfig(unofficial) choco:// Protocol support
- 1
- 2
- 3
0.2 | Updated: 17 May 2023
Downloads:
21,202
Downloads of v 0.2:
6,140
Maintainer(s):
Software Author(s):
- bcurran3
(unofficial) choco:// Protocol support 0.2
Legal Disclaimer: Neither this package nor Chocolatey Software, Inc. are affiliated with or endorsed by bcurran3. The inclusion of bcurran3 trademark(s), if any, upon this webpage is solely to identify bcurran3 goods or services and not for commercial purposes.
- 1
- 2
- 3
All Checks are Passing
3 Passing Tests
Deployment Method: Individual Install, Upgrade, & Uninstall
To install (unofficial) choco:// Protocol support, run the following command from the command line or from PowerShell:
To upgrade (unofficial) choco:// Protocol support, run the following command from the command line or from PowerShell:
To uninstall (unofficial) choco:// Protocol support, run the following command from the command line or from PowerShell:
Deployment Method:
This applies to both open source and commercial editions of Chocolatey.
1. Enter Your Internal Repository Url
(this should look similar to https://community.chocolatey.org/api/v2/)
2. Setup Your Environment
1. Ensure you are set for organizational deployment
Please see the organizational deployment guide
2. Get the package into your environment
Option 1: Cached Package (Unreliable, Requires Internet - Same As Community)-
Open Source or Commercial:
- Proxy Repository - Create a proxy nuget repository on Nexus, Artifactory Pro, or a proxy Chocolatey repository on ProGet. Point your upstream to https://community.chocolatey.org/api/v2/. Packages cache on first access automatically. Make sure your choco clients are using your proxy repository as a source and NOT the default community repository. See source command for more information.
- You can also just download the package and push it to a repository Download
-
Open Source
-
Download the package:
Download - Follow manual internalization instructions
-
-
Package Internalizer (C4B)
-
Run: (additional options)
choco download choco-protocol-support --internalize --source=https://community.chocolatey.org/api/v2/
-
For package and dependencies run:
choco push --source="'INTERNAL REPO URL'"
- Automate package internalization
-
Run: (additional options)
3. Copy Your Script
choco upgrade choco-protocol-support -y --source="'INTERNAL REPO URL'" [other options]
See options you can pass to upgrade.
See best practices for scripting.
Add this to a PowerShell script or use a Batch script with tools and in places where you are calling directly to Chocolatey. If you are integrating, keep in mind enhanced exit codes.
If you do use a PowerShell script, use the following to ensure bad exit codes are shown as failures:
choco upgrade choco-protocol-support -y --source="'INTERNAL REPO URL'"
$exitCode = $LASTEXITCODE
Write-Verbose "Exit code was $exitCode"
$validExitCodes = @(0, 1605, 1614, 1641, 3010)
if ($validExitCodes -contains $exitCode) {
Exit 0
}
Exit $exitCode
- name: Install choco-protocol-support
win_chocolatey:
name: choco-protocol-support
version: '0.2'
source: INTERNAL REPO URL
state: present
See docs at https://docs.ansible.com/ansible/latest/modules/win_chocolatey_module.html.
chocolatey_package 'choco-protocol-support' do
action :install
source 'INTERNAL REPO URL'
version '0.2'
end
See docs at https://docs.chef.io/resource_chocolatey_package.html.
cChocoPackageInstaller choco-protocol-support
{
Name = "choco-protocol-support"
Version = "0.2"
Source = "INTERNAL REPO URL"
}
Requires cChoco DSC Resource. See docs at https://github.com/chocolatey/cChoco.
package { 'choco-protocol-support':
ensure => '0.2',
provider => 'chocolatey',
source => 'INTERNAL REPO URL',
}
Requires Puppet Chocolatey Provider module. See docs at https://forge.puppet.com/puppetlabs/chocolatey.
4. If applicable - Chocolatey configuration/installation
See infrastructure management matrix for Chocolatey configuration elements and examples.
This package was approved by moderator gep13 on 22 May 2023.
Implements installing of Chocolatey packages from the web using choco:// Protocol.
WHO IS THIS FOR?
choco-protocol-support is designed for those who aren't comfortable with the Command Prompt or just don't like to type much. choco-protocol-support allows you to install Chocolatey packages by simply clicking choco:// URLs in your web browser. choco-protocol-support is also useful for support professionals who know the difficulty of getting end users to type in commands correctly. Now you can give end users a URL via e-mail or corporate software webpage to click and have a Chocolatey package installed!
If you like the convienance of this package, you should also check out Install Chocolatey Packages from your Web Browser which is very similar in concept as well as (unofficial) Chocolatey Shortcuts (Config). All three of these make installing Chocolatey packages very user friendly.
HOW DOES IT WORK?
choco-protocol-support configures Windows to use choco://packagename URLs and pass them along to choco-protocol-support.ps1 which then processes the URL and runs "choco install" or "choco upgrade" to install or upgrade the package. This ability will be baked natively into a future version of Chocolatey and then this package can be retired.
USAGE INSTRUCTIONS:
Just click a choco://packagename URL on a web page and the package will install after one or two approval clicks.
Browser examples: Chrome | Firefox | Opera
Easy peasy, Chocolateasy!
INTRODUCING THE FIRST choco:// URLS ON THE INTERNET:
(AKA Other fine 3rd party Chocolatey utilities by BCURRAN3)
choco://instchoco - (unofficial) InstChoco - The ULTIMATE Chocolatey and Chocolatey packages (re)installer!
choco://choco-package-list-backup - (unofficial) Choco Package List Backup to Local and Cloud
choco://choco-cleaner - (unofficial) Choco Cleaner
choco://choco-upgrade-all-at - (unofficial) Choco Upgrade All at
choco://choco-shortcuts-winconfig - (unofficial) Chocolatey Shortcuts
choco://chocolatey-toast-notifications.extension - (unofficial) Chocolatey Toast Notifications
choco://chocolatey-preinstaller-checks.extension - (unofficial) Chocolatey Preinstaller Checks
choco://choco-install-packages-from-web-winconfig - (unofficial) Install Chocolatey Packages from your Web Browser
WARNING: Only install one package at a time until such time as Chocolatey is multi-instance aware or it will corrupt itself. (REFERENCE)
Read the Release Notes for a practical use you can use now.
If you find choco-protocol-support useful, please consider donating:
https://www.paypal.me/bcurran3donations or become a patron at https://www.patreon.com/bcurran3
# choco-protocol-support.ps1 Copyleft 2017-2023 by Bill Curran AKA BCURRAN3
# LICENSE: GNU GPL v3 - https://www.gnu.org/licenses/gpl.html
# Suggestions? Problems? Open a GitHub issue at https://github.com/bcurran3/ChocolateyPackages/issues
param(
[Parameter()]
[string]$chocoprotocolURL
)
$chocopackageoptions=$null
$installarguments=$null
$params=$null
$upgrade=$false
$version=$null
$ErrorActionPreference = 'Continue'
Write-Host "Choco-Protocol-Support.ps1 v0.2 (2023-05-17) - install Chocolatey packages from URLs" -Foreground White
Write-Host "Copyleft 2017-2023 Bill Curran ([email protected]) - free for personal and commercial use`n" -Foreground White
if (!($chocoprotocolURL)){Write-Warning "choco URL not provided, nothing to do!"; return}
Write-Host " ** Processing $chocoprotocolURL" -ForegroundColor Magenta
$chocoprotocolURL=$chocoprotocolURL.trimend('/')
$chocoprotocolURL=$chocoprotocolURL.replace('choco://','')
[array]$chocoprotocolURL=$chocoprotocolURL.split("/")
$packagename=($chocoprotocolURL[0])
for($num=0; $num -lt $chocoprotocolURL.count; $num++) {
if ($chocoprotocolURL[$num] -match 'version=') {$version=($chocoprotocolURL[$num]); $version=$version.replace('version=','')}
if ($chocoprotocolURL[$num] -match 'v=') {$version=($chocoprotocolURL[$num]); $version=$version.replace('v=','')}
if ($chocoprotocolURL[$num] -match 'params=') {($params=$chocoprotocolURL[$num]); $params=$params.replace('params=','')}
if ($chocoprotocolURL[$num] -match 'installarguments=') {($installarguments=$chocoprotocolURL[$num]); $installarguments=$installarguments.replace('arguments=','')}
if ($chocoprotocolURL[$num] -match 'source=') {($source=$chocoprotocolURL[$num]); $source=$source.replace('source=','')}
}
if (Test-Path $env:ChocolateyInstall\lib\$packagename\$packagename.nuspec) {
[xml]$nuspecFile = Get-Content "$env:ChocolateyInstall\lib\$packagename\$packagename.nuspec"
$OldVersion = $nuspecFile.package.metadata.version
$upgrade=$true
}
if (!$upgrade) {
Write-Host " ** INSTALLING $packagename" -NoNewline -ForegroundColor Magenta
if ($version){Write-Host " v$version" -NoNewline -Foreground Magenta}
} else {
Write-Host " ** UPGRADING $packagename" -NoNewline -ForegroundColor Magenta
if ($version){Write-Host " v$OldVersion to v$version" -NoNewline -Foreground Magenta}
}
if ($params){Write-Host " params: $params" -NoNewline -Foreground Magenta}
if ($installarguments){Write-Host " install arguments: $installarguments" -NoNewline -Foreground Magenta}
if ($source){Write-Host " source: $source" -NoNewline -Foreground Magenta}
if (!$upgrade) {$chocopackagecommand='install'} else {$chocopackagecommand='upgrade'}
if ($version) {$chocopackageoptions=$chocopackageoptions + " --version=$version"}
Start-Process -Filepath "$env:ChocolateyInstall\choco.exe" -ArgumentList "$chocopackagecommand -y $packagename $chocopackageoptions" -Wait -Verb RunAs
Write-Host "`n`nFound choco-protocol-support.ps1 useful?" -ForegroundColor White
Write-Host "Buy me a beer at https://www.paypal.me/bcurran3donations" -ForegroundColor White
Write-Host "Become a patron at https://www.patreon.com/bcurran3" -ForegroundColor White
Start-Sleep -s 5
# TDL
# error checking for malformed URLs
# add parameters, install arguments, and source support (Going to need a LOT of difficult parsing!)
# MAYBE a config file that allows toggling of parameters, install arguments, source, etc.
# Theoretically possible to add all choco install options and switches, but why?
$ErrorActionPreference = 'Stop'
$packageName = 'choco-protocol-support'
$scriptDir = "$(Get-ToolsLocation)\BCURRAN3"
New-PSDrive -Name HKCR -PSProvider Registry -Root HKEY_CLASSES_ROOT -ea SilentlyContinue | Out-Null
Remove-Item -Path "HKCR:choco" -Recurse –Force | Out-Null
Remove-Item "$env:ChocolateyInstall\bin\choco-protocol-support.bat" -Force -ErrorAction SilentlyContinue
Remove-Item "$scriptDir\choco-protocol-support.*" -Force -ErrorAction SilentlyContinue | Out-Null
Log in or click on link to see number of positives.
In cases where actual malware is found, the packages are subject to removal. Software sometimes has false positives. Moderators do not necessarily validate the safety of the underlying software, only that a package retrieves software from the official distribution point and/or validate embedded software against official distribution point (where distribution rights allow redistribution).
Chocolatey Pro provides runtime protection from possible malware.
Add to Builder | Version | Downloads | Last Updated | Status |
---|---|---|---|---|
(unofficial) choco:// Protocol support 0.2 | 6140 | Wednesday, May 17, 2023 | Approved | |
(unofficial) choco:// Protocol support 0.0.1.1 | 5673 | Friday, April 8, 2022 | Approved | |
(unofficial) choco:// Protocol support 0.0.1 | 9352 | Wednesday, December 26, 2018 | Approved |
Public Domain
Sounds cool but where can I use it now?
You can install any Chocolatey package from the Chocolatey Community Repository website using Chrome with the help of BananaAcid's Chocolatey Appstore Theme for Chrome (unofficial)! Chrome Web Store direct link
CHANGELOG:
- 0.2 - Rewritten in PowerShell, changed use of cinst.exe to choco.exe (install) for Chocolatey v2 compatibility, sudo dependency removed as no longer needed, added version support, now checks for the package and uses choco upgrade instead of choco install when appropriate
- 0.0.1.1 - Removed Chocolatey dependency as Chocolatey v1.0 has been released and missed the 1.x milestone of becoming multi-instance aware and no new known goal. Added gsudo support.
- 0.0.1 - Initial release.
ROADMAP:
- Add parameters, install arguments, and source support (Going to need a LOT of difficult parsing for escaping!)
- Add a config file that allows setting of default parameters, install arguments, source, etc.
- Error checking for malformed URLs (Low priority, this resposibility should fall on the webmaster.)
- Theoretically it's possible to add all choco install options and switches, but why?
This package has no dependencies.
Ground Rules:
- This discussion is only about (unofficial) choco:// Protocol support and the (unofficial) choco:// Protocol support package. If you have feedback for Chocolatey, please contact the Google Group.
- This discussion will carry over multiple versions. If you have a comment about a particular version, please note that in your comments.
- The maintainers of this Chocolatey Package will be notified about new comments that are posted to this Disqus thread, however, it is NOT a guarantee that you will get a response. If you do not hear back from the maintainers after posting a message below, please follow up by using the link on the left side of this page or follow this link to contact maintainers. If you still hear nothing back, please follow the package triage process.
- Tell us what you love about the package or (unofficial) choco:// Protocol support, or tell us what needs improvement.
- Share your experiences with the package, or extra configuration or gotchas that you've found.
- If you use a url, the comment will be flagged for moderation until you've been whitelisted. Disqus moderated comments are approved on a weekly schedule if not sooner. It could take between 1-5 days for your comment to show up.