Hello,
Based on your description, it is recommended that you can refer to the following links:
https://stackoverflow.com/questions/7590604/prevent-command-line-from-opening-on-popen
https://stackoverflow.com/questions/10020653/is-there-any-way-of-stopping-popen-opening-a-dos-window
Hope this helps.
Best Regards,
Hania Lian
If the Answer is helpful, please click "Accept Answer" and upvote it.