vswhere
Locate Visual Studio 2017 and newer installations. tldr-pages
On Windows
Windows
Find the path of vcvarsall.bat to set environment variables
vswhere -products * -latest -prerelease -find **\VC\Auxiliary\Build\vcvarsall.batIdentifyFind the directory of the x64 MSVC compiler (cl.exe, etc.)
vswhere -products * -latest -prerelease -find **\Hostx64\x64\*IdentifyFind the directory of Clang bundled with Visual Studio bundled (clang-cl, clang-tidy, etc.)
vswhere -products * -latest -prerelease -find **\Llvm\bin\*IdentifyFind the path of MSBuild.exe
vswhere -products * -latest -prerelease -find MSBuild\**\Bin\MSBuild.exeIdentify