// Search in the standard installation locations
VisualStudioLocator vsLocator = new DefaultVisualStudioLocator(targetPlatform.getOperatingSystem().getInternalOs(), NativeServices.getInstance().get(WindowsRegistry.class), NativeServices.getInstance().get(SystemInfo.class));
VisualStudioLocator.SearchResult searchResult = vsLocator.locateVisualStudioInstalls(null);
if (searchResult.isAvailable()) {
VisualStudioInstall install = searchResult.getVisualStudio();
return new InstalledVisualCpp().withInstall(install, targetPlatform);
}
return new UnavailableToolChain("visual c++");
}