Abs.Net web Page

Share Your Knowledge, Build your Network..

A Javascript Program to Disable and Enable Task Manager

Posted by absnet on 22 February 2010


Here’s a simple program to Activated or deActivated your task manager. The philosophy to activate or deactivated task manager  is simple, you  just write change registry value in  “HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\System\DisableTaskMgr” by 0 or 1.

  • 1 mean Yes, you disable task manager
  • 0 mean, No, enable task manager.

The program below use javascript and windows scripting to write the value into registry. To implement this program, here’s how:

1. Open Notepad

2. Disable wordwrap option in notepad

3. Copy paste listing program below.

4. Choose Save As, Name it as tsk_mgr.js, with save file type as : All Files

5.  Save in C:\ or any folder you like

// Compact Program to Access  Task Manager
// Program name: tsk_mgr.js

function preambule(messages)
{
natan.popup(messages,0,"Task Manager Guard");
}
function Write_It(myValue)
{
natan.RegWrite("HKCU\\Software\\Microsoft\\Windows\\CurrentVersion"+
"\\Policies\\System\\DisableTaskMgr",myValue,"REG_DWORD");
}
var vbYesNoCancel = 3, vbYes = 6, vbNo = 7, myValue, messages, MyQuestion, natan;
natan = WScript.CreateObject("WScript.Shell");
messages = "Choose a Menu :\n\n"+
"Click [Yes] to Non-activate Task Manager.\n"+
"Click [No] to activate Task Manager.\n"+
"Click [Cancel] to quit.\n\n"+
"[+] absnet.wordpress.com [+]\n\n"+
"Non-activating Task Manager now?";
MyQuestion = natan.popup(messages,0,"Task Manager Guard",vbYesNoCancel);
if (MyQuestion == vbYes)
{
myValue=1;
messages="Task Manager De-activated!";
Write_It(myValue);
preambule(messages);
}
else if (MyQuestion == vbNo)
{
myValue=0;
messages="Task Manager Activated!";
Write_It(myValue);
preambule(messages);
}
else
{
messages="Thank you for using this program.";
preambule(messages);
}

To run this program, right click the program and choose Open WithMicrosoft Windows Based Script Host. Open With Windows based script Host

Output of this program is as pictured below

Task Manager Guard 

Just Choose Yes, No, or Cancel

Leave a comment