This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallAnywhere
- :
- InstallAnywhere Forum
- :
- different behaviour of IA713 and IA2008 on rule check
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Nov 03, 2008
11:56 PM
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("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?
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?
(1) Reply
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Nov 06, 2008
10:46 PM
On windows, I check if a user has administrator privileges by checking if he has write permissions to %SystemPath%/drivers/etc/services file.
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?
try
{
RandomAccessFile services_file =
new RandomAccessFile(services_path, "rw");
ip.setVariable("USER_NAME", "Administrator");
}
catch (Exception e)
{
e.printStackTrace();
}
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?