FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour REMOTE DESKTOP
Posts: 300
Joined: Wed Jul 11, 2007 11:06 AM

REMOTE DESKTOP

Posted: Fri Jun 05, 2015 02:06 PM

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

Posts: 663
Joined: Mon Dec 05, 2005 11:22 PM

Re: REMOTE DESKTOP

Posted: Fri Jun 05, 2015 02:25 PM
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 (fw): Select all Collapse
cComputer := gete('CLIENTNAME')
if empty( cComputer )
   cComputer := gete('COMPUTERNAME')
endif
Posts: 300
Joined: Wed Jul 11, 2007 11:06 AM

Re: REMOTE DESKTOP

Posted: Sat Jun 06, 2015 08:27 AM

Thanks for your help .

It works .

Thanks

Continue the discussion