Windows "known folders": is there any one that is read / write reliably for all users in all versions?

SHGetKnownFolderPath () and its cohorts take one of the constants defined here , returning the directory path.

I'm looking for one of these folders that is reliably writable by all users (including LocalSystem) on XP, Vista and Windows 7 ... but I think I am deleting. It looks like there isn't really a single hard drive space where you can put a file and be sure that all users can write to it on all these OS versions without having to insert permissions first.

It's true?

+2


a source to share


3 answers


You're right; there is no such folder.



You will need to create it yourself.

+2


a source


It seems that one parameter FOLDERID_PublicDocuments

, the other may be FOLDERID_ProgramData

. If there is a similar function you can use to get the document type folder (for the user) that might work as well.



Edit: This blog post might help you.

0


a source


%ALLUSERSPROFILE%

It will not be writable by processes with low integrity or restricted users.

0


a source







All Articles