I was wondering, on a Windows platform is there any API/CSIDL to retrieve the Library folder path for the Public user account?
Path like this: “C:\Users\Public”
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Don’t use environment variables for this. Use the correct API for this, which is SHGetKnownFolderPath.
To get the path to the public folder, pass
FOLDERID_Publicas the first parameter to SHGetKnownFolderPath.If you need to support pre-Vista operating systems as well, use SHGetFolderPath instead, passing
CSIDL_COMMON_DOCUMENTSas the first param.