10-14-2011، 03:01 PM
با سورس زیر میتونید task manager رو غیر فعال کنید.
کد:
Option Explicit
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
' Copyright آ©2002-2005 Sanchit Karve, All Rights Reserved.
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
' This code explains how to disable and enable the Task
' Manager in Windows XP.
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
' For any queries,suggestions and bug reports feel free
' to contact me at born2c0de@hotmail.com
'***********************************************************************
' CONSTANTS
'***********************************************************************
Private Const KEY_ALL_ACCESS = &H2003F
Private Const HKEY_CURRENT_USER = -2147483647
Private Const ENABLE_TASKMGR = 0
Private Const DISABLE_TASKMGR = 1
'***********************************************************************
' Windows API Declarations for Registry Functions
'***********************************************************************
Private Declare Function RegOpenKeyEx Lib "advapi32" Alias "RegOpenKeyExA" ( _
ByVal hKey As Long, ByVal lpSubKey As String, ByVal ulOptions As Long, _
ByVal samDesired As Long, ByRef phkResult As Long) As Long
Private Declare Function RegSetValueEx Lib "advapi32.dll" Alias "RegSetValueExA" ( _
ByVal hKey As Long, ByVal lpValueName As String, ByVal Reserved As Long, _
ByVal dwType As Long, lpData As Any, ByVal cbData As Long) As Long
Private Declare Function RegCloseKey Lib "advapi32" (ByVal hKey As Long) As Long
' SETS THE VALUE IN THE REGISTRY
Private Sub SetKeyDataValue(KeyValueData As Integer)
Dim OpenKey As Long, SetValue As Long, hKey As Long
OpenKey = RegOpenKeyEx(HKEY_CURRENT_USER, "Software\Microsoft\Windows\CurrentVersion\Policies\System", 0, KEY_ALL_ACCESS, hKey)
SetValue = RegSetValueEx(hKey, "DisableTaskMgr", 0&, 4, CLng(KeyValueData), 4)
SetValue = RegCloseKey(hKey)
End Sub
Private Sub cmddisable_Click()
Dim retval As Byte
Call SetKeyDataValue(DISABLE_TASKMGR)
retval = MsgBox("Task Manager is now Disabled.", vbInformation, "TASK MANAGER DISABLED !!! -Sanchit Karve")
End Sub
Private Sub cmdenable_Click()
Dim retval As Byte
Call SetKeyDataValue(ENABLE_TASKMGR)
retval = MsgBox("Task Manager is now Enabled.", vbInformation, "TASK MANAGER ENABLED !!! -Sanchit Karve")
End Sub
گروه دور همی پارسی کدرز
https://t.me/joinchat/GxVRww3ykLynHFsdCvb7eg
https://t.me/joinchat/GxVRww3ykLynHFsdCvb7eg