Terminate Process and SecurityIno ? 
Author Message
 Terminate Process and SecurityIno ?

Hello  again...

I have tried to write an application that termineates any process on my
win2000 machine. But some processes could be terminated normally with
the TerminateProcess() Method. Somewhere has answered to me that I must
open the Process in debug mode or modify the security context. But
how ?  Can anyone show me how I can modify the Security rights of an
process that is not mine. Sure I'm administrator on my machine but how
can I terminate processes that are not my own ?
I have read aboout Get/SetSecutityInfo() but without an example is this
a little difficult, and I don't have any Idea if this could be the
right way ?

thanks for each answear....

sincere M.Egloff

--
////////////////////////////////////////////////////////////////////////
// Egloff Mark             KabelNewMedia
// Dipl. Ingenieur         Nussgasse 4, CH-8008 Zurich

////////////////////////////////////////////////////////////////////////
The flesh is a trap but the magic gives us the freedom.....

Sent via Deja.com
http://www.*-*-*.com/



Tue, 01 Jul 2003 16:07:29 GMT  
 Terminate Process and SecurityIno ?
hi,
i am also trying on such a program. Can i ask  a question about that ? how
can i take the handle of process if ony if i know only its name ?

Quote:
> Hello  again...

> I have tried to write an application that termineates any process on my
> win2000 machine. But some processes could be terminated normally with
> the TerminateProcess() Method. Somewhere has answered to me that I must
> open the Process in debug mode or modify the security context. But
> how ?  Can anyone show me how I can modify the Security rights of an
> process that is not mine. Sure I'm administrator on my machine but how
> can I terminate processes that are not my own ?
> I have read aboout Get/SetSecutityInfo() but without an example is this
> a little difficult, and I don't have any Idea if this could be the
> right way ?

> thanks for each answear....

> sincere M.Egloff

> --
> ////////////////////////////////////////////////////////////////////////
> // Egloff Mark             KabelNewMedia
> // Dipl. Ingenieur         Nussgasse 4, CH-8008 Zurich

> ////////////////////////////////////////////////////////////////////////
> The flesh is a trap but the magic gives us the freedom.....

> Sent via Deja.com
> http://www.deja.com/



Tue, 01 Jul 2003 17:34:33 GMT  
 Terminate Process and SecurityIno ?
I am also trying to do the same thing too. If you make any progress, please
post it here. Is writing a C++ program the only way to terminate a process?

Thanks.

hzg.


Quote:
> hi,
> i am also trying on such a program. Can i ask  a question about that ? how
> can i take the handle of process if ony if i know only its name ?


> > Hello  again...

> > I have tried to write an application that termineates any process on my
> > win2000 machine. But some processes could be terminated normally with
> > the TerminateProcess() Method. Somewhere has answered to me that I must
> > open the Process in debug mode or modify the security context. But
> > how ?  Can anyone show me how I can modify the Security rights of an
> > process that is not mine. Sure I'm administrator on my machine but how
> > can I terminate processes that are not my own ?
> > I have read aboout Get/SetSecutityInfo() but without an example is this
> > a little difficult, and I don't have any Idea if this could be the
> > right way ?

> > thanks for each answear....

> > sincere M.Egloff

> > --
> > ////////////////////////////////////////////////////////////////////////
> > // Egloff Mark             KabelNewMedia
> > // Dipl. Ingenieur         Nussgasse 4, CH-8008 Zurich

> > ////////////////////////////////////////////////////////////////////////
> > The flesh is a trap but the magic gives us the freedom.....

> > Sent via Deja.com
> > http://www.deja.com/



Tue, 01 Jul 2003 23:13:57 GMT  
 Terminate Process and SecurityIno ?

Here an example how to terminate a process by name...
This example works under win98/2000 for other win versions you need a
correct toolhelp.dll

But this will also not solve my problem. Some processes are protected
from the system, if you want kill them it oocurs error 5, Access denied.
If you make any progress at this problem, please let me know...
thanks...

sincere Mark

#include "Tlhelp32.h"

void CKillRepAppDlg::OnTimer(UINT nIDEvent)
{
        PROCESSENTRY32 ProcEntry;
        HANDLE hSnapShot = CreateToolhelp32Snapshot
(TH32CS_SNAPPROCESS,0);

        if (Process32First(hSnapShot,&ProcEntry))
        {
                while(Process32Next(hSnapShot,&ProcEntry))
                {
                        CString szExeFile = ProcEntry.szExeFile;
                        szExeFile.MakeUpper();
                        if(szExeFile=="YOUR.EXE")
                        {
                                HANDLE hProc = OpenProcess
(PROCESS_TERMINATE,FALSE,ProcEntry.th32ProcessID);
                                if (hProc) TerminateProcess(hProc,0);
                                CloseHandle(hProc);
                        }
                }
        }

        CloseHandle(hSnapShot);

Quote:
}



Quote:
> I am also trying to do the same thing too. If you make any progress,
please
> post it here. Is writing a C++ program the only way to terminate a
process?

> Thanks.

> hzg.



> > hi,
> > i am also trying on such a program. Can i ask  a question about
that ? how
> > can i take the handle of process if ony if i know only its name ?


> > > Hello  again...

> > > I have tried to write an application that termineates any process
on my
> > > win2000 machine. But some processes could be terminated normally
with
> > > the TerminateProcess() Method. Somewhere has answered to me that
I must
> > > open the Process in debug mode or modify the security context. But
> > > how ?  Can anyone show me how I can modify the Security rights of
an
> > > process that is not mine. Sure I'm administrator on my machine
but how
> > > can I terminate processes that are not my own ?
> > > I have read aboout Get/SetSecutityInfo() but without an example
is this
> > > a little difficult, and I don't have any Idea if this could be the
> > > right way ?

> > > thanks for each answear....

> > > sincere M.Egloff

> > > --

> //////////////////////////////////////////////////////////////////////
//
> > > // Egloff Mark             KabelNewMedia
> > > // Dipl. Ingenieur         Nussgasse 4, CH-8008 Zurich

> //////////////////////////////////////////////////////////////////////
//
> > > The flesh is a trap but the magic gives us the freedom.....

> > > Sent via Deja.com
> > > http://www.deja.com/

--
////////////////////////////////////////////////////////////////////////
// Egloff Mark             KabelNewMedia
// Dipl. Ingenieur         Nussgasse 4, CH-8008 Zurich

////////////////////////////////////////////////////////////////////////
The flesh is a trap but the magic gives us the freedom.....

Sent via Deja.com
http://www.deja.com/



Thu, 03 Jul 2003 09:42:43 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Terminate Process and SecurityIno ?

2. Terminating a child process

3. Process suddenly terminates without notification

4. terminate process

5. Debugged Process will not Terminate under Win2K

6. Process suddenly terminates without notification

7. Find and terminate a process under WIN98

8. How to terminate a process

9. terminating an out of process application

10. Terminate process (WaitableTimer)

11. terminate or Exit process, need help!

12. Terminate or Exit Process, need help!

 

 
Powered by phpBB® Forum Software