Yes. And you will have to use the function 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;
Perfect friend!! Thank you very much.
– Andrey