Skip to content
⌘ NSIS Forum Archive

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

4 posts

idioteque2#

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 ?
MSG#
You can SetShellVarContext all and StrCpy $INSTDIR $APPDATA in .onInit, or in the page's prefunction.
idioteque2#
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.