GenerateProjectFiles.bat not recognizing Visual Studio 2017

I’ve been trying to run GenerateProjectFiles.bat for a good day now, and I’ve tried almost everything - the InstallDir registry key is there, the VS120COMNTOOLS variable is there, I have Visual Studio 2017 with the C++ packages installed, and I still can’t get it to work.
If it helps, I’m trying to compile the VRFunhouse411 branch.
Please help?

Error below:

GenerateProjectFiles ERROR: We couldn’t find a valid installation of Visual Studio. This program requires Visual Studio 2015 or Visual Studio 2013 or Visual Studio 2012. Please check that you have Visual Studio installed, then verify that the HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\14.0\InstallDir (or HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\14.0\InstallDir on 32-bit machines) registry value is set. Visual Studio configures this value when it is installed, and this program expects it to be set to the '\Common7\IDE' sub-folder under a valid Visual Studio installation directory.


Could you solve the problem?

I have the sane issue with vs2019