Wednesday 31 December 2008

Enable/Disable Task Manager

This is the easiest way to enable/disable your Task Manager =)

Create Visual Basic Script (.vbs) file using Notepad to enable/disable your Task Manager.

Step 1 : right click on your desktop or window, point to "new" and select "Text Document"

Step 2 : type or copy paste script below into your text document :

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 are 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


Step 3 : save as ".vbs" file and exit Notepad. Example : taskmanager.vbs

Step 4 : double click on the file you just created and popup window will appear.

or you can download the file HERE
now you're done !

No comments:

Post a Comment