How can I launch console command while app is still at splash screen?

I am getting some popup warning at beginning and I just want to suppress them. So that I want to run console command DisableAllScreenMessages even before GameInstance->BeginPlay. How can I run this code before project codes launch? Answer below gave me this solution but he doesn’t explain how to do this:

I was unable to find a solution to make anything start at the splash screen other than injecting some code in the source. However, you can run a python script right as the editor starts Project/Content/Python/ .

import unreal
import os