Fix install path check (#633)
* update check for openssh directory in PATH * add closing parentheses
This commit is contained in:
parent
f2ee7ea5fa
commit
5124f3dcd4
|
@ -839,7 +839,7 @@ Function Add-MachinePath {
|
|||
|
||||
if (Test-Path $FilePath) {
|
||||
$machinePath = (Get-ItemProperty -Path 'HKLM:\System\CurrentControlSet\Control\Session Manager\Environment' -Name PATH).Path
|
||||
if (-not $machinePath.ToLower().Contains("$FilePath;".ToLower()))
|
||||
if (-not ($machinePath.ToLower().Contains("$FilePath;".ToLower()) -or $machinePath.ToLower().Contains("$FilePath\;".ToLower())))
|
||||
{
|
||||
$newPath = $FilePath + ’;’ + $machinePath
|
||||
Set-ItemProperty -Path 'HKLM:\System\CurrentControlSet\Control\Session Manager\Environment' -Name PATH –Value $newPath
|
||||
|
|
Loading…
Reference in New Issue