Hallo nochmal,
hast du es wirklich schon mit ShellExecuteEx als Administrator versucht?
Delphi-Quellcode:
function ShellExec(aHandle: HWND; FileName, Parameters, Directory: string;
ShowCmd: Integer; AsAdmin, Wait: boolean): Boolean;
var
SEI: TShellExecuteInfo;
begin
FillChar(SEI, SizeOf(SEI), #0);
SEI.cbSize := SizeOf(SEI);
SEI.Wnd := aHandle;
SEI.fMask := SEE_MASK_NOCLOSEPROCESS;
if AsAdmin then SEI.lpVerb := 'runas'
else SEI.lpVerb := 'open';
SEI.lpFile := PChar(FileName);
SEI.lpParameters := PChar(Parameters);
SEI.lpDirectory := PChar(Directory);
SEI.nShow := ShowCmd;
Result := ShellExecuteEx(@SEI);
if Result then
if Wait then begin
if SEI.hProcess > 32 then begin
WaitForInputIdle(SEI.hProcess, INFINITE);
WaitForSingleObject(SEI.hProcess, INFINITE);
end;
end;
CloseHandle(SEI.hProcess);
end;