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
- :
- Check for Administrtors group or Power User
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
Not applicable
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
May 19, 2009
02:04 PM
Check for Administrtors group or Power User
Is there an option for Install Anywhere to check if the user has administrator priviledges or is in power users group ?
HKEY_LOCAL_MACHINE registry updates do not work without this priviledge, so it seems like it would be a common thing to test for.
HKEY_LOCAL_MACHINE registry updates do not work without this priviledge, so it seems like it would be a common thing to test for.
(1) Reply
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
May 19, 2009
02:30 PM
It is in the security service. Here's my rule:
import com.zerog.ia.api.pub.*;
import com.installshield.wizard.service.ServiceException;
import com.installshield.wizard.service.security.SecurityService;
public class IsAdminRule extends CustomCodeRule {
public boolean evaluateRule() {
SecurityService ss = (SecurityService) ruleProxy.getService(SecurityService.class);
boolean retval = false;
try {
retval = ss.isCurrentUserAdmin();
} catch (ServiceException se) {
return false;
}
return retval;
}
}
import com.zerog.ia.api.pub.*;
import com.installshield.wizard.service.ServiceException;
import com.installshield.wizard.service.security.SecurityService;
public class IsAdminRule extends CustomCodeRule {
public boolean evaluateRule() {
SecurityService ss = (SecurityService) ruleProxy.getService(SecurityService.class);
boolean retval = false;
try {
retval = ss.isCurrentUserAdmin();
} catch (ServiceException se) {
return false;
}
return retval;
}
}