I have some small questions...I have a program that stores a list of users in a database and compares on program startup if the user is in the list or is an administrator before letting them use it. At the moment, the way I'm using to check if the user is an administrator is simply by comparing the username to a string constant called 'ADMINISTRATOR'. Will this work on a non-Engish system? I.E. does Windows use a language specific version of 'administrator'? Or maybe is there an enumerated version of the Admin user that I can use to check with instead of my 'ADMINISTRATOR' string? (you know, just like how Windows folders are enumerated). I'm using Delphi 2009 by the way. Thanks in advance!
Microsoft Windows 10In the User Accounts window, click on the User Accounts link. On the right hand side of the User Accounts window will be listed your account name, account icon and a description. If the word “Administrator” is in your account's description, then you are an administrator.
To log on as an administrator, you need to have a user account on the computer with an Administrator account type. If you are not sure if the account that you have on the computer is an administrator account, you can check the account type after you have logged on.
Open the Control Panel. Click the User Accounts option. In User Accounts, you see your account name listed on the right side. If your account has admin rights, it will say "Administrator" under your account name.
No, don't do it that way. It will surely break. You could get a list of all the groups the user is a member of and check if one of the SIDs is S-1-5-32-544
, which is the SID of the Administrators group. There is a list of well known SIDs. There is also an SID for the original administrator account.
Here is the list:
http://support.microsoft.com/kb/243330
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With