danf
(Fresh Scripter)
2009-02-15 10:01 PM
Syntax so script does not run when user logs into Citrix

I've got my script finally running smooth as can be thanks to all you guys' help. The one fly in the ointment is that when I have a user login using their domain account to the citrix box the script tries to run. Which is not something that we don't want to have happen. Is there a simple way of addressing this?

Thanks.

-Dan


AllenAdministrator
(KiX Supporter)
2009-02-15 10:07 PM
Re: Syntax so script does not run when user logs into Citrix

if checking @tssession does not work, search the board. I know this has been discussed.

Les
(KiX Master)
2009-02-15 10:54 PM
Re: Syntax so script does not run when user logs into Citrix

Ja, been discussed many times. We set an Enviro var on the Citrix servers we don't want the script to run on and then check for the var.

Richard H.Administrator
(KiX Supporter)
2009-02-16 10:00 AM
Re: Syntax so script does not run when user logs into Citrix

There are many way to do it, and your environment will determine what is best for you.

As the guys have suggested, it is worth searching the board and looking at previous discussions as these may highlight idiosyncracies that you should be aware of.

A simple check that I used to use in a mixed environment was:
 Code:
$sSessionType=Split(%SESSIONNAME%,"-")[0]
Select
Case $sSessionType="RDP"
	"Processing for a Terminal Services type connection..."+@CRLF
Case $sSessionType="ICA"
	"Processing for a Citrix type connection..."+@CRLF
Case $sSessionType="Console"
	"Processing for a local Console login on a multiuser operating system..."+@CRLF
Case "Default"
	"Processing for an unsupported or non-multiuser login..."+@CRLF
EndSelect