Found the solution. So, if you need to run specific installator with elevated privileges during your setup you need:
Specify your installator in
Files
section as follows:[Files] Source: "SomeSetup.exe"; DestDir: "{tmp}"; AfterInstall: SomeSetupAfterInstall()
In
Code
section you shall defineSomeSetupAfterInstall()
. There you should run your installator withrunas
verb usingShellExec
if it is not admin launched setup. It might be like this:procedure SomeSetupAfterInstall(); var ErrorCode: Integer; TmpPath: String; RunMethod: String; begin TmpPath:=ExpandConstant('{tmp}'); if not IsAdminLoggedOn() then begin RunMethod := 'runas'; end else begin RunMethod := ''; end; ShellExec (RunMethod, TmpPath + '\SomeSetup.exe', '', '', SW_SHOW, ewWaitUntilTerminated, ErrorCode); end;