-
import time
import subprocess
from os.path import expanduser
chrome_path = expanduser('~Local SettingsApplication DataGoogleChromeApplicationchrome.exe')
proc = subprocess.Popen(chrome_path)
time.sleep(4)
proc.terminate()
输出:WindowsError: [错误 5] 访问被拒绝
如何终止 Chrome 进程?
How can I kill the Chrome process?
Windows XP 上的 Python 2.6.
Python 2.6 on Windows XP.
如果你使用 TASKKILL/F/PID [number of process ID] 会发生什么?试一试.通过导入操作系统启动它
what happens if you use TASKKILL /F /PID [number of process ID] ? Give it a try. Launch it through import OS
这篇关于在 Windows 中终止子进程,访问被拒绝的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!