i have the following code to disable task manager of windows xp but it still displays a message the “task manager is disabled” and we have to press ok
how can i disable even this message ;
i want that when any one presses CTRL+ALT+DEL nothing happens even no message dialog.
HKEY hMykey;
DWORD pDWDisp;
unsigned char cData[1];
cData[0]='1';
LONG lRes = RegCreateKeyEx(HKEY_CURRENT_USER,
"Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\system",
0,"DisableTaskMgr",REG_OPTION_NON_VOLATILE,KEY_ALL_ACCESS,
NULL,&hMykey,&pDWDisp); // Open a key for edit
if(lRes != ERROR_SUCCESS)
{
MessageBox(0,"Error opening key","",MB_OK);
exit(0);// Shutdown on fail
}//End if
lRes = RegSetValueEx(hMykey,"DisableTaskMgr",0,REG_DWORD,
(LPBYTE)cData,sizeof(cData));// Add your key value
if(lRes != ERROR_SUCCESS)
{
MessageBox(0,"Error saving record","",MB_OK);
RegCloseKey(hMykey);
exit(0);// Shutdown on fail
}//End if
The key combination CTRL+ALT+DEL is intercepted and handled by Windows directly, not translated into a keypress message and sent to the active window like all other key combinations. This is to allow Windows to show the security desktop UI even if the machine has been compromised. Although you may be able to selectively disable certain features of the security desktop by manipulating registry keys, you will not be able to get rid of the desktop itself.
EDIT:
Moon, I’ve just noticed your previous attempt at asking this same question. This smacks of your client over-specifiying their requirements. Why would anyone want to disable Task Manager during the execution of a normal Windows application? The only genuine scenarios I can think of for this are: