I have a C# console executable started within a DOS command process.
I need to be able to execute DOS commands from the C# executable (specifically I need to be able to SET variables) and have the variables persist such that the rest of the DOS process can reference them.
ie:
Start DOS process -> C# executes a SET command to set UserVariable -> DOS process can ECHO %UserVariable%
Due to performance reasons I cannot write the set command to a dos script. In fact, I cannot have any file I/O at all.
Can anyone help?
SETX persists the environment variables. Check this: http://technet.microsoft.com/es-es/library/cc755104(v=ws.10).aspx
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With