From 0b63de0be2bf4ec13c3e46afe5230affe0e10b0c Mon Sep 17 00:00:00 2001 From: Nikita Bykov Date: Wed, 2 Sep 2020 15:01:39 +0300 Subject: [PATCH] update --- win-vs-env.psm1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/win-vs-env.psm1 b/win-vs-env.psm1 index 68f7c1a..5c3cdb9 100644 --- a/win-vs-env.psm1 +++ b/win-vs-env.psm1 @@ -3,7 +3,7 @@ ### function Get-VSWhere { - $vswhere = "C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe"; + $vswhere = Join-Path $env:ProgramFiles(x86) 'Microsoft Visual Studio\Installer\vswhere.exe' if (-not (Test-Path $vswhere )) { [Net.ServicePointManager]::SecurityProtocol = [Net.ServicePointManager]::SecurityProtocol -bor [Net.SecurityProtocolType]::Tls12 @@ -34,7 +34,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