User folder

Post Reply
User avatar
cdmmaui
Posts: 653
Joined: Fri Oct 28, 2005 9:53 am
Location: The Woodlands - Dallas - Scottsdale - London
Contact:

User folder

Post by cdmmaui »

Hello,

I have an application running on terminal server. I would like to create a database to the default user folder. Can someone provide an example to get the user folder?

Thank you,
*~*~*~*~*~*~*~*~*~*
Darrell Ortiz
CDM Software Solutions, Inc.
https://www.cdmsoft.com
User avatar
Otto
Posts: 4470
Joined: Fri Oct 07, 2005 7:07 pm
Contact:

Post by Otto »

cAppPath := cFilePath( GetModuleFileName( GetInstance( ) ) )
Regards,
Otto
User avatar
xProgrammer
Posts: 464
Joined: Tue May 16, 2006 7:47 am
Location: Australia

Post by xProgrammer »

Hi cdmmaui

If the user's home directory is stored in an environment variable (in Linux it is in the HOME environment variable which in a shell script would be referenced as $HOME) then you could use the GetEnv() function along the following lines:

Code: Select all

sHomeDirectory := GetEnv( "HOME" )
Hope that might help
xProgrammer
Post Reply