Link to home
Start Free TrialLog in
Avatar of Dan Carp
Dan Carp

asked on

Scan network for specific running process

We own a fixed number of network licenses for an application (SketchUp) and routinely find all seats in use. Trimble does not offer any form of license monitoring system so I have no way to know who is using the program at any given time. Is there a way to run an on-demand scan of a network for all computers with a specific active process? Thanks in advance!

-Dan
SOLUTION
Avatar of NVIT
NVIT
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Dan Carp
Dan Carp

ASKER

Thanks nvit.  I've saved your script as a BAT into the same folder as pslist.  When I run the script, Clients.txt is properly generated, but I don't end up with a results.txt file.  Console output is:

d:\Downloads\PSTools>"D:\Downloads\PSTools\procsearch.bat"

d:\Downloads\PSTools>set AppNam=SketchUp.exe

d:\Downloads\PSTools>set ClientsFN=Clients.txt

d:\Downloads\PSTools>set LogFN=Results.txt

d:\Downloads\PSTools>net view   | find /i "\\" 1>Clients.txt
gosub was unexpected at this time.

d:\Downloads\PSTools>for /f %z in (Clients.txt) gosub :doit %z

d:\Downloads\PSTools>

Open in new window

Am I missing a step?  Thanks again...
Sorry. Line 5 should be
for /f %%z in (%ClientsFN%) do call :doit %%z

Open in new window

ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Getting quite close now... thank you for the edited version.  Hopefully the last issue now is that Results.txt is outputting exactly the list of computers from Clients.txt regardless of whether the process is actually running.  I'll continue trying to troubleshoot myself, but you are clearly very quick with scripting and may find it faster than I do.  Thank you VERY much again!
Think I've got it - instead of calling for the process "SketchUp.exe", pslist wants just "SketchUp" as the input.  Working like a charm now.  NVIT - again, thank you very much!  Would not have gotten here without your assistance.  Have a great day!
Very helpful assistance!
I'm glad it worked out for you, pcamis!
Have a great day/night.