Skip to main content
guest
Join | Help | Sign In
Liberty BASIC Community Wiki Home
guest| Join | Help | Sign In
Liberty BASIC Community Wiki
  • Wiki Home
  • Recent Changes
  • Pages and Files
  • Members
  • Home
    • Liberty BASIC FAQ
    • Contests
    • Tutorials
    • Science
    • Shared Code
    • Tips
    • DLLs
    • PublicDomainSprites
    • Member Pages
    • Links
    • Sandbox

IsUserAnAdmin

Edit 1 3 …
  • 0 Tags
    • No tags
  • Notify
  • RSS
  • Backlinks
  • Source
  • Print
  • Export (PDF)
Older Version Newer Version

bshipps64 bshipps64 Feb 19, 2006 - "First created"

IsUserAnAdmin() function

Determines whether the currently logged on user is a member of the Administrator's group.

  • There are times when a program needs to perform an operation that requires the current user to have administrative privileges. This function uses a Shell32 API call to query as to whether the user is an administrator, returning 1 for true and 0 for false.

 isAdmin = IsUserAnAdmin() 
if not(isAdmin) then n$ = "not "
print "Current user is "; n$; "an administrator"
end

function IsUserAnAdmin()
calldll #shell32, "IsUserAnAdmin",_
IsUserAnAdmin as boolean
end function
Help · About · Pricing · Privacy · Terms · Support · Upgrade
Contributions to https://basic.wikispaces.com/ are licensed under a Creative Commons Attribution Share-Alike 2.5 License. Creative Commons Attribution Share-Alike 2.5 License
Portions not contributed by visitors are Copyright 2018 Tangient LLC
TES: The largest network of teachers in the world
Turn off "Getting Started"
  1. Home
  2. ...
Loading...