Thank you very much! It works in 5.2.
I modified it for me a little (place to project folder and change ProjectName.uproject):
update 25 Dec 2023: now I have an improved version (no need to set projectname):
GenerateProjectFiles.cmd:
setlocal
powershell -command "$uproject = Get-ChildItem "*.uproject" -Name; $bin = & { (Get-ItemProperty 'Registry::HKEY_CLASSES_ROOT\Unreal.ProjectFile\shell\rungenproj' -Name 'Icon' ).'Icon' }; $bin + ' -projectfiles %cd%\' + $uproject" | cmd.exe