How to disable Task Manager on all Windows versions (especially Windows 7)
Posted by Admin L in .NET Programming on 17-06-2011. Tags: .NET Programming Experience
Author: Nosa Lee
Original Address: https://www.seeksunslowly.com/disable-task-manager-dot-net
To reprint this article, please indicate the source, thank you.
_____________________________________
Sometimes, we need to disable Windows Task Manager temporarily to avoid user end the special program.
I found some related information on the Internet, some said that open C:\windows\system32\taskmgr.exe and C:\windows\syswow64\taskmgr.exe by binary stream, so as to let user cannot open Windows Task Manager manually; some said that add a 32-bit DWORD registry item under HKEY_CURRENT_USER\Software\Microsoft\Windows\Current Version\Policies\System path, name it as DisableTaskMgr and set to 1.
Above methods can work on XP- Windows, but cannot work on Vista/Windows 7+ due to UAC and permissions.
Here is my simple and feasible method after research/summarize the possible ways for VB 2008:
1. Create a new Windows Forms Application.
2. Put a Timer control (under Components category) on the Form.
3. Select Timer1 at the bottom of the Form Designer, and the press
4. Double-click Timer1, paste the following code:
[cc lang=”vbnet”]
For Each p As Process In Process.GetProcesses()
If p.ProcessName.ToLower = “taskmgr” Then p.Kill() : Exit For
Next
[/cc]
5. Run it, try to open Windows Task Manager by more ways (Start menu, right-click taskbar, press
Download the source codes
https://www.seeksunslowly.com/downloadable-source-codes/disable-task-manager-dot-net.zip