With the FOR command, you can turn your key / value file from this
KEY1=value
KEY2=value
in that
SET KEY1=value
SET KEY2=value
.
, , , .
@echo off
echo rem generated from keyvalue.txt > keyvalue.bat
for /F "tokens=*" %%I in (keyvalue.txt) do @echo set %%I >> keyvalue.bat
call keyvalue.bat
.bat- , key/value keyvalue.txt , = .