Re: [GD-Windows] Security/access when writing to registry
Brought to you by:
vexxed72
From: Matthijs H. <mat...@al...> - 2003-01-22 08:53:26
|
> The problem with HKCU is that, well, it's per user. I don't know if you can do this with the registry. There is, however, a "common data" folder on most Windows systems. For example, on my WinXP box it is "C:\Documents and Settings\All Users\Application Data". You can get it with SHGetSpecialFolderLocation(..., CSIDL_COMMON_APPDATA, ...). In case you have old headers, the corresponding numeric value is 0x23. There is also a CSIDL_COMMON_DOCUMENTS folder (0x2e). This appears to work on all versions of Windows, except NT4 (depending on the version of Internet Explorer that is installed). In that case, you can get the location of this folder from the registry key "HKLM\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders". Not a very clean solution, I know. Hope it helps, -- Matthijs Hollemans www.allyoursoftware.com |