cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
sandy_2008
Level 7

How to add a rule for user having admin privileges?

I want to display the panel only when the user is administrator or has administrator rights. For user 'administrator', we can put the Rule as
if "$USER_NAME$" equals "Administrator"
But how can we put a rule for a user who has administrator privileges?
Labels (1)
0 Kudos
(4) Replies
MEinstaller
Level 7

I believe there is custom code that you can download from the support site which will require that the user be administrator. You could probably use that code to set a rule which will display your panel when they are the admin.
0 Kudos
pv7721
Level 20

AFAIK there used to be such a plugin, but it was retired long ago, when they discovered that it didn't work too well.
0 Kudos
sandy_2008
Level 7

Th reason i'm asking this is because the behaviour is different for IA7.1.3 and IA2008 VP1 on Windows OS. This is the scenario:
I set a variable twice in my project file:
1. set environment variable action: for current user
rule: if $USER_NAME$ does not equal "Administrator"

2. set environment variable action: for all users
rule: if $USER_NAME$ equals "Administrator"

and this is how I calculate the user name:
String user_name = (String) System.getProperty("user.name");

The strange thing is that, when running the installer with a user having admin privileges,
using IA7.1.3, the above variable is set for 'All users' and is set for 'system environment variables"
using IA2008VP1, the variable is set for 'current user' and is set in 'User variables'

Why so?
0 Kudos
sandy_2008
Level 7

I guess it should not change the system variables and set the variable in User varaibles. Then how come in IA7.1.3, it change the System variables?
0 Kudos