vb.net - API for Determining if App is Running on Citrix or Terminal Services -


i'm looking api/function can call determine if software running on citrix, terminal services, or stand-alone pc. optimally, work this:

select case apiwhatsystem.type.tostring    case "citrix"       bcitrix = true    case "ts"       bterminalservices = true    case "pc"       bpc = true end select 

i prefer worked api call opposed looking @ in registry we're having more , more customers locking down registry.

thanks.

according to: http://forums.citrix.com/message.jspa?messageid=1363711 can check sessionname environment variable.

another simpler way read system environment variable "sessionname". if exists , starts "ica" you're running within citrix session. if starts "rdp" you're running within rdp session.

i tested pc , locally get:

c:\>echo %sessionname% console 

while remotely got

c:\>echo %sessionname% rdp-tcp1 

so seems might easy route go, otherwise sounds checking registry values or if dlls exist next best thing.


Comments

Popular posts from this blog

SAP Web Service from .NET via WCF -

Optimized Line drawing in QT -

datetime - str to time in python -