User folder

User folder

Postby cdmmaui » Fri Jun 06, 2008 1:45 am

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
cdmmaui
 
Posts: 689
Joined: Fri Oct 28, 2005 9:53 am
Location: Houston ∙ Chicago ∙ Los Angeles ∙ Miami ∙ London ∙ Hong Kong

Postby Otto » Fri Jun 06, 2008 2:54 pm

cAppPath := cFilePath( GetModuleFileName( GetInstance( ) ) )
Regards,
Otto
User avatar
Otto
 
Posts: 6328
Joined: Fri Oct 07, 2005 7:07 pm

Postby xProgrammer » Sat Jun 07, 2008 7:33 am

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  Expand view
sHomeDirectory := GetEnv( "HOME" )


Hope that might help
xProgrammer
User avatar
xProgrammer
 
Posts: 464
Joined: Tue May 16, 2006 7:47 am
Location: Australia


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 74 guests