Using ManagementScope (WMI) - any errors?

I want to use System.Management.ManagementScope to query a list of registered users.

This will be part of a larger application that we will use for our customers, so it should be easy to configure and get high reliability.

Does ManagementScope / WMI work well? Should it always be available for queries on most operating systems? Are there any security issues that I have to consider, say, for example, unsustainable user logs on a workstation, will the user be able to request WMI? Will the system account work as a service?

Any other errors I should know about before taking this route?

thank

+3
source share
1 answer

The system account that starts the service is a way to handle it, because not all users are local administrators. We provide the service simultaneously with the graphical interface and talk to him via IPC channels. It works, and it's easier than worrying about what users can see in WMI. In our case, it also facilitates writing to the event log.

WMI is probably the easiest way to do this. You can look at the pinvoke / Win32 API (or perhaps even the terminal server API), but WMI will most likely be easy to get up and work reliably.

, - WMI, - , , , .

AFAIK, Windows 2000 , Windows XP , XP Win32_LogonSession , LogonType = 2 (). 2000 , Win32_ComputerSystem UserName .

+1

Source: https://habr.com/ru/post/1772000/


All Articles