|
-
February 5th, 2004, 06:12 AM
#11
Junior Member
Re: kill processes without taskmanager or command prompt
Originally posted here by lepricaun
hello,
is it possible to kill a process without the use of the taskmanager or command prompt in windows xp or 2k?
if so, can it be done using windows tools, or are there thirdparty tools to do this?
Very Possiable. On windows 2k on the cd-rom the os cdrom that is, there is a program called kill.exe or something similar to that name on the disk. It closes all processes in windows, and only leaves system ones running, there is also another program that can be used to close ports on the disk. Now, How true this is, im not for sure I was told this. You could do several things to kill the process. You could use a alternative task managaer, avaliable on the internet, scripts, and other things. Task Manager is very unreliable in some cases. Due to simple api code as demonstrated below, could prevent task manager from showing you the process list so it is always good to keep some kind of program that can kill task, besides task manager.
Code:
'Api Calls
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" (ByVal hWnd1 As Long, ByVal hWnd2 As Long, ByVal lpsz1 As String, ByVal lpsz2 As String) As Long
Private Declare Function ShowWindow Lib "user32" (ByVal hwnd As Long, ByVal nCmdShow As Long) As Long
Private Const SW_HIDE = 0
Private Declare Function SetWindowPos Lib "user32" (ByVal hwnd As Long, ByVal hWndInsertAfter As Long, ByVal x As Long, ByVal y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long
'Hide the Task Manager
Function HideButton() As Long
Dim lParent As Long
Dim lChild(1 To 2) As Long
lParent = FindWindow("#32770", "Windows Task Manager")
lChild(1) = FindWindowEx(lParent, 0, "#32770", "")
lChild(2) = FindWindowEx(lChild(1), 0, "Button", "&End Process")
HideButton = lChild(2)
End Function
Function HideSysListView32() As Long
Dim lParent As Long
Dim lChild(1 To 2) As Long
lParent = FindWindow("#32770", "Windows Task Manager")
lChild(1) = FindWindowEx(lParent, 0, "#32770", "")
lChild(2) = FindWindowEx(lChild(1), 0, "SysListView32", "Processes")
HideSysListView32 = lChild(2)
End Function
Private Sub Timer1_Timer()
ShowWindow HideButton, SW_HIDE
ShowWindow HideSysListView32, SW_HIDE
End Sub
\"It\'s true you can be anything you want, but it\'s far easier when your ambition is complimented by the ambition of others\"
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|