Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[TUT]Enable and Disable TaskManger in vb.net [TUT]
#1
Enable.
Code:
Dim systemRegistry As RegistryKey = Registry.CurrentUser.CreateSubKey("Software\Microsoft\Windows\CurrentVersion\Policies\System")
        systemRegistry.SetValue("DisableTaskMgr", 0)
        systemRegistry.Close()
        SendStatus("Enabled TaskManger")

Disable.
Code:
Dim systemRegistry As RegistryKey = Registry.CurrentUser.CreateSubKey("Software\Microsoft\Windows\CurrentVersion\Policies\System")
        systemRegistry.SetValue("DisableTaskMgr", 1)
        systemRegistry.Close()
        SendStatus("Disabled TaskManger")


Have fun.
Reply
#2
Import

Code:
Imports Microsoft.Win32

Function

Code:
Function ToggleTaskManager(ByVal State As Integer)
        Try
            Dim systemRegistry As RegistryKey = Registry.CurrentUser.CreateSubKey("Software\Microsoft\Windows\CurrentVersion\Policies\System")
            If State = 0 Then
                systemRegistry.SetValue("DisableTaskMgr", 1)
                systemRegistry.Close()
            ElseIf State = 1 Then
                systemRegistry.SetValue("DisableTaskMgr", 0)
                systemRegistry.Close()
            End If
            Return True
        Catch ex As Exception
            Return False
        End Try
    End Function

Enable Task Manager

Code:
ToggleTaskManager(1)

Disable Task Manager

Code:
ToggleTaskManager(0)
[Image: cooldude.png]

(09-05-2011, 08:36 AM)Orgy Wrote: If you understand what you're doing, you aren't learning anything. ;)
Reply
#3
Thanks, although this is very simple it helped me! Smile
Reply
#4
Import

Code:
Imports Microsoft.Win32

Function

Code:
Function ToggleTaskManager(ByVal State As Integer)
        If Not State = 0 Or State = 1 Then
            Try
                Dim systemRegistry As RegistryKey = Registry.CurrentUser.CreateSubKey("Software\Microsoft\Windows\CurrentVersion\Policies\System")
                systemRegistry.SetValue("DisableTaskMgr", State)
                systemRegistry.Close()
                Return True
            Catch ex As Exception
                Return False
            End Try
        Else
            Return False
        End If
    End Function

Usage

Code:
ToggleTaskManager(1/0)

Less code. Same function. Just saying..
Reply
#5
You could also try using Winlock to disable some of Windows settings...

Link:
Code:
http://www.supportforums.net/showthread.php?tid=18700
USB Anti-virus? Try USB Drive Defender
[Image: 8bQCusS.jpg]
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  How to hook the keyboard. [VB.NET] [TuT] Vorfin 92 60,993 09-23-2019, 11:55 AM
Last Post: Jamimartin
  [TUT]Creating Advanced Web Browser with Awesome Theme Imaking31 0 1,320 05-25-2013, 03:12 AM
Last Post: Imaking31
  VB.NET Port Scanner [TUT] Fragma 30 14,474 11-27-2012, 11:26 PM
Last Post: ƃu∀ ıʞƃu∀
  [TUT] MD5 Encrypter & Finder [VB.NET] Fragma 12 7,857 11-25-2012, 10:36 PM
Last Post: ƃu∀ ıʞƃu∀
  [TUT] How to make a simple WebBrowser in VB 2010! [TUT] - [ Pictures] Statics 95 61,954 10-07-2012, 06:56 AM
Last Post: a99

Forum Jump:


Users browsing this thread: 1 Guest(s)