Delphi - Find out if the application has administrator privileges.

2

Good afternoon, I need to know if an application written in Delphi is running with administrator privileges or not. Does anyone know of any way to get this information?

    
asked by anonymous 04.08.2016 / 20:40

1 answer

3

Windows has a routine that returns if the user has administrator permissions, you can access it through the ShellAPI unit, declaring the external routine in the unit header as follows:

function IsUserAnAdmin(): BOOL; external shell32;
    
04.08.2016 / 21:54