open applications on a workstation

Is there a software package I can run that will tell me in real-time what applications are running on a workstation and several workstations at the same time.?   I would like to see who is running lets say kazaa.exe and what workstation and what user name... or other applications....  A list of all running exe files basically sorted by workstation...
earl1Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

kapesCommented:
If you have all the workstation supporting WMI and you have Admin rights on all machines..

then Create a list of computer in a computers.txt file,
e.g.
----Computers.txt ----------
Comp1
Comp2
PC3
PC5
10.1.1.1
------------------------------

Also Create a ProcessList.txt file,

e.g.
------------ProcessList.txt---------
kazaa.exe
pinball.exe
chess.exe
------------------------------------

Alongwith above two text files, save the following script as "ActiveProcesses.vbs" in common folder...

'-----------Script Start ---------------

Const ForReading = 1 : Const ForWriting = 2
Dim strComputer, ComputerList , ProcessList, oReportFile
Dim oFSO : Set oFSO = CreateObject ("scripting.filesystemobject")

ComputerList = oFSO.OpenTextFile("Computers.txt",ForReading).readall
ComputerList = Split (ComputerList,VbCrLf)

ProcessList = oFSO.OpenTextFile("ProcessList.txt",ForReading).readall
ProcessList = Split (ProcessList,VbCrLf)

For Each StrComputer In ComputerList
Set objWMIService = GetObject("winmgmts:" _
    & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")

For Each StrProcess In ProcessList
Set colProcesses = objWMIService.ExecQuery _
    ("Select * from Win32_Process Where Name =" & "'"&StrProcess&"'" )
If colProcesses.Count = 0 Then
    Wscript.Echo StrProcess & " not running On "  & strComputer
Else
    Wscript.Echo StrProcess & " is running on " & strComputer
    Set oReportFile = oFSO.OpenTextFile (strprocess&".txt",ForWriting,True)
    oReportFile.WriteLine strComputer
End If
Next
oReportFile.Close
Next


'------------------- End of Script -----------------

Then run the script...  It will create a text file for each process with list of computers running that process.

e.g. for above example
if pinball.exe is found on PC3 and PC5

Then "pinball.exe.txt" file will be created and it will contain
------Pinball.exe.txt---------
PC3
PC4
-------------------------------



0
kapesCommented:
oops....  :-)
I am opening the reportfile for writing rather then appending.... so
That will create only last computername entry on which process was found....

ON the First line of Script, change the Value of "Const ForWriting = 2" into "Const ForAppending = 8"
and change the following line...

 Set oReportFile = oFSO.OpenTextFile (strprocess&".txt",ForWriting,True)

into

 Set oReportFile = oFSO.OpenTextFile (strprocess&".txt",ForAppending,True)

0
kapesCommented:
This is the Final One.... sorry for this many changes.....

It will give the Report in the following format ----------

FileName -  "ProcessName.csv"
-----Contents-------
ComputerName , UserName , Date on which it was found




'-------------------- Script Start --------------------------------------

Const ForReading = 1 : Const ForWriting = 2 : Const ForAppending = 8
Dim strComputer, ComputerList , ProcessList, oReportFile, CompProcessList, StrLoggedInUser
Dim oFSO : Set oFSO = CreateObject ("scripting.filesystemobject")

ComputerList = Split (oFSO.OpenTextFile("Computers.txt",ForReading).readall,VbCrLf )
ProcessList = Split (oFSO.OpenTextFile("ProcessList.txt",ForReading).readall,VbCrLf )


For Each StrComputer In ComputerList
      Set objWMIService = GetObject("winmgmts:" _
          & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
      CompProcessList = ""      
      For Each StrProcess In ProcessList
            Set colProcesses = objWMIService.ExecQuery _
                ("Select * from Win32_Process Where Name =" & "'"&StrProcess&"'" )
            If colProcesses.Count <> 0 Then
                CompProcessList = StrProcess & ";" & CompProcessList
            End If
      Next
      If CompProcessList <> "" Then  
            Set colComputer = objWMIService.ExecQuery _
          ("Select * from Win32_ComputerSystem")
      
            For Each objComputer in colComputer
                StrLoggedInUser = objComputer.UserName
            Next

            If Right (CompProcessList,1 ) = ";" Then CompProcessList = Left (CompProcessList,Len(CompProcessList)-1)
            For Each Process In split(CompProcessList,";")
                  Set oReportFile = oFSO.OpenTextFile (process&".csv",ForAppending,True)
                  oReportFile.Writeline strComputer & "," & StrLoggedInUser & "," & Date()
                  oReportFile.Close
            Next
      End If
      
Next

'------------------------------- Script Ends --------------------------------
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
What were the top attacks of Q1 2018?

The Threat Lab team analyzes data from WatchGuard’s Firebox Feed, internal and partner threat intelligence, and a research honeynet, to provide insightful analysis about the top threats on the Internet. Check out our Q1 2018 report for smart, practical security advice today!

GizaCommented:
Dameware NT Utilities from www.dameware.com would do the job for you as well. Assuming you have access rights to the workstations in question it'll show you running processess, shares, installed software and much more. Inlcuding remote control software that I find alot smoother than vnc or pcanywhere.
0
GizaCommented:
Since just two of us answered I'm all for splitting the points down the middle.
0
kapesCommented:
I dont mind about the points,
but did the ASKER get what he wanted or not...
if he got some other solution, he shud post it here...


0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
OS Security

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.