tags:

views:

89

answers:

1

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 ALT+CLRT+ 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
+3  A: 

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:

  1. You are a network administrator and you want to disable Task Manager on all your workstations. In this scenario, you would use Group Policy to disable it, not a registry hack.
  2. You are writing a Kiosk application. I don't know much about Kiosk applications, but I'm sure there is an official Windows API somewhere to control how they run. Use that instead.
Christian Hayter
i am developing an embedded application for that purpose i need all of these.
moon
I think the point is that "You can't get there from here." Maybe if you posted a question with a wider scope (i.e. the overall goal) you will discover another path that doesn't involve using malware tactics to achieve your goal.
Nathan Strong