Serwer terminali Winflector - alternatywa dla aplikacji Zdalny Pulpit, Citrix XenApp

Forum > Product technical support > Need to find out if machine is MAC or WINDOWS and the UserName

Autor: prs_hope
Data: 2015-11-21 18:03:54

Hi,

I need to find out information regarding the system from the launcher/user of Winflector Client, for instance, I need to know the Operating System (if it's Windows or not) and the UserName (again, if it is Windows).

I am now familiar with TApiGetUserName but this useful function tells me the Winflector User as declared by the Admin in the Winflector Server.  What I need is the actual Windows-UserName (if indeed, it is a Windows client).

 

Autor: Bozena (staff)
Data: 2015-11-23 14:49:48

 

Client system:

To check if client is started from Windows, use TApiGetTrmOSVer() function.

If returned TAPI_OSVERSIONINFO.dwPlatfromId == VER_PLATFORM_WIN32_NT then client is on Windows.

 

Client system user name:

In published application properties on server in "Client environment variables" type USERNAME. This will result in passing USERNAME environment variable value form client to server on app startup. In application (after checking client is Windows)  use GetEnvironmentVariable("USERNAME",...) to get the name of the client machine user.

Autor: prs_hope
Data: 2016-03-11 12:28:25

Thanks Bozena,

This is really useful and interesting, I am able to retrieve the real Windows-Client Username via that method but not by other traditional means.  BIG-THANKS!!!!

Besides 'USERNAME' , could you post a list of other typical OS variables that can be passed/retrieved via this method?

1


Zaloguj się aby móc pisać na forum.