It's Day Two of Batch File Week.
Don't worry, it'll be over in a few days.
There is no obvious way to read the output of a command
into a batch file variable.
In unix-style shells, this is done via backquoting.
The Windows command processor does not have direct backquoting,
but you can fake it by abusing the FOR command.
Here's the ...