22 lines
371 B
PowerShell
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';
|
||
|
}
|
||
|
|