diff --git a/packages/didier-stevens-beta.vm/didier-stevens-beta.vm.nuspec b/packages/didier-stevens-beta.vm/didier-stevens-beta.vm.nuspec new file mode 100644 index 00000000..6d4ad367 --- /dev/null +++ b/packages/didier-stevens-beta.vm/didier-stevens-beta.vm.nuspec @@ -0,0 +1,13 @@ + + + + didier-stevens-beta.vm + 0.0.0.20231221 + Didier Stevens + Beta versions of Didier Stevens's software + + + + + + diff --git a/packages/didier-stevens-beta.vm/tools/chocolateyinstall.ps1 b/packages/didier-stevens-beta.vm/tools/chocolateyinstall.ps1 new file mode 100644 index 00000000..4c66f66f --- /dev/null +++ b/packages/didier-stevens-beta.vm/tools/chocolateyinstall.ps1 @@ -0,0 +1,31 @@ +$ErrorActionPreference = 'Stop' +Import-Module vm.common -Force -DisableNameChecking + +try { + $category = 'Office' + $zipUrl = 'https://github.com/DidierStevens/Beta/archive/cbb1d5c32d02b4e07128a197c8b8fb6ea597916a.zip' + $zipSha256 = 'e9d83063f45f8e2791d33de194a46850bd7f1921e755bd4651c769cbcdbd5052' + + $packageArgs = @{ + packageName = ${Env:ChocolateyPackageName} + unzipLocation = ${Env:RAW_TOOLS_DIR} + url = $zipUrl + checksum = $zipSha256 + checksumType = 'sha256' + } + Install-ChocolateyZipPackage @packageArgs + $toolDir = Get-Item "${Env:RAW_TOOLS_DIR}\Beta-*" + VM-Assert-Path $toolDir + + # Add shortcut for commonly used office tools + ForEach ($toolName in @('onedump')) { + $executablePath = Join-Path $toolDir "$toolName.py" + VM-Install-Shortcut $toolName $category $executablePath -consoleApp $true -arguments "--help" + } + + # Add tools to Path + $path = [Environment]::GetEnvironmentVariable("Path", "Machine") + [IO.Path]::PathSeparator + $toolDir + [Environment]::SetEnvironmentVariable("Path", $path, "Machine") +} catch { + VM-Write-Log-Exception $_ +} diff --git a/packages/didier-stevens-beta.vm/tools/chocolateyuninstall.ps1 b/packages/didier-stevens-beta.vm/tools/chocolateyuninstall.ps1 new file mode 100644 index 00000000..8662a76f --- /dev/null +++ b/packages/didier-stevens-beta.vm/tools/chocolateyuninstall.ps1 @@ -0,0 +1,12 @@ +$ErrorActionPreference = 'Continue' +Import-Module vm.common -Force -DisableNameChecking + +# Remove shortcuts +$category = 'Office' +ForEach ($toolName in @('onedump')) { + VM-Remove-Tool-Shortcut $toolName $category +} + +# Remove tool directory +$toolDir = Get-Item "${Env:RAW_TOOLS_DIR}\Beta-*" +Remove-Item $toolDir -Recurse -Force -ea 0