ps/Modules/Alkami.PowerShell.Common/Public/Get-7ZipPath.ps1
2023-05-30 22:51:22 -07:00

22 lines
371 B
PowerShell

function Get-7ZipPath {
<#
.SYNOPSIS
Get the path to the 7zip exe
#>
[CmdletBinding()]
Param()
$paths = @("C:\ProgramData\Alkami\Common\7za.exe", "C:\Program Files\7-Zip\7z.exe")
foreach($path in $paths)
{
if(Test-Path $path)
{
return $path
}
}
throw 'Could not find the 7Zip executable on disk';
}