Skip to content

open-visual-studio

Launches Visual Studio

#requires -version 5.1

function tryToLaunch { param($filePath)
	if (Test-Path "$filePath" -pathType leaf) {
		Start-Process "$filePath"
		exit 0
	}
}

try {
	tryToLaunch "C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\devenv.exe"
	tryToLaunch "C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe"
	exit 0
} catch {
throw
}

An interactive directory of PowerShell scripts.