Delphi pre-build event not executing BEFORE compile
Try using {$R aVersionInfo.res} and calling brcc32 aVersionInfo.rc manually from your batch file (after you’re done with creating the .rc file). That way your .res file should be excluded from the normal IDE build.