| |
|
|
| 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 |
|
|
| |
|
|
|
| PS: the Program changes no Systemeinstellungen - only The the current Prozesses!
(plenty Fun)... |
|
|
| |
|
|
|
| would be it Yes gladly testing - but what should I testing? |
|
|
| |
|
|
|
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 |
|
|
| |
|
|
|
| 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! |
|
|
| |
|
|
|
| now - it can itself by me completely free from problems How each application with the Taskmanager terminieren. (WinXPHome)
salvo, iF. |
|
|
| |
|
|
|
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 |
|
|
| |
|
|
|
| OK, there runs means something differently as under windows2000 - i'll time try, the lever differently To detect... Register again! |
|
|
| |
|
|
|
| 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 . |
|
|
| |
|
|
|
| over again a Please: attempts time, the program over this Code Starting and again To terminate. what happens then? CompileMarkSeparationDef @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
|
|
|
| |
|
|
|
| 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? |
|
|
| |
|
|
|
| [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: CompileMarkSeparationDef @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 . |
|
|
| |
|
|