Quote:

Where does this file come from - is it generated by you?



It is generated by a very long and involved set of DOS batch and VBS scripts.

Quote:

Why are you using a BAT file to set environment vars?



Those other scripts write into that file by redirecting echo statements, or by redirecting STDOUT of other scripts, or of compiled programs.

Quote:

Is there any reason you can not use some other format of file to hold your variable values?



It is not within my authority to change the file format. Unfortunately.

Quote:


Why are you trying to parse the BAT file in stead of just referencing the environment variable directly?



From my OP: I can't call a batch before the script. The final product must be a single, packaged, executeable Kix Script.