Home Here you can view your subscribed threads, work with private messages and edit your profile and preferences Registration is free! Frequently Asked Questions Search

HardwareDude.com Forum Index -> Tips & Tricks, Hacks and How to Articles and tutorials

Disable LogOff, TaskManager and ShutDown on Win NT systems


Post new topic   Reply to topic

  Author    Thread
sri
Moderator
Moderator


Joined: 28 Jan 2006
Posts: 381
Location: Hyderabad , India


 Reply with quote  
Disable LogOff, TaskManager and ShutDown on Win NT systems

Disable LogOff, TaskManager and ShutDown on Win NT systems (2000/XP)

If you want to hide your program from Windows NT compatibile systems (2000/XP) you'll need to mess with the registry...

The Enable CTRLALTDEL procedure accepts a boolean value for the YesNo parameter. If you send False, after the code has executed, if the user presses ctrl-alt-del, on the Windows Security dialog box, buttons [Task Manager], [Shut Down] and [Log off] will be disabled.

Usage:
EnableCTRLALTDEL(False)

procedure EnableCTRLALTDEL(YesNo : boolean) ;
const
sRegPolicies = '\Software\Microsoft\Windows\CurrentVersion\Policies';
begin
with TRegistry.Create do
try
RootKey:=HKEY_CURRENT_USER;
if OpenKey(sRegPolicies+'\System\',True) then
begin
case YesNo of
False:
begin
WriteInteger('DisableTaskMgr',1) ;
end;
True:
begin
WriteInteger('DisableTaskMgr',0) ;
end;
end;
end;
CloseKey;
if OpenKey(sRegPolicies+\Explorer\',True) then
begin
case YesNo of
False:
begin
WriteInteger('NoChangeStartMenu',1) ;
WriteInteger('NoClose',1) ;
WriteInteger('NoLogOff',1) ;
end;
True:
begin
WriteInteger('NoChangeStartMenu',0) ;
WriteInteger('NoClose',0) ;
WriteInteger('NoLogOff',0) ;
end;
end;
end;
CloseKey;
finally
Free;
end;
end;

Post Wed Feb 22, 2006 3:07 am 
 
  Display posts from previous:      



Post new topic   Reply to topic
Page 1 of 1



Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 



-Your Link Here-
Networking hardware and software solutions | web hosting directory | Web hosting and domain talk
Powered by phpBB: © 2008 HardwareDude.com | SiteMap |Privacy | Terms of Service
Powered By :