I am trying to write a batch script that saves the result of a command in a variable. so I can use it later.
For example I am tryin to run this on the script: sc queryex "Service" |find /i "pid"
but I want to save this result in a variable.
set PIDRS=sc queryex "Themes" |find /i "pid"
ECHO "%PIDRS%
Any Ideas?