From 17960054c9e68039ec0053f824f2c21d46d7f18d Mon Sep 17 00:00:00 2001 From: Nikita Bykov Date: Wed, 2 Sep 2020 15:27:32 +0300 Subject: [PATCH] update --- win-vs-env.psm1 | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/win-vs-env.psm1 b/win-vs-env.psm1 index 5c3cdb9..63c6973 100644 --- a/win-vs-env.psm1 +++ b/win-vs-env.psm1 @@ -3,8 +3,9 @@ ### function Get-VSWhere { - $vswhere = Join-Path $env:ProgramFiles(x86) 'Microsoft Visual Studio\Installer\vswhere.exe' - + $PF = ${env:ProgramFiles(x86)} + $vswhere = "$PF\Microsoft Visual Studio\Installer\vswhere.exe"; + Write-Host "vswhere - $vswhere" if (-not (Test-Path $vswhere )) { [Net.ServicePointManager]::SecurityProtocol = [Net.ServicePointManager]::SecurityProtocol -bor [Net.SecurityProtocolType]::Tls12 $vswhere = ".\vswhere.exe" @@ -34,7 +35,7 @@ function Invoke-Environment } function Get-VSInstallationPath { - Write-Host "ProgramFiles(x86) - $env:ProgramFiles(x86)" + Write-Host "ProgramFiles(x86) - ${env:ProgramFiles(x86)}" $vswhere = Get-VSWhere Write-Host "vswhere - $vswhere" $installationPath = & $vswhere -prerelease -legacy -latest -property installationPath