How to achieve the difference between double-click program and command line execution?

recently when I was using Sunny-Ngrok, I found that
double-clicking sunny.exe prompts

Don"t double-click ngrok!
you need to open the cmd.exe and run it on the command line

and running under the command line prompts

using tutorials, please go to www.ngrok.cc to view tutorials

what is the principle of this function?
for example, how to write a program with CPP?

Jul.05,2022

get the parent process name. If it is not cmd.exe , exit

directly.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1bdf815-3146c.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1bdf815-3146c.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?