Skip to content

Commit

Permalink
#198 freenet
Browse files Browse the repository at this point in the history
  • Loading branch information
dtgm committed May 27, 2016
1 parent 512a06a commit 9ca4404
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
1 change: 1 addition & 0 deletions automatic/freenet/freenet.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ By running this program you contribute to the security of the overall Freenet ne
<dependencies>
<dependency id="javaruntime" />
<dependency id="dotnet3.5" />
<dependency id="chocolatey-uninstall.extension" />
</dependencies>
</metadata>
<files>
Expand Down
19 changes: 8 additions & 11 deletions automatic/freenet/tools/chocolateyUninstall.ps1
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
$packageName = '{{PackageName}}'
$packageSearch = $packageName
$softwareName = "$packageName*"
$installerType = 'exe'
$silentArgs = '/VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-'
$validExitCodes = @(0)

Get-ItemProperty -Path @( 'HKLM:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*',
'HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\*',
'HKCU:\Software\Microsoft\Windows\CurrentVersion\Uninstall\*' ) `
-ErrorAction:SilentlyContinue `
| Where-Object { $_.DisplayName -like "$packageSearch*" } `
| ForEach-Object { Uninstall-ChocolateyPackage -PackageName "$packageName" `
-FileType "$installerType" `
-SilentArgs "$($silentArgs)" `
-File "$($_.UninstallString)" `
-ValidExitCodes $validExitCodes }
[array]$key = Get-UninstallRegistryKey -SoftwareName $softwareName
$key | ForEach-Object {
Uninstall-ChocolateyPackage -PackageName "$packageName" `
-FileType "$installerType" `
-SilentArgs "$($silentArgs)" `
-File "$($_.UninstallString)" `
-ValidExitCodes $validExitCodes }

0 comments on commit 9ca4404

Please sign in to comment.