Autor Beitrag
Jakob Schöttl
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 929
Erhaltene Danke: 1


Delphi 7 Professional
BeitragVerfasst: Mi 24.05.06 19:51 
Hallo,
Wie kann ich Prozesse oder Programme beenden, wenn der Taskmanager deaktiviert ist und ich nicht weiß, wie der Prozess heißt.

Vielleicht sollte ich besser fragen wie kann man die Prozesse anzeigen, so dass der Benutzer einen auswählen kann und das prog ihn dann beendet?

Danke schon mal!
Born-to-Frag
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 1094

Win XP SP2, Win 2000 SP4
Delphi 7, 2k5
BeitragVerfasst: Mi 24.05.06 19:59 
Ganz einfach! Mit der Forensuche! :roll:

Suche in der Entwickler-Ecke PROZESSLISTE
Suche in der Entwickler-Ecke PROZESS KILLEN


greetz

_________________
Theorie ist wenn man alles weiß, aber nichts funktioniert. Praxis ist wenn alles funktioniert, aber niemand weiß warum.
Microsoft vereint Theorie und Praxis: Nichts funktioniert und niemand weiß warum.
nullplan001
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 212

Win 2000 Professional, Debian Linux 4.0 (Etch,Stable)
Pascal (FreePascal 2.0.2, TurboPascal 7.0), C(++) (G++/GCC 3.4.2 + MinGW), Java (JDK 1.5.0_07), PHP (PHP 5.1.4)
BeitragVerfasst: Mi 24.05.06 20:02 
Da musst du dir aus dem Ressource kit auf ftp.microsoft.com die Tools TLIST und KILL holen -- oder waren die bei den Support Tools dabei? Bin nicht ganz sicher. Jedenfalls kriegst du mit TLIST die PID des Prozesses raus und KILL tötest du den Prozess. die Progs haben eingebaute Hilfen (/?), da steht das besser beschrieben.
Tschö,
nullplan

_________________
Ich fahr' nicht selber, weil ich festgestellt habe: ich fahre zu emotional. Bin 180 gefahren wo 30 erlaubt war... -- Jürgen von der Lippe
Born-to-Frag
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 1094

Win XP SP2, Win 2000 SP4
Delphi 7, 2k5
BeitragVerfasst: Mi 24.05.06 20:04 
@nullplan: Und das kann man dann mit Delphi umsetzen?

_________________
Theorie ist wenn man alles weiß, aber nichts funktioniert. Praxis ist wenn alles funktioniert, aber niemand weiß warum.
Microsoft vereint Theorie und Praxis: Nichts funktioniert und niemand weiß warum.
nullplan001
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 212

Win 2000 Professional, Debian Linux 4.0 (Etch,Stable)
Pascal (FreePascal 2.0.2, TurboPascal 7.0), C(++) (G++/GCC 3.4.2 + MinGW), Java (JDK 1.5.0_07), PHP (PHP 5.1.4)
BeitragVerfasst: Mi 24.05.06 20:12 
@btf: Mit ShellExecute, CreateProcess o. ä.

_________________
Ich fahr' nicht selber, weil ich festgestellt habe: ich fahre zu emotional. Bin 180 gefahren wo 30 erlaubt war... -- Jürgen von der Lippe
Jakob Schöttl Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 929
Erhaltene Danke: 1


Delphi 7 Professional
BeitragVerfasst: Do 25.05.06 15:42 
Danke aber
@Born-To-Frag: Wenn ich nach deinen stichwörtern suche sprich auf die links klicke dann findet er nichts im Forum...

Auch schade, dass die Dokumentation für die Proceduren Shellexecute und CreateProcess nur auf englisch sind... aber die kann ich übersetzen.
Fighter#1
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 787

Win XP, Ubuntu 8.04
Turbo Delphi 2006, Delphi 2005 Pe, Delphi 5 Pe, Netbeans 6.1, Eclipse, Microsoft VisualC#, Dev C++, PHP, HTML, CSS
BeitragVerfasst: Do 25.05.06 16:26 
Is ganz einfach:
Prozesse finden:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
procedure Getprocesses(Prnames,Prids:TStrings);
var
    nexthandle:HWND;
    nextTitle:Array  [0..260]of char;
    pid:Integer;
begin
          NextHandle:=GetWindow(Application.Handle,GW_HWNDFIRST);
      While NextHandle > 0 do
        begin
    GetWindowText(NextHandle, NextTitle, 255);
    GetWindowThreadProcessId(NextHandle,@pid);
    Prnames.Add(nexttitle);
    Prids.Add(IntTOStr(pid));
    NextHandle:=GetWindow(NextHandle,GW_HWNDNEXT);
        end;


end;

//prnames ist nachher mit den Prozessnamen gefüllt
//Prids mit den dazugeförigen Prozessnummern

//Prozess schließen
var 
prh:THandle;
begin
OpenProcess(1,Bool(0), PROZESSNUMMER(INTEGER) );
TerminateProcess(prh,0);

_________________
Wer andere beherrscht ist stark,
wer sich selbst beherrscht ist mächtig. Lao Tse