We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 023da07 commit 323e2efCopy full SHA for 323e2ef
1 file changed
python/kill_5037.py
@@ -22,11 +22,13 @@ def win():
22
#adb.exe 10200 Console 1 6,152 K
23
24
process_name = os.popen('tasklist /FI "PID eq %s"' %pid).read().split()[-6]
25
- process_path = os.popen('wmic process where name="%s" get executablepath' %process_name).read().split()[-1]
+ process_path = os.popen('wmic process where name="%s" get executablepath' %process_name).read().split("\r\n")[1]
26
+
27
#分割路径,得到进程所在文件夹名
28
name_list = process_path.split("\\")
29
del name_list[-1]
30
directory = "\\".join(name_list)
31
32
#打开进程所在文件夹
33
os.system("explorer.exe %s" %directory)
34
#杀死该进程
0 commit comments