Autor Beitrag
Klabautermann
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Veteran
Beiträge: 6366
Erhaltene Danke: 60

Windows 7, Ubuntu
Delphi 7 Prof.
BeitragVerfasst: Mo 17.03.03 17:28 
Hallo,

wie kann ich ein Programm "bruztal" abschießen. Mit brutal meine ich, dass das Programm keine gelegenheit bekommen soll noch Daten zu speicher oder ähnliches.

Das ganze soll folgender Problembehebeung dienen: Bei einem Bekannten verzögert ein TNA-Programm das runterfahren seines Winwosw. NAch einer weile kommt das der Programm Sofort Beenden Dialog von Windows, über diesen lässt sich das Programm dann auch beenden.
Ich möchte ihn nun ein kleines Prog zur verfügung stellen, das erst das Programm abschießt (also das Sofort Beenden Knöpfchen drückt bevor es angezeigt wird ;)) und dann das System runterfährt.

Gruß
Klabautermann
Popov
ontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic starofftopic star
Beiträge: 1655
Erhaltene Danke: 13

WinXP Prof.
Bei Kleinigkeiten D3Pro, bei größeren Sachen D6Pro oder D7
BeitragVerfasst: Mo 17.03.03 17:45 
Darf man fragen für was für eine Windowsversion es gedacht ist? Ich ahb in den letzten Wochen auch ein Programm geschreiben das bestimmte Anwendungen killt. Das geht in der Regel unproblematisch und ich hatte bei den 200 Tests keine einzige Anwendung die das überstanden hat, aber ich weiß, daß es ein unterschied macht ob du Win9x oder WinNt hast. Nicht, daß NT es nicht machen würde, aber es ist ein anderer Code als 9x.

_________________
Popov
Klabautermann Threadstarter
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Veteran
Beiträge: 6366
Erhaltene Danke: 60

Windows 7, Ubuntu
Delphi 7 Prof.
BeitragVerfasst: Mo 17.03.03 18:06 
Hallo,
es geht um ein NT (W2k) System.

Gruß
Klabautermann
Popov
ontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic starofftopic star
Beiträge: 1655
Erhaltene Danke: 13

WinXP Prof.
Bei Kleinigkeiten D3Pro, bei größeren Sachen D6Pro oder D7
BeitragVerfasst: Mo 17.03.03 18:32 
Ich selbst hab nur etwas für 9x, da ich mommentan kein NT habe. Deshalb hab ich vorerst in der Reichtung von NT nix gemacht. Allerdings hab ich ein Programm von Assarbad das von sich behauptet Prozesse auch bei XP killen zu können. Der Source Code ist auch dabei, auch wenn es ein wenig durcheinander ist, da es, wie bei Assarbad üblich, ein NonVcl Programm ist. Wenn also keiner was besseres liefert, dann kannst du dir sein PView Programm angucken.

_________________
Popov
matze
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 4613
Erhaltene Danke: 24

XP home, prof
Delphi 2009 Prof,
BeitragVerfasst: Mo 17.03.03 18:33 
also sowas geht wunderbar wenn du einfach prcessterminate nimmst. oder hiesst die funktion Suche in: Delphi-Forum, Delphi-Library TERMINATEPROCESS .... bin mir nicht sicher, aber hier im forum gabs dazu mal was !! das geht wunderbar auch unter win 98,ME,NT,2000 (alles getestet)

_________________
In the beginning was the word.
And the word was content-type: text/plain.
Motzi
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 2931

XP Prof, Vista Business
D6, D2k5-D2k7 je Prof
BeitragVerfasst: Mo 17.03.03 19:38 
Mit OpenProcess() ein Process-Handle besorgen (mit PROCESS_TERMINATE Access) und dann mit TerminateProcess "abschießen". ACHTUNG: bei Services muss das Debug-Privilege enabled sein, damit du ein gültiges Process-Handle bekommst!

Edit: funzt übrigens sowhol auf 9x als auch auf NT (aber auf 9x gibts keine Services und auch keine Privileges)

_________________
gringo pussy cats - eef i see you i will pull your tail out by eets roots!