From ad869b950c5f85bec0aa76783c47dcaf5ec39cc0 Mon Sep 17 00:00:00 2001 From: Roberto Pastor Muela <37798125+RobPasMue@users.noreply.github.com> Date: Fri, 5 May 2023 15:25:01 +0200 Subject: [PATCH] feat: allowing for multi-user installation --- setup.nsi | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/setup.nsi b/setup.nsi index bac80bbf..36618938 100644 --- a/setup.nsi +++ b/setup.nsi @@ -11,14 +11,28 @@ Name "${PRODUCT_NAME}" VIProductVersion "${PRODUCT_VERSION}" OutFile "dist\${OUTFILE_NAME}" +!define MULTIUSER_EXECUTIONLEVEL Highest +!define MULTIUSER_MUI +!define MULTIUSER_INSTALLMODE_COMMANDLINE +!include MultiUser.nsh +!include MUI2.nsh +!include InstallOptions.nsh -!include "MUI2.nsh" -!include "InstallOptions.nsh" !define MUI_PAGE_CUSTOMFUNCTION_PRE oneclickpre +!insertmacro MULTIUSER_PAGE_INSTALLMODE !insertmacro MUI_PAGE_LICENSE "${LICENSE_FILE}" !insertmacro MUI_PAGE_INSTFILES +!insertmacro MUI_LANGUAGE English !include "uninstall.nsi" +Function .onInit + !insertmacro MULTIUSER_INIT +FunctionEnd + +Function un.onInit + !insertmacro MULTIUSER_UNINIT +FunctionEnd + ; Define the installer sections Section "Ansys Python Manager" SEC01 ; Set the installation directory to the program files directory