# Is App Running

**URL:** <https://forum.itarian.com/t/is-app-running/46146>\
**Category:** Automation Scripts - Library - (ITarian will write\
**Created:** [September 19, 2016, 11:02am UTC](https://forum.itarian.com/t/is-app-running/46146 "2016-09-19T11:02:16Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Purushothaman](https://forum.itarian.com/letter_avatar_proxy/v4/letter/p/a587f6/32.png) [@Purushothaman](https://forum.itarian.com/u/Purushothaman)\
**Post date:** [September 19, 2016, 11:02am UTC](https://forum.itarian.com/t/is-app-running/46146/1 "2016-09-19T11:02:16Z")

</div>

Please use the script to know whether a application is running on your target machine

```auto
import os

def IsAppRunning(appName):
    proObj = os.popen('TASKLIST /FI "USERNAME ne NT AUTHORITY\SYSTEM" /FI "STATUS eq running"')
    runApps = proObj.read()
    return appName in runApps

def main():
    ## Pass application name with '.exe' extension
    appName = 'chrome.exe'
    if IsAppRunning(appName):
        print 'Success: '+appName+' is running'
    else:
        print 'Fail: '+appName+' is not running'

if __name__ == ' __main__':
    main()

```

Usage:  
pass your app name in **appName** variable that you want to check out that whether running or not

Sample output:

Exported Script:

![IsAppRunning.PNG](https://forum.itarian.com/uploads/default/original/1X/9005f3e686f47ce01e651249551ab03e2bb3fbb8.png)

[20161226-App-running.json](https://forum.itarian.com/uploads/short-url/u4n4jlAZDcLjWdBJFY0VTNGlDDR.json) (796 Bytes)
