If you need to execute external program with administrator/elevated privileges, you can use the runas method with the alternative ShellExecuteEx function:.
wiki.freepascal.org