Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

Admin Rights - how to determine


1 reply to this topic

rkjain

rkjain
  • Members
  • 4 posts

Posted 18 June 2003 - 00:00

Which registry entry should I read which would enable me to determine whether I have admin rights to install or not.

Taco Bell

Taco Bell

    IS6 Expert

  • Moderators
  • 1,281 posts

Posted 18 June 2003 - 03:26

You don't use registry entries, just use a built-in function call. The code to do so would be the following:

CODE
NUMBER nResult;
STRING szMsg;

 nResult = Is(USER_ADMINISTRATOR,"");
 if (nResult = FALSE) then
   szMsg = "This install requires Administrator privileges.\n" +
                 "Please login with such rights and try again.";
   Msg(szMsg, SEVERE);
   abort;
 endif;

user posted image