Yes. And you'll have to use ShellExecuteEx
.
You can temporarily disable the environment variable SEE_MASK_NOZONECHECKS
:
Do not perform a zone check. This flag allows ShellExecuteEx
to
bypass zone checking put into place by IAttachmentExecute
.
To use it, do so:
Uses
ShellApi;
//...
function executarArquivo(const arquivo: string): LongBool;
Var
SE: TShellExecuteInfo;
begin
SE.cbSize := SizeOf(SE);
SE.fMask := SEE_MASK_NOZONECHECKS;
SE.lpFile := pchar(arquivo);
SE.nShow := SW_SHOWNORMAL;
//SE.lpVerb := 'runas'; // Para executar o programa como admin
Result := ShellExecuteEx(@SE);
end;