Under a bash environment I usually do:
var=$(command -args)
and the I use $var with its value setted as the result of the command.
The same goes to a more conventional
set var=command -args
compatible in almost every unix shell.
How could I define a variable in a windows bat file like that? I've tried set var=command -args but I only get the "command -args" string.