SlideShare a Scribd company logo
print ("Stopping applications now")
# import the operating system module
# allows user to run operating system commands from Python
import os
# Run the command "taskkill" to stop applications in Windows
os.system("taskkill /f /im notepad.exe")
os.system("taskkill /f /im winword.exe")
os.system("taskkill /f /im excel.exe")
os.system("taskkill /f /im powerpnt.exe")
os.system("taskkill /f /im outlook.exe")
os.system("taskkill /f /im chrome.exe")
os.system("taskkill /f /im calc.exe")
os.system("taskkill /f /im iexplore.exe")
os.system("taskkill /f /im powershell.exe")
os.system("taskkill /r/ im wordpad.exe")
# use the template below to add more applications
# os.system("taskkill /f /im [executable name].exe")
# shutdown the computer
os.system("shutdown /s /t 5")
Python Program to Stop Applications and
Shutdown Computer

More Related Content

PDF
PHP Programming: Intro
PDF
Databases and MySQL
PDF
PHP and Databases
PDF
Spock framework
PDF
Debugging in Clojure: Finding Light in the Darkness using Emacs and Cursive
PDF
Installing Lamp Stack on Ubuntu Instance
DOCX
powershell ise.docx
DOC
Auto start
PHP Programming: Intro
Databases and MySQL
PHP and Databases
Spock framework
Debugging in Clojure: Finding Light in the Darkness using Emacs and Cursive
Installing Lamp Stack on Ubuntu Instance
powershell ise.docx
Auto start

What's hot (7)

PDF
OSQuery - Monitoring System Process
PPT
Raj mysql
PDF
Your Last manual Assessment
PDF
How to deploy and scale your meteor apps
PPTX
TDC 2014 - Cortana
PDF
Deixa para depois, Procrastinando com Celery em Python
PDF
Migrating to Openshift - Reyhan Fabianto
OSQuery - Monitoring System Process
Raj mysql
Your Last manual Assessment
How to deploy and scale your meteor apps
TDC 2014 - Cortana
Deixa para depois, Procrastinando com Celery em Python
Migrating to Openshift - Reyhan Fabianto
Ad

Viewers also liked (16)

PDF
Recull de premsa #Figueres - 21/11/2016
PDF
Erika Enlund Social Media portfolio
PDF
SL - Real Estate Deck
PPTX
PDF
Time is the New Green
PPT
British social realism
PDF
2014 Berlin_ Operational Excellence in Clinical Trails
PPTX
Aula invertida
DOCX
Unidad 17
PPTX
ロジカルシンキング力養成講座
DOCX
PPTX
Sap Simple!
PDF
Cultivating Empathy - The Most Important Feature You Can Provide to Your Team...
PPTX
共好讀書會_傾聽,不可思議的力量
PPTX
Microfeedback - UX Camp Switzerland
PPT
customer oriented selling
Recull de premsa #Figueres - 21/11/2016
Erika Enlund Social Media portfolio
SL - Real Estate Deck
Time is the New Green
British social realism
2014 Berlin_ Operational Excellence in Clinical Trails
Aula invertida
Unidad 17
ロジカルシンキング力養成講座
Sap Simple!
Cultivating Empathy - The Most Important Feature You Can Provide to Your Team...
共好讀書會_傾聽,不可思議的力量
Microfeedback - UX Camp Switzerland
customer oriented selling
Ad

Similar to PythonShutdownWindows (20)

PPTX
wslconf-wsl-interop.pptx
PPTX
Controlling multiple VMs with the power of Python
ODP
NYPHP March 2009 Presentation
PPTX
Setting UIAutomation free with Appium
PPT
SaltConf14 - Ben Cane - Using SaltStack in High Availability Environments
PDF
PowerShell for SharePoint Developers
PDF
Build Web Apps using Node.js
PDF
NoGUI maXbox Starter70
KEY
Node.js basics
PPTX
April 2010-intro-to-remoting-part2
PPTX
Windows Command Line Tools
PPTX
Setting Apple's UI Automation Free with Appium
PDF
Powershell notes
PPT
Applets
TXT
Hello click click boom
PDF
Getting started with puppet and vagrant (1)
PPT
Prepping software for w7 deployment
PPT
Free tools for rapidly deploying software
PPSX
Demo for Why Use PowerShell
PPT
Slide8appletv2 091028110313-phpapp01
wslconf-wsl-interop.pptx
Controlling multiple VMs with the power of Python
NYPHP March 2009 Presentation
Setting UIAutomation free with Appium
SaltConf14 - Ben Cane - Using SaltStack in High Availability Environments
PowerShell for SharePoint Developers
Build Web Apps using Node.js
NoGUI maXbox Starter70
Node.js basics
April 2010-intro-to-remoting-part2
Windows Command Line Tools
Setting Apple's UI Automation Free with Appium
Powershell notes
Applets
Hello click click boom
Getting started with puppet and vagrant (1)
Prepping software for w7 deployment
Free tools for rapidly deploying software
Demo for Why Use PowerShell
Slide8appletv2 091028110313-phpapp01

More from Matt R (20)

PDF
EstimateExtraterrestrialLife
PDF
LinuxPresentation500kb
PDF
OpenBSD-pf-filter
PPTX
TelephoneInfo-OpenInteraction
PPTX
PhoneCallTools
PPTX
LaptopTrustIssues
PPTX
Interactions
PPTX
Interaction-Incident
PPTX
FoundationProcess
PPTX
FindStaffPerson
PPTX
ChangesChecklist
PPTX
3tabs
PDF
bigalsnetwork
PDF
DateDiffQuery
PDF
DualScreenDualCPU
PDF
LoyalKasparBackupPlanProposal
PDF
MattSampleDatabase
PDF
PythonPythagoreanTheorem
PDF
Sample Website
PDF
XenAppDoc
EstimateExtraterrestrialLife
LinuxPresentation500kb
OpenBSD-pf-filter
TelephoneInfo-OpenInteraction
PhoneCallTools
LaptopTrustIssues
Interactions
Interaction-Incident
FoundationProcess
FindStaffPerson
ChangesChecklist
3tabs
bigalsnetwork
DateDiffQuery
DualScreenDualCPU
LoyalKasparBackupPlanProposal
MattSampleDatabase
PythonPythagoreanTheorem
Sample Website
XenAppDoc

PythonShutdownWindows

  • 1. print ("Stopping applications now") # import the operating system module # allows user to run operating system commands from Python import os # Run the command "taskkill" to stop applications in Windows os.system("taskkill /f /im notepad.exe") os.system("taskkill /f /im winword.exe") os.system("taskkill /f /im excel.exe") os.system("taskkill /f /im powerpnt.exe") os.system("taskkill /f /im outlook.exe") os.system("taskkill /f /im chrome.exe") os.system("taskkill /f /im calc.exe") os.system("taskkill /f /im iexplore.exe") os.system("taskkill /f /im powershell.exe") os.system("taskkill /r/ im wordpad.exe") # use the template below to add more applications # os.system("taskkill /f /im [executable name].exe") # shutdown the computer os.system("shutdown /s /t 5") Python Program to Stop Applications and Shutdown Computer