Finding startup files

Tim Golden tim.golden at viacom-outdoor.co.uk
Thu May 12 04:30:16 EDT 2005


[Mike Meyer]

[... snip discussions of where to put config files ...]

| Yes, but Windows these days supports multiple users. Are you sure that
| you want to restrict your users to one configuration file per
| installed version of the program?
| 
| I'm not sure Windows has a good solution to this problem. My
| experiences with trying to share applications between users on Windows
| haven't been very pleasant.

I have the impression that few configs are stored these days
without being per-user. However, there are "All Users"
versions of the appdata directories, and so on, which could
be used for such a purpose.

<code>

from win32com.shell import shell, shellcon
import win32api

print shell.SHGetPathFromIDList (
  shell.SHGetSpecialFolderLocation (1, shellcon.CSIDL_APPDATA)
)
print shell.SHGetPathFromIDList (
  shell.SHGetSpecialFolderLocation (0, shellcon.CSIDL_COMMON_APPDATA)
)

</code>

TJG

________________________________________________________________________
This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________



More information about the Python-list mailing list