Re: How to get user's local setting folder

From: Viatcheslav V. Vassiliev (support_at_oledbdirect.com)
Date: 05/22/04


Date: Sat, 22 May 2004 23:45:01 +0400

Look GetEnvironmentStrings() function in Win API or GetEnvironmentVars() in
JCL (JclSysInfo unit). Really it is a list of environment variables for
current process, it could be different from common list if environment
variables are specified in CreateProcess().

//------------------------------------------
Regards,
Vassiliev V. V.
http://www.managed-vcl.com - using .Net objects in Delphi for Win32 +
ADO.Net
http://www.oledbdirect.com - The fastest way to access MS SQL Server,
MS Jet (Access) and Interbase (through OLEDB)

"Andrew Diabo" <aadiabo@ix.netcom.com> ÓÏÏÂÝÉÌ/ÓÏÏÂÝÉÌÁ × ÎÏ×ÏÓÔÑÈ
ÓÌÅÄÕÀÝÅÅ: news:40af7fb3@newsgroups.borland.com...
> 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: How to get users local setting folder
    ... Andrew ... > Look GetEnvironmentStrings() function in Win API or GetEnvironmentVars ... > JCL (JclSysInfo unit). ... >> environment variables in the system? ...
    (borland.public.delphi.thirdpartytools.general)
  • Re: Environment Variables
    ... EvanK wrote: ... environment variables to present them to a user? ... Anyway, see GetEnvironmentStrings ... With sufficient thrust, pigs fly just fine. ...
    (microsoft.public.vc.language)
  • Re: JCL parms
    ... Subject: JCL parms ... Or better yet an enhancement by IBM to the JES Sub System ... Also I think LE adds a routine for Environment Variables as ...
    (bit.listserv.ibm-main)
  • Re: JCL parms
    ... Or better yet an enhancement by IBM to the JES Sub System itself so that ... Also I think LE adds a routine for Environment Variables as well called ... are simply used for textual replacements during JCL conversion and are ... //name SETENV value ...
    (bit.listserv.ibm-main)