Newsgroups : Borland : borland.public.delphi.nativeapi.win32 : 2008 Jul : SHGetFolderPath() from a service application

www.cryer.info
Managed Newsgroup Archive

SHGetFolderPath() from a service application

Subject:SHGetFolderPath() from a service application
Posted by:"Adrien Reboisson" (adrien-reboissonatastasedotc..@lala.com)
Date:Thu, 10 Jul 2008 21:01:58 +0200

Hi,

I'm trying to get paths (CSIDL_MYDOCUMENTS, CSIDL_DESKTOP and
CSIDL_PROFILE) for all the interactive users from a service application
running in the LocalSystem account.

SHGetFolderPath() takes a hToken parameter, which "can be used to
represent a particular user". Is there another solution than calling
LogonUser() to generate this token ? To call LogonUser(), knowing the
user password is compulsory, and I want to avoid to store any password
in my application.

I know how to enumerate the users, but I don't see exactly how I could
fetch the paths I need without knowing each user's password.

Any hint appreciated !

Regards,

A.R.

Glossary

File Types

Replies:

www.cryer.info
Managed Newsgroup Archive