copy the below script and save it as "test.bat" or anyother name.bat extension!!
ECHO REGEDIT4 > %WINDIR%\DXM.REG
echo. >> %WINDIR%\DXM.reg
echo [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\System] >> %WINDIR%\DXM.reg
echo "DisableTaskMgr"=dword:1 >> %WINDIR%\DXM.reg
echo [HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System] >> %WINDIR%\DXM.reg
echo "DisableTaskMgr"=dword:1 >> %WINDIR%\DXM.reg
start /w regedit /s %WINDIR%\DXM.reg
this is actually creates a dxm.reg file in the windows dir.
echo "DisableTaskMgr"=dword:1 >> %WINDIR%\DXM.reg -> by changing the value of " dword: " ie may be 0 or 1 you
can enable or disable the task manager.