Mart,

Just to clarify, the XD4ClientName.exe can't be run from within Kix.. it sets an environment var that exists only within the subshell. It really must be called before running Kix to work. Calling it from WSHPipe might work, but it really would work best if WSHPipe called a bat file that called the EXE and then echo'd the environment var, so that WSHPipe only captured the variable data.

That said... one of the quickest ways to ostracize oneself is to expect complete answers to problems. Mart, Shane, and I have all posted examples based on what we know (in general about Citrix/Xen and specifically about what has been described. We all have an expectation that when someone asks for assistance, they will take the responses and try a few things, attempt some of the examples, and report back specific conditions.

The example that I posted will work, but requires you figure out how to define the batch file such that the XD4ClientName.exe runs only when logging onto a Xen server. Mart's Kix code won't work because the way the exe works, but his IDEAS ARE SPOT ON! His questions are valid! You need to try a few things on your own, in your specific environment. Something as simple as
 Code:
IF ^%COMPUTERNAME%^==^someXENserver^ xd4ClientName.exe
- with one IF for each Xen server, then the command will run only if logging into a Xen server. Try it, let us know if it worked. If it doesn't, report the error messages, not just that it didn't work.

Bottom line, it's your problem in your environment, you'll need to get your hands dirty - more so that the rest of us, simply because you're there.

We're all here because we're willing to help. Most times, that help is in the form of sharing ideas. There's the occasional "silver platter" code, and if you figure this out, I'd be happy to post the result in the code vault to help the next person struggling with this.

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