Skip to content
⌘ NSIS Forum Archive

Suggestion

7 posts

tomatirc#

Suggestion

I like to be included in the nsis installer a constant variable like $PROGRAMFILES for the common files in the program files directory.
Thanks

Sorry for my English
Guest#
is already available

$PROGRAMFILES is already available:

Please read NSIS documentation:

"$PROGRAMFILES : The program files directory (usually C:\Program Files but detected at runtime)."

- 😁 Hendri 😁 -
petersa#
Hi tomatirc,

This line of script will put the Common Files directory into variable $0 (if a Common Files directory exists):

  ReadRegStr $0 HKLM Software\Microsoft\Windows\CurrentVersion CommonFilesDir
This works for Windows XP. Not sure if it will work on other operating systems, such as Windows 95/98/Me, or other NT based operating systems.

Windows XP is an NT based OS, isn't it? 🙁 Please tell me it is!
petersa#
Cool. 😁 I would have thought it would be in a spot like 'Shell Folders' or something. Seems a bit weird in there because it's pretty much alone.