Skip to content

Commit

Permalink
Merge pull request #1235 from Ana06/tshark
Browse files Browse the repository at this point in the history
[wireshark.vm] Add tshark to PATH and Tools dir
  • Loading branch information
Ana06 authored Jan 20, 2025
2 parents dc35d51 + 485c5f3 commit 6b03ef1
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
8 changes: 7 additions & 1 deletion packages/wireshark.vm/tools/chocolateyinstall.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,15 @@ try {

$shortcutDir = Join-Path ${Env:TOOL_LIST_DIR} $category
$shortcut = Join-Path $shortcutDir "$toolName.lnk"
$executablePath = Join-Path ${Env:ProgramFiles} "Wireshark\Wireshark.exe" -Resolve
$executablePath = Join-Path ${Env:ProgramFiles} "Wireshark\$toolName.exe" -Resolve
Install-ChocolateyShortcut -shortcutFilePath $shortcut -targetPath $executablePath -RunAsAdmin
VM-Assert-Path $shortcut

# Add tshark (installed by Wireshark) to PATH and to Tools directory
$toolName = 'tshark'
$executablePath = Join-Path ${Env:ProgramFiles} "Wireshark\$toolName.exe" -Resolve
Install-BinFile -Name $toolname -Path $executablePath
VM-Install-Shortcut -toolName $toolName -category $category -executablePath $executablePath -consoleApp $true -arguments "--help"
} catch {
VM-Write-Log-Exception $_
}
6 changes: 4 additions & 2 deletions packages/wireshark.vm/tools/chocolateyuninstall.ps1
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
$ErrorActionPreference = 'Continue'
Import-Module vm.common -Force -DisableNameChecking

$toolName = 'Wireshark'
$toolNames = @('Wireshark', 'tshark')
$category = 'Networking'

VM-Remove-Tool-Shortcut $toolName $category
ForEach ($toolName in $toolNames) {
VM-Remove-Tool-Shortcut $toolName $category
}
2 changes: 1 addition & 1 deletion packages/wireshark.vm/wireshark.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>wireshark.vm</id>
<version>4.4.2</version>
<version>4.4.2.20250108</version>
<description>Wireshark lets you capture and interactively browse the traffic running on a computer network.</description>
<authors>Gerald Combs, Wireshark team</authors>
<dependencies>
Expand Down

0 comments on commit 6b03ef1

Please sign in to comment.