I know the function system(), but it creates its own environment, so every variable changed here is not redirected to the main console. I wonder if it is possible to send the command as it will be written by the user or how it will be executed by the * .bat file?
I need this because I'm looking for a way to set the env variable of the parent CMD process. And yes, I know that the system does not want me to do this, but maybe there is some workaround for this ...
The idea is to create an application that will set as a variable everything that is sent to it through the input channel, for example:
echo Bob| setvar name
then:
echo %name%
will create Bob
, ( , for) , ^!%, , cmd.