From 396920381f5a83687e42628eca96cc8ae7d39010 Mon Sep 17 00:00:00 2001 From: Ben Soares Date: Fri, 28 Jun 2024 18:18:51 +0100 Subject: [PATCH] JAL-3631 Made an isAdmin flag to work in Windows Admin mode installation --- utils/install4j/install4j10_template.install4j | 32 +++++++++++++++--------- 1 file changed, 20 insertions(+), 12 deletions(-) diff --git a/utils/install4j/install4j10_template.install4j b/utils/install4j/install4j10_template.install4j index 0c78c38..e7133ce 100644 --- a/utils/install4j/install4j10_template.install4j +++ b/utils/install4j/install4j10_template.install4j @@ -322,7 +322,16 @@ - + + + + + + + Util.hasFullAdminRights() // this doesn't seem to work in some conditionals so creating our own boolean + + + isAdmin @@ -385,7 +394,7 @@ return wrapperLink; macWrapperLinkLocation - Util.isMacOS() && !Util.hasFullAdminRights() // Admin on macOS will add path to /etc/paths.d in Create File action + Util.isMacOS() && !context.getBooleanVariable("isAdmin") // Admin on macOS will add path to /etc/paths.d in Create File action @@ -559,7 +568,7 @@ return console.askOkCancel(message, true); User account ${i18n:WizardSelectTasks} - !Util.hasFullAdminRights() + !context.getBooleanVariable("isAdmin") @@ -603,8 +612,7 @@ return console.askOkCancel(message, true); ( Util.isMacOS() && !Util.hasFullAdminRights() ) // Admin on macOS will add path to /etc/paths.d && context.getVariable("macWrapperLinkLocation") != null ) - ) - + ) @@ -613,7 +621,7 @@ return console.askOkCancel(message, true); System ${i18n:WizardSelectTasks} - Util.hasFullAdminRights() + context.getBooleanVariable("isAdmin") @@ -759,11 +767,11 @@ return console.askOkCancel(message, true); - + - !Util.hasFullAdminRights() + !context.getBooleanVariable("isAdmin") @@ -858,11 +866,11 @@ context.getBooleanVariable("addToDockAction") - + - Util.hasFullAdminRights() + context.getBooleanVariable("isAdmin") @@ -936,7 +944,7 @@ context.getBooleanVariable("addToDockAction") - + @@ -1060,7 +1068,7 @@ context.getBooleanVariable("addToDockAction") - + -- 1.7.10.2