def _guess_vc_legacy(self):
        """
        Locate Visual C++ for versions prior to 2017.

        Return
        ------
        str
            path
        """
        default = join(
            self.ProgramFilesx86, r'Microsoft Visual Studio %0.1f\VC' % self.vs_ver
        )

        # Try to get "VC++ for Python" path from registry as default path
        reg_path = join(self.ri.vc_for_python, '%0.1f' % self.vs_ver)
        python_vc = self.ri.lookup(reg_path, 'installdir')
        default_vc = join(python_vc, 'VC') if python_vc else default

        # Try to get path from registry, if fail use default path
        return self.ri.lookup(self.ri.vc, '%0.1f' % self.vs_ver) or default_vc

        Locate Visual C++ for versions prior to 2017.

        Return
        ------
        str
            path
        
product/gradle-plugin/src/main/python/setuptools/msvc.py