err - yup!

The command to set the environment variable must be run BEFORE the kix script, AND MUST be run in the same environment where it was set. That is..

You must have a batch file that runs the EXE and then runs the Kix script. The bat file runs the EXE that sets the environment var, then runs the kix script. This way, the variable is present in the environment used by Kix. You can see this by running a SET >%TEMP%\before.txt before you run the EXE, and then a SET >%TEMP%\after.txt after the EXE. The only difference between the files should be that the ClientName is defined in After.txt.

You CAN NOT run the EXE from within kix because it creates a child environment, sets the var into the child environment, and then that environment dies.

The key, as we've been saying, is to find a method that runs from the batch file that determines if the session is run against a Xen client.

Glenn
_________________________
Actually I am a Rocket Scientist! \:D