Per user dirs on Non-Unix platforms (was Re: [Python-Dev] Where to install non-code files)

Mark Hammond mhammond@skippinet.com.au
Fri, 26 May 2000 23:12:49 +1000


> Is there a reliable algorithm to find a "per-user" directory on any
> Win95/98/NT/2000 system?

Ahhh - where to start.  SHGetFolderLocation offers the following
alternatives:

CSIDL_APPDATA
Version 4.71. File system directory that serves as a common repository for
application-specific data. A typical path is C:\Documents and
Settings\username\Application Data

CSIDL_COMMON_APPDATA
Version 5.0. Application data for all users. A typical path is C:\Documents
and Settings\All Users\Application Data.

CSIDL_LOCAL_APPDATA
Version 5.0. File system directory that serves as a data repository for
local (non-roaming) applications. A typical path is C:\Documents and
Settings\username\Local Settings\Application Data.

CSIDL_PERSONAL
File system directory that serves as a common repository for documents. A
typical path is C:\Documents and Settings\username\My Documents.

CSIDL_PERSONAL
File system directory that serves as a common repository for documents. A
typical path is C:\Documents and Settings\username\My Documents.

Plus a few I didnt bother listing...

<sigh>

Mark.