[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 388
  • Last Modified:

WMI or other technique to obtain window list on remote computer

I'm successfully using WMI to obtain lists of all processes, services, and hardware/os information from all computers in the domain.

What I'd like to do is get a list of all windows on a workstation along with their handle, caption, etc. just like Spy++ gives you. I thought WMI's Win32_Thread class would do it, but it doesn't. Does anyone have any ideas of how I can get a list of windows on remote machines similary to Spy++ ?

Here's a little more background on why I'm doing this. We have a software application that runs on all of the machines in the building. The program I've written allows a user to kill the process on all the workstations its running on (say it's 10:00pm and a backup needs to be done - this will close all the open database tables).

There are certain processes that should not be killed. I can discern what they are by examining the windows caption. If a process has a thread with a specific caption, I would not allow the operator to kill that process remotely. But WMI doesn't yield this information, that I can see.

Thanks!

Scott
0
ScottC1234
Asked:
ScottC1234
  • 2
1 Solution
 
dutchclanCommented:
WMI (Windows Management Instumentation) is mainly focused on managing AD and services like exchange.

Try VBS (WSH) and the various API`s available ;-) that should do the trick
0
 
ScottC1234Author Commented:
I can't find an object I can instantiate in vbs that would give me this information. Do you know what I would use?
0
 
dutchclanCommented:
i would still use the wmi WinMgmts object to read the remote services from the registry, then i would use the shell oject from vbs to kickoff the net start / stop even though this is quick and dirty.

Dont know if there is a list somewhere that you can access using wmi to see the actuall state of an service remotely. localy wmi supports this..

-Regards May
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now