Skip to content

Commit

Permalink
Closes #3615
Browse files Browse the repository at this point in the history
  • Loading branch information
tunisiano187 committed May 21, 2024
1 parent 4f8d9ee commit d4fa716
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 27 deletions.
20 changes: 1 addition & 19 deletions automatic/adwcleaner/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,7 @@

---

---

### [choco://adwcleaner](choco://adwcleaner)
To use choco:// protocol URLs, install [(unofficial) choco:// Protocol support ](https://chocolatey.org/packages/choco-protocol-support)

---


![AdwCleaner screenshot](https://cdn.staticaly.com/gh/bcurran3/ChocolateyPackages/master/adwcleaner/adwcleaner_screenshot.png)
![AdwCleaner screenshot](https://cdn.jsdelivr.net/gh/tunisiano187/Chocolatey-packages@4f8d9eeaaac95fc3932bf0c438d5ff33c6f11526/automatic/adwcleaner/adwcleaner_screenshot.png)

## Fast results. Powerful cleaning.

Expand All @@ -36,16 +28,6 @@ Scans your computer in seconds. Clean your computer in less time than it takes t

Doesn’t use much memory or processor power, and there’s nothing to install. Just download, launch, and click to scan. It’s that simple.

**[PACKAGE NOTES](https://github.com/bcurran3/ChocolateyPackages/blob/master/adwcleaner/readme.md)**



---

**Click here to [Patreon-ize](https://www.patreon.com/bcurran3) the package maintainer.**

---

---

#### [choco://adwcleaner](choco://adwcleaner)
Expand Down
16 changes: 8 additions & 8 deletions automatic/adwcleaner/tools/ChocolateyInstall.ps1
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
$ErrorActionPreference = 'Stop'
$packageName = 'adwcleaner'
$toolsDir = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)"
#$url = 'https://downloads.malwarebytes.com/file/adwcleaner'
$url = 'https://adwcleaner.malwarebytes.com/adwcleaner?channel=release'
$checksum = '1F544DA66675521A649E632108F86AFB351AD336BD34B7B5C3D290827EBEEF54'
$shortcutName = 'AdwCleaner.lnk'
$portableEXE = "adwcleaner_$ENV:packageVersion.exe"
$packageName = 'adwcleaner'
$toolsDir = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)"
$url = 'https://adwcleaner.malwarebytes.com/adwcleaner?channel=release'
$checksum = '1F544DA66675521A649E632108F86AFB351AD336BD34B7B5C3D290827EBEEF54'
$checksumType = 'sha256'
$shortcutName = 'AdwCleaner.lnk'
$portableEXE = "adwcleaner_$ENV:packageVersion.exe"

$packageArgs = @{
packageName = $packageName
Expand All @@ -14,7 +14,7 @@ $packageArgs = @{
FileFullPath = "$toolsDir\$portableEXE"
softwareName = ''
checksum = $checksum
checksumType = 'sha256'
checksumType = $checksumType
}

Get-ChocolateyWebFile @packageArgs
Expand Down
30 changes: 30 additions & 0 deletions automatic/adwcleaner/update.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
$ErrorActionPreference = 'Stop'
import-module au

$release = 'https://downloads.malwarebytes.com/file/adwcleaner'

function global:au_SearchReplace {
@{
'tools/chocolateyInstall.ps1' = @{
"(^[$]url\s*=\s*)('.*')" = "`$1'$($Latest.URL32)'"
"(^[$]checksum\s*=\s*)('.*')" = "`$1'$($Latest.Checksum32)'"
"(^[$]checksumtype\s*=\s*)('.*')" = "`$1'$($Latest.ChecksumType32)'"
}
}
}

function global:au_AfterUpdate($Package) {
Invoke-VirusTotalScan $Package
}

function global:au_GetLatest {
$File = Join-Path $env:TEMP $($release -split "/" | Select-Object -Last 1)
Invoke-WebRequest -Uri $release -OutFile $File
$version=[System.Diagnostics.FileVersionInfo]::GetVersionInfo($File).FileVersion.trim()
#Remove-Item $File -Force

$Latest = @{ URL32 = $release; Version = $version }
return $Latest
}

update -ChecksumFor 32

0 comments on commit d4fa716

Please sign in to comment.