i would like to build a batch that will look over the processes, for every process that it is running to get the location and put it in a variable like ex : there is process x1 running poof magic %var1% has the location of program x1 ... But it should do it for every process.. what i know is how to do it just for one process not all of them and i have to know the name of the process :
wmic process where "name='aa.exe'" get ExecutablePath >dumpxkss.tmp
more +1 dumpxkss.tmp >dumpxkss1.tmp
for /f "delims=" %%x in (dumpxkss.tmp) do set Build=%%x
set build1=%Build:~0,-8%
but in this case if there are more aa.exe processes it won t work..
so i want to get the path for every process no matter the name ... please help ??