Quantcast
Channel: SQLServerCentral » Programming » Powershell » Latest topics
Viewing all articles
Browse latest Browse all 467

Get Visual Studio 2014 Path

$
0
0
Hi,If I run the below path I get the path as : "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools\"....but I need the below path :'C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE' as an output as the tf.exe is located to the above path.I tried to change the below string as below, but no luck -$vsEnvVars = (dir Env:).Name -match "VS[0-9]{1,3}COMNIDE"[code="sql"]clear$vsEnvVars = (dir Env:).Name -match "VS[0-9]{1,3}COMNTOOL"$latestVs = $vsEnvVars | Sort-Object | Select -Last 1$latestVs$vsPath = Get-Content Env:\$latestVs$vsPath[/code]

Viewing all articles
Browse latest Browse all 467

Trending Articles