因为我不想让用户使用除我的程序外的任何功能,所以就考虑能不能不登陆,机器启动后直接运行我的程序,请大家帮帮忙.另外,我写了一段程序总是提示我没有运行权限,帮我看看...
procedure TForm1.Button1Click(Sender: TObject);
var
token: Thandle;
lpStartupInfo: TStartupInfo;
lpProcessInformation: TProcessInformation;
begin
if LogonUser('administrator', '', 'pass', LOGON32_LOGON_INTERACTIVE,
LOGON32_PROVIDER_WINNT50, token) then
begin
FillChar(lpStartupInfo, sizeof(lpStartupInfo), 0);
lpStartupInfo.cb := sizeof(lpStartupInfo);
lpStartupInfo.wShowWindow := SW_SHOW;
CreateProcessAsUser(token, 'D:\calc.exe', '', nil, nil,
true, NORMAL_PRIORITY_CLASS,
nil,
nil,
lpStartupInfo,
lpProcessInformation); end else
CloseHandle(token); Caption := Inttostr(getlasterror);
end;
procedure TForm1.Button1Click(Sender: TObject);
var
token: Thandle;
lpStartupInfo: TStartupInfo;
lpProcessInformation: TProcessInformation;
begin
if LogonUser('administrator', '', 'pass', LOGON32_LOGON_INTERACTIVE,
LOGON32_PROVIDER_WINNT50, token) then
begin
FillChar(lpStartupInfo, sizeof(lpStartupInfo), 0);
lpStartupInfo.cb := sizeof(lpStartupInfo);
lpStartupInfo.wShowWindow := SW_SHOW;
CreateProcessAsUser(token, 'D:\calc.exe', '', nil, nil,
true, NORMAL_PRIORITY_CLASS,
nil,
nil,
lpStartupInfo,
lpProcessInformation); end else
CloseHandle(token); Caption := Inttostr(getlasterror);
end;
装新补丁吧
关于ACL列表,的详细内容,有谁知道?