Skip to content

Commit

Permalink
Merge pull request #1088 from d35ha/fix-VM-Uninstall-With-Uninstaller…
Browse files Browse the repository at this point in the history
…-category

Fix the calls to VM-Uninstall-With-Uninstaller
  • Loading branch information
emtuls authored Jun 14, 2024
2 parents a0c9e86 + c7065fc commit 7f9fa03
Show file tree
Hide file tree
Showing 14 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion packages/7zip-15-05.vm/7zip-15-05.vm.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2015/06/nuspec.xsd">
<metadata>
<id>7zip-15-05.vm</id>
<version>15.05.0.20240507</version>
<version>15.05.0.20240614</version>
<authors>Igor Pavlov</authors>
<description>7-Zip file archiver. This version is able to extract NSIS scripts.</description>
<dependencies>
Expand Down
2 changes: 1 addition & 1 deletion packages/7zip-15-05.vm/tools/chocolateyuninstall.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ $category = 'Productivity Tools'
VM-Uninstall $toolName $category

# Manually silently uninstall
VM-Uninstall-With-Uninstaller "7-Zip 15.05*" "EXE" "/S"
VM-Uninstall-With-Uninstaller "7-Zip 15.05*" $category "EXE" "/S"

$extensions = @(".7z", ".bzip2", ".gzip", ".tar", ".wim", ".xz", ".txz", ".zip", ".rar")
foreach ($extension in $extensions) {
Expand Down
2 changes: 1 addition & 1 deletion packages/common.vm/common.vm.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2015/06/nuspec.xsd">
<metadata>
<id>common.vm</id>
<version>0.0.0.20240607</version>
<version>0.0.0.20240612</version>
<description>Common libraries for VM-packages</description>
<authors>Mandiant</authors>
</metadata>
Expand Down
8 changes: 4 additions & 4 deletions packages/common.vm/tools/vm.common/vm.common.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -791,10 +791,6 @@ function VM-Uninstall-With-Uninstaller {
# Remove tool shortcut
VM-Remove-Tool-Shortcut $toolName $category

# Remove tool files
$toolDir = Join-Path ${Env:RAW_TOOLS_DIR} $toolName
Remove-Item $toolDir -Recurse -Force -ea 0 | Out-Null

# Attempt to find and execute the uninstaller, may need to use wildcards
# See: https://docs.chocolatey.org/en-us/create/functions/get-uninstallregistrykey
[array]$key = Get-UninstallRegistryKey -SoftwareName $toolName
Expand All @@ -821,6 +817,10 @@ function VM-Uninstall-With-Uninstaller {
$key | ForEach-Object {VM-Write-Log "WARN" " - $($_.DisplayName)"}
VM-Write-Log "WARN" "Now allowing Chocolatey's auto uninstaller a chance to run."
}

# Remove tool files
$toolDir = Join-Path ${Env:RAW_TOOLS_DIR} $toolName
Remove-Item $toolDir -Recurse -Force -ea 0 | Out-Null
}

function VM-Write-Log-Exception {
Expand Down
2 changes: 1 addition & 1 deletion packages/explorersuite.vm/explorersuite.vm.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2015/06/nuspec.xsd">
<metadata>
<id>explorersuite.vm</id>
<version>0.0.0.20230925</version>
<version>0.0.0.20240614</version>
<authors>Erik Pistelli</authors>
<description>A suite of tools including CFF Explorer and a process viewer.</description>
<dependencies>
Expand Down
2 changes: 1 addition & 1 deletion packages/explorersuite.vm/tools/chocolateyuninstall.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ foreach ($subtoolName in $subtoolNames) {

VM-Remove-From-Right-Click-Menu 'CFF explorer'

VM-Uninstall-With-Uninstaller "Explorer Suite IV" "EXE" "/VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-"
VM-Uninstall-With-Uninstaller "Explorer Suite IV" $category "EXE" "/VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-"
2 changes: 1 addition & 1 deletion packages/metasploit.vm/metasploit.vm.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2015/06/nuspec.xsd">
<metadata>
<id>metasploit.vm</id>
<version>6.4.13.20240613</version>
<version>6.4.13.20240614</version>
<authors>Rapid7</authors>
<description>A computer security project that provides information about security vulnerabilities, aids in penetration testing, and IDS signature development.</description>
<dependencies>
Expand Down
2 changes: 1 addition & 1 deletion packages/metasploit.vm/tools/chocolateyuninstall.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ $category = 'Command & Control'
VM-Uninstall $toolName $category

# Silently uninstall
VM-Uninstall-With-Uninstaller $toolName "MSI" "/q /norestart"
VM-Uninstall-With-Uninstaller $toolName $category "MSI" "/q /norestart"

# Remove directory, shortcut, shim
VM-Uninstall $toolName $category
2 changes: 1 addition & 1 deletion packages/nmap.vm/nmap.vm.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2015/06/nuspec.xsd">
<metadata>
<id>nmap.vm</id>
<version>7.93.20230418.20240102</version>
<version>7.93.20230418.20240614</version>
<authors>Fyodor, Nmap Project</authors>
<description>Port scanning utility and nc replacement with extended features</description>
<dependencies>
Expand Down
2 changes: 1 addition & 1 deletion packages/nmap.vm/tools/chocolateyuninstall.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ try {
Uninstall-BinFile -Name "zenmap"

# Silently uninstall
VM-Uninstall-With-Uninstaller "Nmap*" "EXE" "/S"
VM-Uninstall-With-Uninstaller "Nmap*" $category "EXE" "/S"
} catch {
VM-Write-Log-Exception $_
}
Expand Down
2 changes: 1 addition & 1 deletion packages/npcap.vm/npcap.vm.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2015/06/nuspec.xsd">
<metadata>
<id>npcap.vm</id>
<version>1.79.0.20240606</version>
<version>1.79.0.20240614</version>
<authors>Nmap Project</authors>
<description>Npcap is an architecture for packet capture and network analysis for Windows operating systems, consisting of a software library and a network driver.</description>
<dependencies>
Expand Down
2 changes: 1 addition & 1 deletion packages/npcap.vm/tools/chocolateyuninstall.ps1
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
$ErrorActionPreference = 'Continue'
Import-Module vm.common -Force -DisableNameChecking

VM-Uninstall-With-Uninstaller "Npcap*" "EXE" "/S"
VM-Uninstall-With-Uninstaller "Npcap*" "" "EXE" "/S"

2 changes: 1 addition & 1 deletion packages/vbdec.vm/tools/chocolateyuninstall.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ $toolName = 'vbdec'
$category = 'Visual Basic'

# Silently uninstall
VM-Uninstall-With-Uninstaller $toolName "EXE" "/VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-"
VM-Uninstall-With-Uninstaller $toolName $category "EXE" "/VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-"

# Remove directory, shortcut, shim
VM-Uninstall $toolName $category
Expand Down
2 changes: 1 addition & 1 deletion packages/vbdec.vm/vbdec.vm.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2015/06/nuspec.xsd">
<metadata>
<id>vbdec.vm</id>
<version>1.0.917.20240217</version>
<version>1.0.917.20240614</version>
<authors>vbGamer45, David Zimmer</authors>
<description>VBDec works as a VB6 disassembler, PCode debugger, structure viewer for all vb6 executables, and can generate IDA scripts to integrate structures and named function offsets.</description>
<dependencies>
Expand Down

0 comments on commit 7f9fa03

Please sign in to comment.