Re: How to get user's local setting folder

From: Andrew Diabo (aadiabo_at_ix.netcom.com)
Date: 05/22/04


Date: Sat, 22 May 2004 12:23:45 -0400

Hi David,

Thanks for the code snippet. I'll give it a try. How do one query a list of
environment variables in the system?

Thanks
Andrew

"David Lewis" <davidl@ocuco.com> wrote in message
news:40af093d@newsgroups.borland.com...
> I don't know if this is exactly what you need, but you could try the
> following. On Windows 2K it returns C:\Documents and Settings\User Name
>
> function GetProfilePath: String;
> var
> barray: array[0..MAX_PATH] of char;
> begin
> GetEnvironmentVariable(PChar('UserProfile'), @barray, MAX_PATH);
> Result := StrPas(@barray);
> end;
>
>
> "Andrew Diabo" <aadiabo@ix.netcom.com> wrote in message
> news:40aec8d2@newsgroups.borland.com...
> > I would like to save my applications settings .ini file in the login
> user's
> > local setting folder. What is the Windows API to get that folder? Thanks
> for
> > any help.
> >
> > Andrew
> >
> >
>
>



Relevant Pages

  • Re: VBA / VBS to get Desktop folder string
    ... How I am supposed to know how reliable the API is, ... programmers who design these applications make use of environment variables ... bypassing the Windows API set up for just this purpose, ... written will always be more secure than the Windows Registry, ...
    (microsoft.public.access.modulesdaovba)
  • Re: VBA / VBS to get Desktop folder string
    ... How I am supposed to know how reliable the API is, ... programmers who design these applications make use of environment variables ... bypassing the Windows API set up for just this purpose, ... written will always be more secure than the Windows Registry, ...
    (microsoft.public.access.modulesdaovba)
  • Re: Getting the home directory in Python and a bug in os.path.expanduser
    ... Edward Diener: ... exists, for getting the home directory, as opposed to using environment variables, but I can not find any Windows API for it at present. ...
    (comp.lang.python)
  • Re: Terminal Server user name
    ... 'Environ$' gets you the environment variables. ... At many locations there is a 'username' environment variable, ... This isn't better than using the windows API, ... > to be able to capture theTS user logon name from within access ...
    (microsoft.public.access.modulesdaovba)
  • Re: How to get query execution time of an MS SQL Query in Visual basic
    ... If you are executing the query from vba, create a timer (using ... GetTickcount from the Windows API or something similar). ...
    (microsoft.public.sqlserver.server)