How to determine a user's build configuration?

I would like to write some batch scripts that trigger unreal commandlets to help automate some of our processes. However, I’m running into a slight snag.

Calling the command

Engine/Binaries/Win64/UnrealEditor.exe -run=<some command>

is easy enough, but for some users that isn’t the correct build configuration. I run in DebugGame most of the time, for instance, so the UnrealEditor.exe isn’t up to date and I need to use UnrealEditor-Win64-DebugGame.exe. Other team members use different configurations, so I can’t just assume which one is valid.

Is there a simple way to look up the user’s current build configuration to determine which version of the binaries to run? I looked up how UGS does it when launching the editor and it’s possible to replicate its algorithm in other places, but is there any script I can run to load this data or anything like that?