Registriert seit: 29. Mai 2002
37.621 Beiträge
Delphi 2006 Professional
|
Re: Wie kann mein Programm den Taskmanager "ignorieren&
17. Jul 2003, 18:56
So ist es besser:
Delphi-Quellcode:
uses Registry;
procedure EnableCTRLALTDEL(flag: DWORD);
const
sRegPolicies = '\Software\Microsoft\Windows\CurrentVersion\Policies';
begin
with TRegistry.Create do
try
RootKey := HKEY_CURRENT_USER;
if OpenKey (sRegPolicies+'\System\', True) then
begin
WriteInteger ('DisableTaskMgr', flag);
CloseKey;
end;
if OpenKey (sRegPolicies+'\Explorer\', True) then
begin
WriteInteger('NoChangeStartMenu', flag);
WriteInteger('NoClose', flag);
WriteInteger('NoLogOff', flag);
CloseKey;
end;
finally
Free;
end;
end;
{ aktivieren }
procedure TForm1.Button2Click(Sender: TObject);
begin
EnableCTRLALTDEL(0);
end;
{ deaktiviren}
procedure TForm1.Button1Click(Sender: TObject);
begin
EnableCTRLALTDEL(1);
end;
Michael Ein Teil meines Codes würde euch verunsichern.
|
|
Zitat
|