Generate VS Project Files by Command Line

Below worked in 4.16. Note that you must provide full path to project.

"C:\Program Files (x86)\Epic Games\Launcher\Engine\Binaries\Win64\UnrealVersionSelector.exe" /projectfiles "full\path\to\myproject.uproject"

You can find this in following registry key:

HKEY_CLASSES_ROOT\Unreal.ProjectFile\shell\rungenproj

So I wrote a little batch file that you can put in your project folder and invoke it with your uproject:

GenerateProjectFiles.bat

setlocal
del /q gen_temp.txt
powershell -command "& { (Get-ItemProperty 'Registry::HKEY_CLASSES_ROOT\Unreal.ProjectFile\shell\rungenproj' -Name 'Icon' ).'Icon' }" > gen_temp.txt
set /p gen_bin=<gen_temp.txt
%gen_bin% /projectfiles %cd%\%1%
del /q gen_temp.txt

Use this like (from project folder):

GenerateProjectFiles.bat MyProject.uproject
1 Like