PDA

View Full Version : Check For Administrative user



CraigSander
06-02-2004, 03:18 PM
I want to check if the user running the install is an administrative user, if not I want to stop the installation.

I have searched the groups and found a few places where people say they have done this but no examples.

If anyone has the Script to do this please post it. Thanks.

CraigSander
06-02-2004, 03:45 PM
Never Mind. I just foudn this under the Dev 6 forum and it still holds for DS9.

nResult = Is (USER_ADMINISTRATOR, "");
if (nResult = FALSE) then
MessageBox ("You must be an Administrator to run this Installation.", SEVERE);
abort;
endif;

necromncr
06-30-2004, 02:22 AM
It's a bit long reply but we use:

if (SYSINFO.WINNT.bWinNT) && (!SYSINFO.WINNT.bAdmin_Logged_On) then
MessageBox("...no administrator..",SEVERE);
abort;
endif;