Indigo Rose Software

Go Back   Indigo Rose Software Forums > Setup Factory 8.0 > Setup Factory 8.0 FAQ

Reply
 
Thread Tools Display Modes
  #1  
Old 04-28-2008
Adam's Avatar
Adam Adam is offline
Indigo Rose Staff Member
 
Join Date: May 2000
Location: Indigo Rose Software
Posts: 2,154
How can I detect administrator privileges

Question
How can I detect administrator privileges

Answer
The article explains how to determine if the end user has administrative privileges using Setup Factory 7.0.

In general there are two main types of users on Windows NT-based operating systems (Windows NT 4.0, Windows 2000, Windows XP and Vista), these are:

- Administrators
- Users

Each type of user, or "User Group" has different privileges and access to different portions of the system. As a result it is often important to know which User Group your end user falls into, and the properties of each group.

The first, and most powerful group is the "Administrators". This group has access to the entire operating system, they are not limited to which registry keys they can edit, files the can modify, or what types of programs they can run. In general, users with Administrative privileges will be the users installing programs.

The most common, and restricted, group is the "Users" group. This group is made up of the people who work with the computer on a day-to-day basis. They only need access to certain programs and data files found on their local system or network. These users have restricted access to the operating system and the registry. The basic Users group grants people access the computer without giving them the ability to do damage to: the operating system, installed programs, important documents, or other security measures that may be place.

Members of the "Users" group cannot:

- Modify system wide registry settings
- Modify Operating System files
- Install programs accessible to other users

Members of the "Users" group can:

- Run programs installed by administrators
- Access the files within their user profile
- Modify their HKEY_CURRENT_USER registry settings

So if your installation needs to modify a registry value found outside HKEY_CURRENT_USER, or if you want the program being installed to be accessible to all users on the computer you must make sure that your installation is run by a user with administrative privileges.

To make this check easy, Setup Factory ships with an action to check for administrator rights:

Code:
UserInfo = System.GetUserInfo();
-- Reference UserInfo.IsAdmin to check for admin rights
-- If true, the user is an admin on an NT system, or is running a non-NT system.
-- If false, the user is not an admin on an NT system.
So when checking to make sure that your user is NOT an Administrator two checks have to be made:

- They are not running Windows 95, 98, or ME
- They are not an admin on an NT system

Conversely the following checks need to be made to determine that the user Is an Administrator:

- They are running Windows NT, 2000, or XP
- They are logged in with admin rights

In general it is easier to determine that the user is NOT an Administrator, simply because this makes it easy to include Windows 95, 98, and ME users, who will generally have "Administrator" privileges on their systems.

For more information please see the following topics in the Setup Factory Help:

Program Reference | Actions | System | System.GetUserInfo

Last edited by Adam; 04-29-2008 at 01:26 PM.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with "Automatically Detect Settings" Elleah TrueUpdate 2.0 12 06-13-2007 08:11 AM
Acrobat.det does not detect that Acrobat is not installed mlupo AutoPlay Media Studio 5.0 2 07-22-2005 07:51 AM
detect Acrobat Reader version dynamically andrewr AutoPlay Media Studio 5.0 2 05-20-2005 09:24 AM
Q with detect acrobat and reader lorenhsu1128 AutoPlay Media Studio 5.0 5 04-21-2004 07:48 PM
HOWTO: Detect Acrobat Version Support AutoPlay Media Studio 4.0 Examples 0 10-22-2002 05:01 PM


All times are GMT -6. The time now is 09:35 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Copyright © 2000 - 2009 Indigo Rose Corporation. All rights reserved.
Indigo Rose Software