Thomas Nelson wrote:
[... re Access Denied error on trying to TerminateProcess ...]
[Tim Golden]
>> I suppose you might have to adjust your token privs to include,
>> say the Debug priv. This is designed to let you take control
>> of any process (and terminate it, or whatever). If it looks
>> lik
On Jun 2, 11:43 am, Tim Golden <[EMAIL PROTECTED]> wrote:
> Thomas Nelson wrote:
> > from subprocess import Popen
> > from time import sleep
> > import win32api
> > war3game = Popen(["C:\Program Files\Warcraft III\Frozen Throne.exe"])
> > sleep(30)
> > print "slept for 30"
> > print win32api.Termin
On Jun 2, 12:27 pm, Thomas Nelson <[EMAIL PROTECTED]> wrote:
> Hi, I'd like to start a program, run it for a while, then terminate
> it. I can do this on linux, but I'm new to working with windows.
> Here's my script:
>
> from subprocess import Popen
> from time import sleep
> import win32api
> wa
Tim Golden wrote:
> Thomas Nelson wrote:
[... re problem Terminating process ...]
>> File "C:\Python24\warcraft\runwar3.py", line 7, in ?
>> print win32api.TerminateProcess(int(war3game._handle),-1)
>> error: (5, 'TerminateProcess', 'Access is denied.')
>>
>> I'm logged in as adminstrator.
Thomas Nelson wrote:
> from subprocess import Popen
> from time import sleep
> import win32api
> war3game = Popen(["C:\Program Files\Warcraft III\Frozen Throne.exe"])
> sleep(30)
> print "slept for 30"
> print win32api.TerminateProcess(int(war3game._handle),-1)
> #print
> ctypes.windll.kernel32.Te
Hi, I'd like to start a program, run it for a while, then terminate
it. I can do this on linux, but I'm new to working with windows.
Here's my script:
from subprocess import Popen
from time import sleep
import win32api
war3game = Popen(["C:\Program Files\Warcraft III\Frozen Throne.exe"])
sleep(30