diff --git a/win-vs-env.psm1 b/win-vs-env.psm1 index 3178a2a..e9f3d1a 100644 --- a/win-vs-env.psm1 +++ b/win-vs-env.psm1 @@ -3,8 +3,8 @@ ### function Get-VSWhere { - $vswhere = "C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe"; - + $vswhere = "C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe" + if (-not (Test-Path $vswhere )) { [Net.ServicePointManager]::SecurityProtocol = [Net.ServicePointManager]::SecurityProtocol -bor [Net.SecurityProtocolType]::Tls12 $vswhere = ".\vswhere.exe"