Colleagues:
Wery interesting problem: I need to find if the user, curently logged in, is Admin or not. This should work in any WinOS, from Win95B to WinME and from WinNT4 to WinXP.
I need it because I ammaking a program that is supposed to be used by Administrators only, whether it is WS or stand-alone machine. It is a utility program, that is to configure the environment for my mainstreem product. Therefore, I need to protect this program from being used by unsophisticated user.
I searched Windows Registry on my WinME machine trying to find my own name (and I was not logged into our LAN). I found it a-planty in MRU sections (my general folder for my projects carries my name), not much in any other section. The only place I found that seemed somewhat promising was
HKEY_USERS\DEFAULT\Software\Microsoft\MS Setup (ACME)\User Info\DefName
registry key.
I also searched my MSDN library (July 2001) trying to find if there is any API function for finding Admin's name - alas!
Any ideas, please?
TIA!
Regards,
Ilya
Wery interesting problem: I need to find if the user, curently logged in, is Admin or not. This should work in any WinOS, from Win95B to WinME and from WinNT4 to WinXP.
I need it because I ammaking a program that is supposed to be used by Administrators only, whether it is WS or stand-alone machine. It is a utility program, that is to configure the environment for my mainstreem product. Therefore, I need to protect this program from being used by unsophisticated user.
I searched Windows Registry on my WinME machine trying to find my own name (and I was not logged into our LAN). I found it a-planty in MRU sections (my general folder for my projects carries my name), not much in any other section. The only place I found that seemed somewhat promising was
HKEY_USERS\DEFAULT\Software\Microsoft\MS Setup (ACME)\User Info\DefName
registry key.
I also searched my MSDN library (July 2001) trying to find if there is any API function for finding Admin's name - alas!
Any ideas, please?
TIA!
Regards,
Ilya