Try this
function CreateProcessWithLogon(use
const
LOGON_WITH_PROFILE=1;
var
lsi: TStartupInfo;
lpi: TProcessInformation;
begin
ZeroMemory(@lsi, sizeOf(lsi));
lsi.cb := sizeOf(lsi);
ZeroMemory(@lpi, sizeOf(lpi));
CreateProcessWithLogonW(PW
LOGON_WITH_PROFILE, nil,PWideChar(wideString(c
nil, nil, lsi, lpi);
Result := GetLastError
end;
Main Topics
Browse All Topics





by: TheRealLokiPosted on 2006-05-23 at 16:51:24ID: 16747485
You need to use "ImpersonateUser" e.com/Prog ramming/ Pr ogramming_ Languages/ Delphi/Q_2 1027137.ht ml
take a look at this question
http://www.experts-exchang
I think your user needs some privileges set up
I can't quite recall if you need
"Act as part of the operating system" - SeTcbPrivilege
"Increase quotas" - SeIncreaseQuota
"Replace a process level token" - SeAssignPrimaryToken
or any of them in fact, been so long since I had to do this sort of thing :-)