Terminate subprocess in Windows, access denied

Posted by Jesse Aldridge on Stack Overflow See other posts from Stack Overflow or by Jesse Aldridge
Published on 2010-05-19T18:06:53Z Indexed on 2010/05/19 18:20 UTC
Read the original article Hit count: 336

Filed under:
|
|
|

-

import time
import subprocess
from os.path import expanduser

chrome_path = expanduser('~\Local Settings\Application Data\Google\Chrome\Application\chrome.exe')

proc = subprocess.Popen(chrome_path)
time.sleep(4)
proc.terminate()

Output: WindowsError: [Error 5] Access is denied

How can I kill the Chrome process?

© Stack Overflow or respective owner

Related posts about subprocess

Related posts about Windows