Archive: How to set the default InstallDir to AllUsers in MUI_PAGE_DIRECTORY Page ?


How to set the default InstallDir to AllUsers in MUI_PAGE_DIRECTORY Page ?
Hi,

This is my first post so be kind :)

I have a question about the following I want to achieve with NSIS.

On the MUI_PAGE_DIRECTORY I would like the $APPDATA folder of all users to appear as default.

On Windows 7 and Vista this is:

c:\ProgramData\

On Windows XP this is:

c:\Documents and Settings\All Users\Application Data\

With the "SetShellVarContext all" I can install to those files to the correct location with each OS but I can't use the "SetShellVarContext" all unless it is on a section.

How can I set the Allusers AppData folder to show the correct folder in the MUI_PAGE_DIRECTORY Page ?


You can SetShellVarContext all and StrCpy $INSTDIR $APPDATA in .onInit, or in the page's prefunction.


Thank you for the reply,

Any hints on how to use StrCpy.

I'm just starting to learn NSIS and are unable to make it work.


It's all in the manual:
http://nsis.sourceforge.net/Docs/Chapter4.html#4.9.8.1