This is my first post to this board so please forgive me if I am asking a question that has been answered in some other previous message tree.

Under Windows NT, is there a way to check if the logged in user has administrative rights to the machine they are logged on? I imagine I could try performing a task that only administrators can do like installing some service, or writing a bogus value in an admin-only registry key and then determine if they are an admin based on the success/failure of the action. That seems like an ugly solution to the problem though.

Any suggestions are appreciated.

Thank you,
James