Downloads:
620
Downloads of v 4.0.0:
239
Last Update:
20 Jul 2022
Package Maintainer(s):
Software Author(s):
- sangafabrice
Tags:
download-info extension github omaha sourceforge- Software Specific:
- Software Site
- Software Source
- Software License
- Software Docs
- Package Specific:
- Package Source
- Package outdated?
- Package broken?
- Contact Maintainers
- Contact Site Admins
- Software Vendor?
- Report Abuse
- Download
DownloadInfo Extension
- 1
- 2
- 3
4.0.0 | Updated: 20 Jul 2022
- Software Specific:
- Software Site
- Software Source
- Software License
- Software Docs
- Package Specific:
- Package Source
- Package outdated?
- Package broken?
- Contact Maintainers
- Contact Site Admins
- Software Vendor?
- Report Abuse
- Download
Downloads:
620
Downloads of v 4.0.0:
239
Maintainer(s):
Software Author(s):
- sangafabrice
DownloadInfo Extension 4.0.0
Legal Disclaimer: Neither this package nor Chocolatey Software, Inc. are affiliated with or endorsed by sangafabrice. The inclusion of sangafabrice trademark(s), if any, upon this webpage is solely to identify sangafabrice 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 DownloadInfo Extension, run the following command from the command line or from PowerShell:
To upgrade DownloadInfo Extension, run the following command from the command line or from PowerShell:
To uninstall DownloadInfo Extension, 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 download-info.extension --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 download-info.extension -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 download-info.extension -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 download-info.extension
win_chocolatey:
name: download-info.extension
version: '4.0.0'
source: INTERNAL REPO URL
state: present
See docs at https://docs.ansible.com/ansible/latest/modules/win_chocolatey_module.html.
chocolatey_package 'download-info.extension' do
action :install
source 'INTERNAL REPO URL'
version '4.0.0'
end
See docs at https://docs.chef.io/resource_chocolatey_package.html.
cChocoPackageInstaller download-info.extension
{
Name = "download-info.extension"
Version = "4.0.0"
Source = "INTERNAL REPO URL"
}
Requires cChoco DSC Resource. See docs at https://github.com/chocolatey/cChoco.
package { 'download-info.extension':
ensure => '4.0.0',
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 TheCakeIsNaOH on 10 Aug 2022.
Download information relative to updating an application hosted on GitHub, Omaha and SourceForge.
Function Get-DownloadInfo {
[CmdletBinding(DefaultParameterSetName='UseFile')]
Param (
[Parameter(
ParameterSetName='UseFile',
Position=0,
Mandatory=$true
)]
[string] $Path,
[Parameter(
ParameterSetName='UseHashtable',
Mandatory=$true
)]
[System.Collections.Hashtable] $PropertyList,
[ValidateSet('Blisk', 'Github', 'Mozilla', 'MSEdge', 'Omaha', 'Opera', 'SourceForge', 'Vivaldi')]
[string] $From = 'Github'
)
Begin {
Switch ($PSCmdlet.ParameterSetName) {
<#
Initialize configuration variables
#>
'UseHashtable' {
$PropertyList.Keys |
ForEach-Object { @{
Name = $_;
Value = $PropertyList[$_];
} } |
ForEach-Object { Set-Variable @_ }
}
Default {
Get-Content $Path |
ForEach-Object {
,($_ -split '=') |
ForEach-Object { @{
Name = $_[0].Trim();
Value = ($_[1] -replace '"').Trim();
} } |
ForEach-Object { Set-Variable @_ }
}
}
}
}
Process {
Switch ($From) {
'GitHub' {
<#
Configuration file --
RepositoryId = "repository_id"
AssetPattern = "asset_pattern"
#>
Try {
( @{
UseBasicParsing = $true;
Uri = "https://api.github.com/repos/$RepositoryId/releases/latest"
} |
ForEach-Object { Invoke-WebRequest @_ } ).Content |
Out-String | ConvertFrom-Json |
Select-Object -Property @{
Name = 'Version';
Expression = { $_.tag_name }
},@{
Name = 'Link';
Expression = {
,@($_.assets |
ForEach-Object {
If ($_.browser_download_url -match $AssetPattern) {
[PSCustomObject] @{
Url = [uri] $_.browser_download_url;
Size = $_.size
}
}
}) | ForEach-Object {
Add-Member -InputObject $_ -TypeName array -PassThru
}
}
} -Unique
}
Catch {}
}
'Omaha' {
<#
Configuration file --
UpdateServiceURL = "update_service_uerl"
ApplicationID = "application_guid"
OwnerBrand = "owner_brand_code"
ApplicationSpec = "application_spec"
#>
$RequestBody = [xml] @"
<request
protocol="$(Switch ($Protocol) {
{ ![string]::IsNullOrEmpty($_) } { $_ }
Default { '3.1' }
})"
updater="Omaha"
updaterversion="0"
shell_version="0"
ismachine="1"
sessionid="{00000000-0000-0000-0000-000000000000}"
installsource="taggedmi"
testsource="auto"
requestid="{00000000-0000-0000-0000-000000000000}"
dedup="cr"
domainjoined="0">
<os
platform="win"
version="$([Environment]::OSVersion.Version)"
sp=""
arch="$(Switch ($OSArch) {
{$_ -in @('x86','x64')} { $_ }
Default { If ([Environment]::Is64BitOperatingSystem) { 'x64' } Else { 'x86' } }
})"/>
<app
appid=""
version=""
nextversion=""
ap=""
lang="$((Get-Culture).Name)"
brand=""
client=""
installage="-1"
installdate="-1">
<updatecheck/>
</app>
</request>
"@
{
Param ($Xpath, $Value)
($RequestBody.request | Select-Xml $Xpath).Node.Value = $Value
} | ForEach-Object {
& $_ '//@appid' $ApplicationID
& $_ '//@brand' $OwnerBrand
& $_ '//@ap' $ApplicationSpec
}
Try {
( @{
UseBasicParsing = $true;
Uri = $UpdateServiceURL;
Method = 'POST';
UserAgent = 'winhttp';
Body = $RequestBody.OuterXml
} |
ForEach-Object { Invoke-WebRequest @_ } ).Content |
Out-String |
ForEach-Object {
$XmlResponse = ([xml] $_).response
{
Param ($Xpath)
($XmlResponse | Select-Xml $Xpath).Node.Value |
Select-Object -Unique
}
} | Select-Object -Property @{
Name = 'Version';
Expression = { & $_ '//@version' }
},@{
Name = 'Link';
Expression = {
$SetupName = & $_ '//@name'
& $_ '//@codebase' |
ForEach-Object { [uri] "$_$(If ($_[-1] -ne '/') {'/'})$SetupName" }
}
},@{
Name = 'Checksum';
Expression = { (& $_ '//@hash_sha256').ToUpper() }
},@{
Name = 'Size';
Expression = { & $_ '//@size' }
}
}
Catch {}
}
'SourceForge' {
<#
Configuration file --
RepositoryId = "repository_id"
PathFromVersion = "relative_path_from_version"
#>
Try {
@{
UseBasicParsing = $true;
Uri = "https://sourceforge.net/projects/$RepositoryId/files/latest/download";
Method = 'HEAD';
UserAgent = 'curl';
MaximumRedirection = 0;
ErrorAction = 'SilentlyContinue'
} + $(
Switch($PSVersionTable.PSVersion.Major) {
7 { @{ SkipHttpErrorCheck = $true; } }
Default { @{} }
}
) |
ForEach-Object { Invoke-WebRequest @_ } |
ForEach-Object {
If($_.StatusCode -eq 302) {
[uri] [string] $_.Headers.Location |
Select-Object -Property @{
Name = 'Version';
Expression = {
$_.Segments[-(2 + ($PathFromVersion.Split('/', [StringSplitOptions]::RemoveEmptyEntries)).Length)] -replace '/'
}
},@{
Name = 'Link';
Expression = { $_ }
}
} Else { Throw }
}
}
Catch {}
}
'Mozilla' {
<#
Configuration file --
RepositoryId = 'repository_id'
OSArch = 'x86'|'x64'
VersionDelim = 'b'|'.'|$Null
#>
Try {
If ($VersionDelim -in '.','\.') { $VersionDelim = $Null }
$UriBase = "https://releases.mozilla.org/pub/$RepositoryId/releases/"
(Invoke-WebRequest $UriBase).Links.href |
ForEach-Object {
[void] ($_ -match "/(?<Version>[0-9\.$VersionDelim]+)/$")
Switch ($Matches.Version -replace 'b','.') {
{ ![string]::IsNullOrEmpty($_) } {
[PSCustomObject] @{
VersionString = $Matches.Version
Version = [version] $_
}
} }
} |
Sort-Object -Descending -Property Version |
Select-Object @{
Name = 'Resource'
Expression = {
$Culture = Get-Culture
$Lang = $Culture.TwoLetterISOLanguageName
$VersionString = $_.VersionString
$UriBase = "$UriBase$VersionString"
$OSArch = $(Switch ($OSArch) { 'x64' { 'win64' } 'x86' { 'win32' } })
$LangInstallers =
"$(Invoke-WebRequest "$UriBase/SHA512SUMS" -Verbose:$False)" -split "`n" |
ForEach-Object {
,@($_ -split ' ',2) |
ForEach-Object {
[pscustomobject] @{
Checksum = $_[0]
Link = "$($_[1])".Trim()
}
} |
Where-Object Link -Like "$OSArch/*$VersionString.exe"
}
$GroupInstaller = $LangInstallers | Where-Object Link -Like "$OSArch/$Lang*.exe"
Switch ($GroupInstaller.Count) {
0 { $GroupInstaller = $LangInstallers | Where-Object Link -Like "$OSArch/en-US/*" }
{ $_ -gt 1 } {
[void] ($Culture.Name -match '\-(?<Country>[A-Z]{2})$')
$TempLine = $GroupInstaller | Where-Object Link -Like "$OSArch/$Lang-$($Matches.Country)/*"
If ([string]::IsNullOrEmpty($TempLine)) {
If ($Lang -ieq 'en') { $TempLine = $GroupInstaller | Where-Object Link -Like "$OSArch/en-US/*" }
Else { $TempLine = $GroupInstaller[0] }
}
$GroupInstaller = $TempLine
}
}
$GroupInstaller.Link = "$UriBase/$($GroupInstaller.Link)"
$GroupInstaller
}
},@{
Name = 'Version'
Expression = { $_.VersionString }
} -First 1 |
Select-Object Version -ExpandProperty Resource
} Catch { }
}
'Blisk' {
<#
Configuration file --
#>
Try {
@{
Uri = 'https://blisk.io/download/?os=win'
UserAgent = 'NSISDL/1.2 (Mozilla)'
MaximumRedirection = 0
SkipHttpErrorCheck = $True
ErrorAction = 'SilentlyContinue'
Verbose = $False
} | ForEach-Object { (Invoke-WebRequest @_).Headers.Location } |
Select-Object @{
Name = 'Version'
Expression = {
[void] ($_ -match "BliskInstaller_(?<Version>(\d+\.){3}\d+)\.exe$")
[version] $Matches.Version
}
},@{
Name = 'Link'
Expression = { $_ }
} -Unique |
Where-Object { ![string]::IsNullOrEmpty($_.Version) } |
Sort-Object -Descending -Property Version |
Select-Object -First 1
} Catch { }
}
'MSEdge' {
<#
Configuration file --
OSArch = 'x86'|'x64'
#>
Try {
$UriBasis = "https://msedge.api.cdp.microsoft.com/api/v1.1/contents/Browser/namespaces/Default/names/msedge-stable-win-$OSArch/versions/"
$WebRequestArgs = {
Param($ActionString)
Return @{
Uri = "$UriBasis$ActionString"
UserAgent = 'winhttp'
Method = 'POST'
Body = '{"targetingAttributes":{}}'
Headers = @{ 'Content-Type' = 'application/json' }
Verbose = $False
}
}
& $WebRequestArgs 'latest?action=select' |
ForEach-Object {
Invoke-WebRequest @_ |
ConvertFrom-Json |
ForEach-Object {
$Version = $_.ContentId.Version
& $WebRequestArgs "$Version/files?action=GenerateDownloadInfo" |
ForEach-Object {
(Invoke-WebRequest @_).Content |
ConvertFrom-Json |
Select-Object @{
Name = 'Size'
Expression = { $_.SizeInBytes }
},@{
Name = 'Version'
Expression = { $Version }
},@{
Name = 'Name'
Expression = { $_.FileId }
},@{
Name = 'Link'
Expression = { $_.Url }
} |
Sort-Object -Property Size -Descending |
Select-Object Version,Link,Name -First 1
}
}
}
} Catch { }
}
'Vivaldi' {
<#
Configuration file --
OSArch = 'x86'|'x64'
#>
Try {
(Invoke-WebRequest 'https://vivaldi.com/download/' -Verbose:$False).Links.href -like '*.exe' |
Select-Object @{
Name = 'Version'
Expression = {
[void] ($_ -match "Vivaldi\.(?<Version>(\d+\.){3}\d+)$(If($OSArch -eq 'x64'){ '\.x64' })\.exe$")
[version] $Matches.Version
}
},@{
Name = 'Link'
Expression = { $_ }
} -Unique |
Where-Object { ![string]::IsNullOrEmpty($_.Version) } |
Sort-Object -Descending -Property Version |
Select-Object -First 1
} Catch { }
}
'Opera' {
<#
Configuration file --
RepositoryID = 'repository_id'
OSArch = 'x86'|'x64'
FormatedName = 'formatted_name'
#>
Try {
$UriBase = "https://get.geo.opera.com/pub/$RepositoryID/"
(Invoke-WebRequest $UriBase -Verbose:$False).Links.href -notlike '../' |
ForEach-Object { [version]($_ -replace '/') } |
Sort-Object -Descending -Unique |
Select-Object @{
Name = 'Version'
Expression = { "$_" }
},@{
Name = 'Link'
Expression = { "$UriBase$_/win/${FormatedName}_$($_)_Setup$(If($OSArch -eq 'x64'){ '_x64' }).exe" }
} -First 1 |
Select-Object Version,Link,@{
Name = 'Checksum';
Expression = { "$(Invoke-WebRequest "$($_.Link).sha256sum" -Verbose:$False)" }
}
} Catch { }
}
}
}
}
Export-ModuleMember -Function 'Get-DownloadInfo'
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 |
---|---|---|---|---|
DownloadInfo Extension 4.0.0 | 239 | Wednesday, July 20, 2022 | Approved | |
DownloadInfo Extension 3.2.0 | 60 | Saturday, July 2, 2022 | Approved | |
DownloadInfo Extension 3.1.7 | 64 | Sunday, June 26, 2022 | Approved | |
DownloadInfo Extension 3.1.6 | 105 | Sunday, June 12, 2022 | Approved | |
DownloadInfo Extension 3.1.4 | 54 | Friday, June 10, 2022 | Approved | |
DownloadInfo Extension 3.1.3 3.1.3 | 48 | Thursday, June 9, 2022 | Approved |
© 2022 SangaFabrice. All rights reserved.
Add download info from Mozilla.
This package has no dependencies.
Ground Rules:
- This discussion is only about DownloadInfo Extension and the DownloadInfo Extension 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 DownloadInfo Extension, 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.