this is perhaps a daft question; well, advice seeking really.
Wishing to avoid using the registry; I wish to place a 'global' preferences file accessible to all users on the computer regardless of whether they are running as an admin or a standard user etc.
On Vista, the folder returned by #CSIDL_COMMON_APPDATA (with the code below) is a likely looking candidate. On my Vista machine this returns "C:\ProgramData" and seems to be accessible to all users regardless.
Has anyone a better suggestion?
I'll use the registry if I have to, but I generally like to steer away from that.
The code I used to retrieve the folder in question is :
Code: Select all
Procedure.s GetSpecialFolder(SpecialFolder)
Define ListPtr.l, SpecialFolderPath.s
SpecialFolderPath = Space(#MAX_PATH)
If SHGetSpecialFolderLocation_(0, SpecialFolder, @ListPtr) = #NOERROR
SHGetPathFromIDList_(ListPtr, @SpecialFolderPath)
EndIf
ProcedureReturn Trim(SpecialFolderPath)
EndProcedure Thanks.


