REMOTE DESKTOP

Post Reply
Jack
Posts: 249
Joined: Wed Jul 11, 2007 11:06 am

REMOTE DESKTOP

Post by Jack »

When i execute an application with Remote Desktop (TS) ,
the function GetEnv( "COMPUTERNAME" ) return the NAME of the SERVER and not the name of the workstation that execute Remote Desktop .

How to know this name ?

Thanks
Gale FORd
Posts: 663
Joined: Mon Dec 05, 2005 11:22 pm
Location: Houston
Contact:

Re: REMOTE DESKTOP

Post by Gale FORd »

When on Remote Desktop/Terminal Services/Citrix you can use additional environment variables.
gete( 'SESSIONNAME' ) // This returns the session name you are running under. If it returns anything other than 'Console' then you need to get the clientname
gete( 'CLIENTNAME' ) // This is the local computer name or client.

Try this

Code: Select all

cComputer := gete('CLIENTNAME')
if empty( cComputer )
   cComputer := gete('COMPUTERNAME')
endif

 
Jack
Posts: 249
Joined: Wed Jul 11, 2007 11:06 am

Re: REMOTE DESKTOP

Post by Jack »

Thanks for your help .

It works .

Thanks
Post Reply