Go Back   Winamp Forums > Developer Center > NSIS Discussion

Reply
Thread Tools Search this Thread Display Modes
Old 22nd August 2006, 15:10   #1
l_d_allan
Member
 
l_d_allan's Avatar
 
Join Date: Jun 2005
Location: Colorado Springs, CO
Posts: 94
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,
l_d_allan is offline   Reply With Quote
Old 22nd August 2006, 21:52   #2
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 2,776
http://msdn.microsoft.com/library/de...folderpath.asp

or

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

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 23rd August 2006, 09:47   #3
l_d_allan
Member
 
l_d_allan's Avatar
 
Join Date: Jun 2005
Location: Colorado Springs, CO
Posts: 94
Thanks ...
l_d_allan is offline   Reply With Quote
Reply
Go Back   Winamp Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump