Hast du Rechte über das Programm? Wenn ja, dann kannst du die UDF
PHP Code:
Func _ProcessSuspend($process)
$processid = ProcessExists($process)
If $processid Then
$ai_Handle = DllCall("kernel32.dll", 'int', 'OpenProcess', 'int', 0x1f0fff, 'int', False, 'int', $processid)
$i_sucess = DllCall("ntdll.dll","int","NtSuspendProcess","int",$ai_Handle[0])
DllCall('kernel32.dll', 'ptr', 'CloseHandle', 'ptr', $ai_Handle)
If IsArray($i_sucess) Then
Return 1
Else
SetError(1)
Return 0
Endif
Else
SetError(2)
Return 0
Endif
EndFunc
von The Kandie Man aus autoitscript benutzen, um das Programm zu pausieren.
Hast du es überhaupt schon so versucht :
PHP Code:
$kernel32 = DllCall("kernel32.dll", 'int', 'OpenProcess', 'int', 0x1f0fff, 'int', False, 'int', $processid)
While 1
If ProcessExists("Exe") Then
$suspendcall = DllCall("ntdll.dll","int","NtSuspendProcess","int",$ai_Handle[0])
If Not IsArray($suspendcall) Then
MsgBox(0,"Fehler","Konnte das Programm nicht pausieren!")
DllCall('kernel32.dll', 'ptr', 'CloseHandle', 'ptr', $ai_Handle)
Exit
Else
MsgBox(0,"Erfolg!","Konnte das Programm pausieren!")
DllCall('kernel32.dll', 'ptr', 'CloseHandle', 'ptr', $ai_Handle)
Exit
EndIf
WEnd
Aber ohne Rechte über das Programm kannst du es auch nicht manipulieren und den Start soweit ich weiß auch nicht. Überprüfe doch mal, ob das Programm Administratorrechte besitzt.