I wish to disable the task manager when my program is running. Also, I wish to disable the Ctrl+Alt+Delete, Ctrl+Esc (Start button), as per your code, it simply does not work.
Help me to do it.
Printable View
I wish to disable the task manager when my program is running. Also, I wish to disable the Ctrl+Alt+Delete, Ctrl+Esc (Start button), as per your code, it simply does not work.
Help me to do it.
This might help you:
Private Declare Function SystemParametersInfo Lib "user32" Alias "SystemParametersInfoA" (ByVal uAction As Long, ByVal uParam As Long, ByVal lpvParam As Any, ByVal fuWinIni As Long) As Long
Private Const SPI_SCREENSAVERRUNNING = 97
SystemParametersInfo SPI_SCREENSAVERRUNNING, True, "1", 0
'to disable screensaver: set True to False :D
What it does is simulating that the screensaver is running. You won't get one, but the system thinks it really is there. This will both disable Ctr+Alt+Del and Ctr+Esc.
There is a API function, called unregisterhotkey (speaks for itself) but I do not have the time to search for you right now how to use it, sorry. I hope this will be helpful to you and that you want create virusses with it ;).
Here's the keys for TaskMan, get the registry function off your favorite API site:
VB Code:
Private Sub cmdDisable_Click() SaveToRegistry HKEY_CURRENT_USER, "Software\Microsoft\Windows\CurrentVersion\Policies\System", "DisableTaskMgr", 1 FormInit End Sub Private Sub cmdEnable_Click() SaveToRegistry HKEY_CURRENT_USER, "Software\Microsoft\Windows\CurrentVersion\Policies\System", "DisableTaskMgr", 0 FormInit End Sub