@fer, this is likely non-trivial because of the way Windows handles cli and gui applications. I forget many of the details, but for example, the command prompt won’t wait for gui applications to complete when run from the command line.
One approach is to allow the app to accept command line parameters, then just have a simple console-based app that serves as a wrapper, passing info back and forth with the app wait for the gui’s exit code. This allows you to run the cli from the command prompt and have it feel native.
This is the approach we’ve used in other apps we’ve developed.