Page 1 of 1

User folder

Posted: Fri Jun 06, 2008 1:45 am
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,

Posted: Fri Jun 06, 2008 2:54 pm
by Otto
cAppPath := cFilePath( GetModuleFileName( GetInstance( ) ) )
Regards,
Otto

Posted: Sat Jun 07, 2008 7:33 am
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