
How do i put the result into variable %result% in the caller batch file from c++ program?
Is there no other way than saving stdout to a temp file and then reading it with set /p?
The way i showed above requires two files to function as a user-friendly plugin:
1 - (the file that you call) a bat file that saves the output of (2) to a temp file, saves the result to the %result% variable and deletes the temp file
2 - the C++ plugin (.exe)
I asked this question on StackOverflow before and they don't seem to find any other way than this one.
The way i showed above is possible because the batch file that you called share environmental variables but the cpp program and caller .bat don't.
Thanks for any help as this topic should be actually discussed.
- uglyninja