$H Windows.ph $H Shellapi.ph $H Structs.ph CLS Var hProcess& = ShellExecEx("Notepad","open",1) Print "Notepad gestartet" Print hProcess& WaitInput ~TerminateProcess(hProcess&,0) Print "Notepad gekillt" WaitInput End Proc ShellExecEx PARAMETERS Pfad$,Command$,Flag& Declare ShellExec#,hProcess& STRUCT TShellexec = ~SHELLEXECUTEINFO Dim Shellexec#,TShellexec Shellexec#.cbSize& = SizeOf(Shellexec#) Shellexec#.lpFile& = Addr(Pfad$) Shellexec#.lpVerb& = Addr(Command$) Shellexec#.nShow& = Flag& ShellExec#.fMask& = ~SEE_MASK_NOCLOSEPROCESS ~ShellExecuteEx(Shellexec#) hProcess& = Shellexec#.hProcess& Dispose Shellexec# Return hProcess& EndProc
CLS Var hProcess& = ShellExec("Notepad","open",1) Print "Notepad gestartet" Print hProcess& WaitInput process("kill",hProcess&,0) Print "Notepad gekillt" WaitInput a>
Session-Cookies