WMI Calls in C# with WBEM_FLAG_FORWARD_ONLY Flag RRS feed

  • Question

  • Using WMI calls in C# Windows application to get the system information from Local computer .

    Using System.Management;
    ManagementObjectSearcher searcher = new ManagementObjectSearcher("SELECT UserName FROM Win32_ComputerSystem");
                    if (searcher != null)
                        ManagementObjectCollection collection  = searcher.Get();

    To release COM object. Kindly help us how to add the Flags in C# or suggest any other method to execute the WMI Query.
    Wednesday, October 24, 2018 1:03 PM