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

different behaviour of IA713 and IA2008 on rule check

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("");

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?
Labels (1)
0 Kudos
(1) Reply
Level 7

On windows, I check if a user has administrator privileges by checking if he has write permissions to %SystemPath%/drivers/etc/services file.

RandomAccessFile services_file =
new RandomAccessFile(services_path, "rw");
ip.setVariable("USER_NAME", "Administrator");
catch (Exception e)

The problem is with IA713, the above code works fine. But with IA2008 VP1, it doesn't. why? In IA713, the USER_NAME variable used to set to 'Administrator' for a user having admin privileges, but IA 2008 VP1 doesn't.
Any idea why?
0 Kudos