Tested and working on Win 2k and XP.



In notepad, copy/paste the following script, and save the file with a .vbs extension, then run it :
(Onama Name 1k dila .vbs kiyala save karanna. eeta passe double click karala balanna.)
************************************************************************
'Enable/Disable Task Manager
'By PatheticCockroach - based on an idea by Doug Knox
'© 2005 MPAM Rebooted
'This code may be freely distributed/modified as long as it remains free of charge
Option Explicit
'Declare variables
Dim WSHShell, rr, rr2, MyBox, val, val2, ttl, toggle
Dim jobfunc, itemtype
On Error Resume Next
Set WSHShell = WScript.CreateObject("WScript.Shell")
val = "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\System\DisableTaskMgr"
val2 = "HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\System\DisableTaskMgr"
itemtype = "REG_DWORD"
jobfunc = "Task Manager is now "
ttl = "Result"
'reads the registry key value.
rr = WSHShell.RegRead (val)
rr2 = WSHShell.RegRead (val2)
toggle=1
If (rr=1 or rr2=1) Then toggle=0
If toggle = 1 Then
WSHShell.RegWrite val, 1, itemtype
WSHShell.RegWrite val2, 1, itemtype
Mybox = MsgBox(jobfunc & "disabled.", 4096, ttl)
Else
WSHShell.RegDelete val
WSHShell.RegDelete val2
Mybox = MsgBox(jobfunc & "enabled.", 4096, ttl)
End If
************************************************************************
Me script 1ka yata thiyana link eken ganna puluwan.






In notepad, copy/paste the following script, and save the file with a .vbs extension, then run it :
(Onama Name 1k dila .vbs kiyala save karanna. eeta passe double click karala balanna.)
************************************************************************
'Enable/Disable Task Manager
'By PatheticCockroach - based on an idea by Doug Knox
'© 2005 MPAM Rebooted
'This code may be freely distributed/modified as long as it remains free of charge
Option Explicit
'Declare variables
Dim WSHShell, rr, rr2, MyBox, val, val2, ttl, toggle
Dim jobfunc, itemtype
On Error Resume Next
Set WSHShell = WScript.CreateObject("WScript.Shell")
val = "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\System\DisableTaskMgr"
val2 = "HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\System\DisableTaskMgr"
itemtype = "REG_DWORD"
jobfunc = "Task Manager is now "
ttl = "Result"
'reads the registry key value.
rr = WSHShell.RegRead (val)
rr2 = WSHShell.RegRead (val2)
toggle=1
If (rr=1 or rr2=1) Then toggle=0
If toggle = 1 Then
WSHShell.RegWrite val, 1, itemtype
WSHShell.RegWrite val2, 1, itemtype
Mybox = MsgBox(jobfunc & "disabled.", 4096, ttl)
Else
WSHShell.RegDelete val
WSHShell.RegDelete val2
Mybox = MsgBox(jobfunc & "enabled.", 4096, ttl)
End If
************************************************************************
Me script 1ka yata thiyana link eken ganna puluwan.








