English
Regulars table & Café

Killme

 
- Page 1 -


Hello Profaner...

beforehand one (integrally, integrally) small outlook hereon, what soon with the DACL_SET.INC possible his becomes .

No fear, is nothing Gefährliches - Perhaps (In any drop!) too time whom Taskmanager using?

comment is erwünscht, Please but with Betriebssystemangabe!

task: under NT/2000/XP Program switch off without itself abzumelden (is lösbar, wished not To difficult make ) or whom Button To pressing.
be tensely...

best Regards

AH

643 kB
Kurzbeschreibung: Killme - attempt me To kill!
Hochgeladen:09/05/05
Downloadcounter105
Download
 
09/04/05  
 



 
- Page 1 -


PS: the Program changes no Systemeinstellungen - only The the current Prozesses!

(plenty Fun)...
 
09/04/05  
 



would be it Yes gladly testing - but what should I testing?
 
09/04/05  
 




Rolf
Koch
@IF
simply Taskmanager open and try (without whom Button To clicking in the application) these application To killen.
thereafter time whom Button clicking and then killen.

@Andreas
correct under WinXP per

Rolf
 
09/04/05  
 



only whether it itself switch off can, alike How (only Shutdown and Log off isn't allows).
under windows2000 see I there in the moment yet 2 Opportunities - there yet More? functions it XP at all???
PS: Button pressing only emergency!
 
09/04/05  
 



now - it can itself by me completely free from problems How each application with the Taskmanager terminieren. (WinXPHome)

salvo, iF.
 
09/04/05  
 




Rolf
Koch
Hi Andreas,
or i was To voreilig?
application terminate becomes with not allows inspired prohibited.
Process terminate killt your application withal not allows

Rolf
 
09/04/05  
 



OK, there runs means something differently as under windows2000 - i'll time try, the lever differently To detect...
Register again!
 
09/04/05  
 



so, now must I first something explain:
I have here the actually Process the right PROCESS_TERMINATE geklaut, and the for each User (except SYSTEM).

alike How many rights one klaut, derjenige the the proprietor one Objektes is (here Process) keeps always The rights to that lists and Change the Zugriffsgerechtigungen (READ_CONTROL and WRITE_DAC). under windows2000 uses the Taskmanager these the proprietor verbleibenden rights not, around the Zugriffsrechte again so To Change, that one Process exits go can - he's then quasi for this Process shorted (therefore this Smily - there having MS what forget).

under XP shining these Unzulänglichkeit fixed To his - that is, the Taskmanager verschafft itself apparently before again More rights.

attempts once, the program through the Kommandozeilenbefehls AT as service in the Account system to start, then dürftet your see, I my .
 
09/04/05  
 



over again a Please:
attempts time, the program over this Code Starting and again To terminate. what happens then?
CompileMarkSeparation
Def @CreateProcess(10) !"KERNEL32","CreateProcessA"
Def @GetExitCodeProcess(2) !"KERNEL32","GetExitCodeProcess"
Def @TerminateProcess(2) !"KERNEL32","TerminateProcess"
Declare Command#,StartupInfo#,ProcessInfo#,ExitCode#

Proc CreateProcess

    Parameters command$
    Declare handle&
    Dim Command#,Add(Len(command$),1)
    Dim StartupInfo#,68
    Clear startupinfo#
    Long StartupInfo#,0=68
    Dim ProcessInfo#,16
    Clear ProcessInfo#
    String Command#,0=command$
    @CreateProcess(0,Command#,0,0,0,0,0,0,StartupInfo#,ProcessInfo#)
    Let handle&=Long(ProcessInfo#,0)
    Dispose Command#
    Dispose StartupInfo#
    Dispose ProcessInfo#
    Return handle&

EndProc

Proc KillProcess

    Parameters hprocess&
    Dim exitcode#,4
    @GetExitCodeProcess(hprocess&,exitcode#)
    @TerminateProcess(hprocess&,@Long(exitcode#,0))
    Dispose exitcode#

EndProc

Declare Terminate&,Start&,Programm$
Windowstyle 31
WindowTitle "Process starten und killen"
Window 0,0-640,440
Let Start&=@CreateButton(%HWND,"Start",20,300,100,30)
Let Terminate&=@CreateButton(%HWND,"Terminate",200,300,100,30)
Enablewindow Terminate&,0
Enablewindow Start&,1

While 0=0

    Waitinput

    IF @Getfocus(Terminate&)

        KillProcess @&(0)
        Enablewindow Terminate&,0
        Enablewindow Start&,1

    ElseIF @Getfocus(Start&)

        Let Programm$=@Loadfile$("Eine Anwendung auswählen:","Programme|*.EXE;*.COM;*.PIF;*.BAT")

        IF Programm$<>""

            CreateProcess Programm$,""
            Enablewindow Terminate&,1
            Enablewindow Start&,0

        endif

    Endif

<
s=s4 href='./../../function-references/XProfan/wend/'>Wend
 
09/04/05  
 



Duplicate Identifier Createprocess - Schonmal badly. [hr:5a5b330929]but too so can itself the Prog over the Button or whom TM einfachst terminieren.

salvo, iF.[hr:5a5b330929]PS: Ists correctly. that I any your programs with Profan²4 teste?
 
09/04/05  
 



[quote:bc1c8f568c=iF]Duplicate Identifier Createprocess - Schonmal badly. [hr:bc1c8f568c]but too so can itself the Prog over the Button or whom TM einfachst terminieren.
[/quote:bc1c8f568c]
au one, be I stupid .
The SID is of these lever Yes yet default - can means none weg - the lever fetch I me Yes to the Changing the SIDs.
is me yesterday same to the Post noticed .
I have time a new Version uploaded and this View source might for XP too weg:
CompileMarkSeparation
Def @GetExitCodeProcess(2) !"KERNEL32","GetExitCodeProcess"
Def @TerminateProcess(2) !"KERNEL32","TerminateProcess"
DEF @GetWindowThreadProcessId(2) !"USER32","GetWindowThreadProcessId"
DEF @OpenProcess(3) !"KERNEL32","OpenProcess"
DEF @CloseHandle(1) !"KERNEL32","CloseHandle"
DEF @GetLastError(0) !"KERNEL32","GetLastError"
DEF @FormatMessage(7) !"KERNEL32","FormatMessageA"
Declare ExitCode#,PROCESS_ID&,Fenster&,PHandle&
Declare Terminate&,Fensterk_killen&,Programm$,Active&
Declare AHRückgabe&,AHGETERROR_Buffer#,AHGETERROR_Buffer$
Declare Fehler&

Proc KillProcess

    Parameters hprocess&
    Dim exitcode#,4
    LET Fehler&=@GetExitCodeProcess(hprocess&,exitcode#)
    Let Fehler&=@TerminateProcess(hprocess&,@Long(exitcode#,0))

    IF Fehler&<>1

        LET AHRückgabe&=@GetLastError()
        DIM AHGETERROR_Buffer#,32000
        @FormatMessage($1000,0,AHRückgabe&,0,AHGETERROR_Buffer#,32000,0) Wandelt Fehlercode in Landesspezifische Message um.
        Let AHGETERROR_Buffer$=AHGETERROR_Buffer$+@STRING$(AHGETERROR_Buffer#,0)
        Dispose AHGETERROR_Buffer#
        @messagebox(AHGETERROR_Buffer$,"Fehlermeldung",16)

    endif

    Dispose exitcode#

EndProc

Windowstyle 31
WindowTitle "Process starten und killen"
Window 0,0-640,440
Let Fensterk_killen&=@CreateButton(%HWND,"Fenster killen",20,300,150,30)
Let Terminate&=@CreateButton(%HWND,"Prozess killen",300,300,150,30)

While 0=0

    Waitinput

    IF @Getfocus(Terminate&)

        Clearlist
        AddWindows ""
        LET Programm$=@Listbox$("Fenster wählen",3)

        IF Programm$<>""

            Let Fenster&=@Findwindow(Programm$)
            @GetWindowThreadProcessId(Fenster&,@ADDR(PROCESS_ID&))
            LET PHandle&=@OpenProcess($401,0,PROCESS_ID&)

            IF Fehler&=0

                LET AHRückgabe&=@GetLastError()
                DIM AHGETERROR_Buffer#,32000
                @FormatMessage($1000,0,AHRückgabe&,0,AHGETERROR_Buffer#,32000,0) Wandelt Fehlercode in Landesspezifische Message um.
                Let AHGETERROR_Buffer$=@STRING$(AHGETERROR_Buffer#,0)
                Dispose AHGETERROR_Buffer#

            endif

            KillProcess PHandle&
            @CloseHandle(PHandle&)

        Endif

    ElseIF @Getfocus(Fensterk_killen&)

        Clearlist
        AddWindows ""
        LET Programm$=@Listbox$("Fenster wählen",3)

        IF Programm$<>""

            @Sendmessage(@Findwindow(Programm$),$10,0,0)

        Endif

    Wend


Please too time try, the Prog with AT as service to start and it then over whom Taskmanager auszuschalten.

[quote:bc1c8f568c=iF]
salvo, iF.[hr:bc1c8f568c]PS: Ists correctly. that I any your programs with Profan²4 teste? [/quote:bc1c8f568c]
well Yes, 7.5 watts wealthy . 4.5 have I here too yet walk - if You moreover View source benötigst, write I you gladly what .
 
09/05/05  
 



 
- Page 2 -


I have once more one Update made.
what GEHTS me:
- How behave itself the Taskmanager with over AT gestartetem Prog with and without gedrücktem Button under XP? (i'd like to know, whether my supposition correctly. is, that the Taskmanager The Zugriffsrechte to the terminate the Progs again zurücksetzt.)
- in the File C:TEST.TXT becomes one log prepares. what standing in the File? (i'd like to know, whether XP everything saponaceous runs.)
- How behave itself the program together with the last View source?
 
09/05/05  
 




Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

4.556 Views

Untitledvor 0 min.
RICOSCH06/28/12

Themeninformationen

this Topic has 3 subscriber:

unbekannt (8x)
iF (3x)
Rolf Koch (2x)


Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie