Discussion:
API which can give me All Users/Current User directory path
(too old to reply)
Kamal
2007-06-01 04:47:03 UTC
Permalink
Hello All,

Iam confused where to post this question as I did not get the proper forum
where I can post a query related to Windows APIs.
I need to know an API which can give me the All Users/Current User
directory. The path of these directories will be "C:\Documents and
Settings\All Users" for Current User it will be "C:\Documents and
Settings\Current User Name". Please let me know if there is an API which can
give me the path of these directories as I cannot hardcode it in the program.

Thanks,
Kamal
Gary Chanson
2007-06-01 12:31:45 UTC
Permalink
Post by Kamal
Hello All,
Iam confused where to post this question as I did not get the proper forum
where I can post a query related to Windows APIs.
I need to know an API which can give me the All Users/Current User
directory. The path of these directories will be "C:\Documents and
Settings\All Users" for Current User it will be "C:\Documents and
Settings\Current User Name". Please let me know if there is an API which can
give me the path of these directories as I cannot hardcode it in the program.
GetEnvironmentVariable(USERPROFILE,...) and
GetEnvironmentVariable(ALLUSERSPROFILE,...).
--
- Gary Chanson (Windows SDK MVP)
- Abolish Public Schools
Loading...