Announcement

Collapse
No announcement yet.

Close particular applications - Example Google Chrome application

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Close particular applications - Example Google Chrome application

    You can use below script to close google chrome,


    import subprocess;
    process=subprocess.Popen(['taskkill', '/f','/im','chrome.exe'],shell=True,stdout=subprocess.PIPE);
    result=process.communicate()[0]
    print result



    Note: You can close other applications by specifying relevant task name instead of 'chrome.exe' .


    Sample output would be,


    Click image for larger version

Name:	close_chrome.jpg
Views:	1
Size:	26.6 KB
ID:	4581









Working...
X