Menu

#843 MultiUser.nsh does not support $PROGRAMFILES64

3.0 Series
closed-fixed
5
2016-12-26
2008-11-28
No

When using MultiUser.nsh, it always uses $PROGRAMFILES.
When a x64 application should be installed, this should be $PROGRAMFILES64.

Please add an option like

MULTI_USER_USE_PROGRAMMFILES64

to support this behaviour.

Otherwise MultiUser.nsh is useless for x64 program installs.

(using x64.nsh redirection and SetRegView 64 do not do the job)

Discussion

  • Amir Szekely

    Amir Szekely - 2008-11-28
    • assigned_to: nobody --> joostverburg
     
  • Nobody/Anonymous

    The following patch adds the feature using a MULTIUSER_USE_PROGRAMFILES64 define which the 64 bit installer needs to set before including MultiUser.nsh:

    --- C:/Programme/NSIS/Include/MultiUser.nsh So Feb 1 15:44:30 2009
    +++ C:/Programme/NSIS/Include/Kopie von MultiUser.nsh Do Apr 30 15:34:13 2009
    @@ -91,7 +91,11 @@
    !if "${UNINSTALLER_PREFIX}" != UN
    ;Set default installation location for installer
    !ifdef MULTIUSER_INSTALLMODE_INSTDIR
    - StrCpy $INSTDIR "$PROGRAMFILES\${MULTIUSER_INSTALLMODE_INSTDIR}"
    + !ifdef --- C:/Programme/NSIS/Include/MultiUser.nsh So Feb 1 15:44:30 2009
    +++ C:/Programme/NSIS/Include/Kopie von MultiUser.nsh Do Apr 30 15:34:13 2009
    @@ -91,7 +91,11 @@
    !if "${UNINSTALLER_PREFIX}" != UN
    ;Set default installation location for installer
    !ifdef MULTIUSER_INSTALLMODE_INSTDIR
    - StrCpy $INSTDIR "$PROGRAMFILES\${MULTIUSER_INSTALLMODE_INSTDIR}"
    + !ifdef MULTIUSER_USE_PROGRAMFILES64
    + StrCpy $INSTDIR "$PROGRAMFILES64\${MULTIUSER_INSTALLMODE_INSTDIR}"
    + !else
    + StrCpy $INSTDIR "$PROGRAMFILES\${MULTIUSER_INSTALLMODE_INSTDIR}"
    + !endif
    !endif
    !endif

    @@ -129,7 +133,11 @@
    ${if} ${AtLeastWin2000}
    StrCpy $INSTDIR "$LOCALAPPDATA\${MULTIUSER_INSTALLMODE_INSTDIR}"
    ${else}
    + !ifdef MULTIUSER_USE_PROGRAMFILES64
    + StrCpy $INSTDIR "$PROGRAMFILES64\${MULTIUSER_INSTALLMODE_INSTDIR}"
    + !else
    StrCpy $INSTDIR "$PROGRAMFILES\${MULTIUSER_INSTALLMODE_INSTDIR}"
    + !endif
    ${endif}
    !endif
    !endif

    + StrCpy $INSTDIR "$PROGRAMFILES64\${MULTIUSER_INSTALLMODE_INSTDIR}"
    + !else
    + StrCpy $INSTDIR "$PROGRAMFILES\${MULTIUSER_INSTALLMODE_INSTDIR}"
    + !endif
    !endif
    !endif

    @@ -129,7 +133,11 @@
    ${if} ${AtLeastWin2000}
    StrCpy $INSTDIR "$LOCALAPPDATA\${MULTIUSER_INSTALLMODE_INSTDIR}"
    ${else}
    + !ifdef MULTIUSER_USE_PROGRAMFILES64
    + StrCpy $INSTDIR "$PROGRAMFILES64\${MULTIUSER_INSTALLMODE_INSTDIR}"
    + !else
    StrCpy $INSTDIR "$PROGRAMFILES\${MULTIUSER_INSTALLMODE_INSTDIR}"
    + !endif
    ${endif}
    !endif
    !endif

     
  • Nobody/Anonymous

    Sorry, the patch got crumbled, here goes the patch again:

    --- C:/Programme/NSIS/Include/MultiUser.nsh So Feb 1 15:44:30 2009
    +++ C:/Programme/NSIS/Include/Kopie von MultiUser.nsh Do Apr 30 15:34:13 2009
    @@ -91,7 +91,11 @@
    !if "${UNINSTALLER_PREFIX}" != UN
    ;Set default installation location for installer
    !ifdef MULTIUSER_INSTALLMODE_INSTDIR
    - StrCpy $INSTDIR "$PROGRAMFILES\${MULTIUSER_INSTALLMODE_INSTDIR}"
    + !ifdef MULTIUSER_USE_PROGRAMFILES64
    + StrCpy $INSTDIR "$PROGRAMFILES64\${MULTIUSER_INSTALLMODE_INSTDIR}"
    + !else
    + StrCpy $INSTDIR "$PROGRAMFILES\${MULTIUSER_INSTALLMODE_INSTDIR}"
    + !endif
    !endif
    !endif

    @@ -129,7 +133,11 @@
    ${if} ${AtLeastWin2000}
    StrCpy $INSTDIR "$LOCALAPPDATA\${MULTIUSER_INSTALLMODE_INSTDIR}"
    ${else}
    + !ifdef MULTIUSER_USE_PROGRAMFILES64
    + StrCpy $INSTDIR "$PROGRAMFILES64\${MULTIUSER_INSTALLMODE_INSTDIR}"
    + !else
    StrCpy $INSTDIR "$PROGRAMFILES\${MULTIUSER_INSTALLMODE_INSTDIR}"
    + !endif
    ${endif}
    !endif
    !endif

     
  • Hans E. Molin

    Hans E. Molin - 2010-01-08

    It would be nice if this patch could be included in the official release.

     
  • Sean M. Pappalardo

    While this patch is very useful, it should be extended to do the same for COMMONFILES64 and any other 64-bit-specific items.
    Will there ever be another NSIS release??

     
  • Jean-Pierre Bergamin

    Instead of patching MultiUser.nsh I use quite a bruteforce method to support $PROGRAMFILES64. I replace $PROGRAMFILES with $PROGRAMFILES64 in $INSTDIR with the StrRep function that can be found here: http://nsis.sourceforge.net/Another_String_Replace_%28and_Slash/BackSlash_Converter%29

    ${StrReplace} $INSTDIR $PROGRAMFILES $PROGRAMFILES64
    StrCpy $INSTDIR $0

     
  • Roberto Bagnara

    Roberto Bagnara - 2016-12-22

    Can a maintainer comment on why the patch provided for this very old bug has not been included in the official releases? The problem seems to be still there and it is very annoying.

     
    • Anders

      Anders - 2016-12-23

      This ticket was assigned to the person that wrote MultiUser and it just dropped off the map for everyone else. I'll see what I can do about it...

       
  • Anders

    Anders - 2016-12-26
    • labels: Scripting --> MultiUser, WOW64
    • status: open --> closed-fixed
    • Group: --> 3.0 Series
     

Log in to post a comment.