Archive: HowTo: figure out where files put in $DOCUMENTS are located?


HowTo: figure out where files put in $DOCUMENTS are located?
Is there a standard Win32-Api way (or MFC) to access data files that are installed in the subdirectory referenced by the nsis constant $DOCUMENTS ... that can be relied on to work with Win98-FirstEdition (and later), Win2000, and WinXp?

I'm intending to use nsis 2.19 with something like:
SetShellVarContext current
CreateDirectory "$DOCUMENTS\MyCompany\MyApp"
SetOutPath $DOCUMENTS\MyCompany\MyApp
File $DOCUMENTS\MyCompany\MyApp\MyFile.data

With WinXp, I'm aware of the environment variables USERPROFILE and HOMEPATH. I believe these are set as part of installation of WinXp. However, my impression is that they aren't available for older operating systems.

I suppose MyApp.exe can build up the complete directory by checking registry entries and environment variables, but I wanted to check if there is a standard way of accomplishing this.

Thanks,


http://msdn.microsoft.com/library/de...folderpath.asp

or

http://msdn.microsoft.com/library/de...erlocation.asp


Thanks ...