How To Disable And Enable Task Manager In VB.NET

this only works in windows xp . you will need two buttons , add two buttons and double click form and add this and change the button1 text to enable and button 2 disable 

double click your form and add this
Public Class Form1

    'Author : Mohamed Shimran
    'Blog : http://www.ultimateprogrammingtutorials.blogspot.com

    Dim Regkey As Object
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Regkey = CreateObject("WScript.Shell")
    End Sub
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Regkey.RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\System\DisableTaskMgr", 0, "REG_DWORD")
    End Sub
    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        Regkey.RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\System\DisableTaskMgr", 1, "REG_DWORD")
    End Sub
End Class

done

1 comments:

Thanks y Mas..
ne sangat membantu

Reply

Post a Comment

Note: Only a member of this blog may post a comment.