Kill process on session reconnect


We run Citrix XenApp 6.5

I have a weird problem with a third party application that only happens when a user takes their session to a different machine to carry on from where they left off.

The simple fix for this would be to automate the killing of a specific process (or batch script to restart the process on session reconnect) but I didn't know if anything like this would be possible to automate upon session reconnect.

Is it possible to restart a process on reconnect?
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Sekar ChinnakannuStaff EngineerCommented:
Did you installed latest roll up pack on your servers? if not install the same and check. To downlaod
tegeniusAuthor Commented:
We're on rollup 4 already and I don't feel roll-up 5 would fix this specific issue.
It's likely that the app uses the client name or IP address and that reconnecting from another workstation causes the app to malfunction.  If the vendor will instead use a variable for the workstation name and/or not depend on the IP address, that would solve this fast, but I realize that the likelihood of the vendor modifying this in short order is minimal.

If the issue is IP address, you may be able to use Virtual IP functionality to assign a secondary IP to the user session.  I'm fairly sure that the VIP stays with the user session after reconnection.

Or the issue may be a dependency on the workstation name.  You can see which client name is being passed in this reg key: HKU\[SID of user]\Volatile Environment\[Session #]\Clientname.  To find which is the profile of that specific user, click through the SIDs shown under HKU and look in the Volatile Environment key for the name of the user.

To test, try having a user log in once.  Note the client name in this reg key.  Then, have the user switch to a different workstation.  The clientname key should change.  Try manually changing it to the first clientname, and see if the app works now.  If the issue is the client name that is being passed to the app, this should confirm the theory.  

If that's the case, you may be able to create a Group Policy Preference (registry) that alters the clientname reg key, but you'd have to account for the dynamic session number.

One way to find out for sure what's happening is to use Microsoft Process Monitor to track a session reconnect.  Yes, you'll get a gazillion entries to pour through, but the concrete answer will be there.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.