asInvokerCreateProcess を使用するときに、UAC プロンプトをスキップする方法、または強制的に実行する方法はありますか?
これは私の現在のコードです:
var
si: TStartupInfo;
pi: TProcessInformation;
begin
ZeroMemory(@si, SizeOf(si));
si.cb := SizeOf(si);
CreateProcess(PChar(localFilePath), nil, nil, nil, false, CREATE_NEW_PROCESS_GROUP or NORMAL_PRIORITY_CLASS, nil, nil, si, pi);
end;
解決:
uses Windows;
SetEnvironmentVariable('__COMPAT_LAYER', 'RUNASINVOKER');