To disable Task Manager using Local Group Policy.
Open the Run Command dialog box.
Type gpedit.msc in the text box and click OK.
In the Local Group Policy Editor window, navigate to the path:
User Configuration Administrative Templates System Ctrl+Alt+Del Options
Next, move to the right pane and double-click on Remove Task Manager.
Select the Enabled radio button and click Apply.
Finally, click OK to save the changes.
To disable the Task Manager using Registry
Right-click on Start and select Run from the menu list.
Type regedit in the dialog box and click OK to launch the Registry Editor.
If the UAC window appears on the screen, click Yes to continue.
In the left pane, navigate to the following path:
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\System
If you don't find the System folder, right-click on Policies and select New Key.
Name it as System and press Enter.
Once you have the System folder, right-click on the pane and select New DWORD (32-bit) Value.
Name the key as DisableTaskMgr and press Enter.
Double-click on the new value and set 1 in the Value data field.
Click OK and restart your computer.