Mike C.
Mike C.

Reputation: 1921

Kill process using Python /F flag

I'm wondering how to do this in python.

C:\>Taskkill /IM program.exe /F

What I have so far is this. I just don't know how to add the /F flag

comm = "taskkill /im " + myprogram
os.system(comm)

Upvotes: 0

Views: 46

Answers (1)

Hippolyte BRINGER
Hippolyte BRINGER

Reputation: 853

I think this code below works :

comm = “{} {}“.format(comm, " /F")

Upvotes: 1

Related Questions