Here is how I think I would attempt to solve this problem.

First a little background. I knew I had done something like this in the past with for /f in the batch file. It took me forever to remember how to do it, and to figure why it was failing. Finally found the following thread that helped my compromised mind...
http://www.kixtart.org/forums/ubbthreads.php?ubb=showflat&Number=130273#Post130273

So here is my setup...

path.bat
 Code:
@echo off
set apps=Oracle11;Java16
set exe=yourexename
for /f "tokens=*" %%f in ('kix32 path.kix') do set path=%%f
echo %path%
::%exe%
pause


path.kix
 Code:
break on
$RC=setoption("WrapatEOL","ON")
$RC=setoption("ASCII","on")
;? "%apps%"

$apps=split("%apps%",";")
for each $app in $apps
  if $newpath
    $newpath=$newpath + ";"
  endif
  $newpath=$newpath + readprofilestring(@scriptdir + "\paths.ini",$App,"Path")
next

"%path%;" + $newpath


paths.ini
 Code:
[Oracle11]
Path="c:\program files\oracle11\bin"

[Java16]
Path="c:\program files\java\jre\bin"


Path.bat Notes
1. Set the Apps you need separated by ; (These app names correspond to sections in the INI)
2. Set the EXE Name
3. Runs Kix32 path.kix and whatever is displayed to the screen from the path.kix script is set to the path var
4. Displays the path
5. Runs the exe (remove :: first)

Once you have all your code in the path.kix correct, the only thing you will have to do is modify the first two vars of path.bat for each of your apps.


Path.kix Notes
1. ASCII ON so that whatever is displayed in the console is accessible by the for /f loop
2. Looks up each Section in the ini file based on the %apps% var from the bat. Each section contains the path for the particular app
3. Modify the code so that you manipulate the path anyway you want.
4. The last thing to do is display the value you want the path to be

While testing you might consider doing something like this
 Code:
for /f "tokens=*" %%f in ('kix32 path.kix') do echo %%f


Last thing, I was working on this in wee of the night... couldn't sleep until i figured it out. Hope it is helpful, but won't be the least bit surprised to find bugs in my code.