Thanks everyone 4 your contribution 'cos they set me thinking. I have found a way around it and that is setting the 'DisableTaskmgr' value to true in the Registry.
Here is how I was able to accomplish that:
To disable Taskmanager:
Hide Copy Code
Private Sub DisableTaskManager() Dim regkey As RegistryKey Dim keyValueInt As String = "1" Dim subKey As String = "Software\Microsoft\Windows\CurrentVersion\Policies\System" Try regkey = Registry.CurrentUser.CreateSubKey(subKey) regkey.SetValue("DisableTaskMgr", keyValueInt) regkey.Close() Catch ex As Exception MsgBox(ex.Message, MsgBoxStyle.Critical, "Registry Error!") End Try End Sub
To Enable TaskManager
Hide Copy Code
Private Sub EnableTaskManager() Dim regkey As RegistryKey Dim keyValueInt As String = "0" '0x00000000 (0) Dim subKey As String = "Software\Microsoft\Windows\CurrentVersion\Policies\System" Try regkey = Registry.CurrentUser.CreateSubKey(subKey) regkey.SetValue("DisableTaskMgr", keyValueInt) regkey.Close() Catch ex As Exception MsgBox(ex.Message, MsgBoxStyle.Critical, "Registry Error!") End Try End Sub

0 komentar:
Post a Comment