Announcement

Collapse
No announcement yet.

Is App Running

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

  • Is App Running

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

    Code:
    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:
    Click image for larger version

Name:	IsAppRunning.PNG
Views:	1
Size:	1.6 KB
ID:	4769


    Exported Script:

    Last edited by Purushothaman; 12-26-2016, 10:19 AM.
Working...
X