Tags "wmi" Result

How can I improve WMI performance in .NET?

I've inherited code that makes numerous remote WMI calls. When I repeatedly pause execution and look at the call-stack it's almost always in a ManagementScope.Connect() call. A new connection seems to be made with each WQL query. Despite limited trial and error, I haven't found any big wins yet in improving the performance of the WMI calls. I'v

it1352 5 2019-05-06

Finding serial number of USB drive without WMI

How do we find the serial number of a USB drive without using WMI in c#? Thanks Solution The following link looks like a good place to start if you can use WMI. Volatile USB Serial Number Using C#. You could implement a WMI soloution as this looks like it is pretty simple code and has been fairly extensivly tested. If you get a WMI error you cou

it1352 2 2019-05-10

Python ImportError: No module named wmi

I followed directions to download WMI for Python here http://timgolden.me.uk/python/wmi/index.html When I attempt to run the code import wmi c = wmi.WMI () for s in c.Win32_Service (StartMode="Auto", State="Stopped"): if raw_input ("Restart %s? " % s.Caption).upper () == "Y": s.StartService () I receive the error Traceback (most rece

it1352 2 2019-05-21

How to consume WMI Events in C#

There are some events expose via WMI, but I can't seem to find any examples for subscribing and being alerted of those events. Particularly I am wanting to implement WmiMonitorBrightnessEvent to push a notification to Growl/Snarl. Solution This is a sample code for receive the WmiMonitorBrightnessEvent WMI Event. using System; using System.Collec

it1352 6 2019-05-10

How to consume WMI Events in C#

There are some events expose via WMI, but I can't seem to find any examples for subscribing and being alerted of those events. Particularly I am wanting to implement WmiMonitorBrightnessEvent to push a notification to Growl/Snarl. Solution This is a sample code for receive the WmiMonitorBrightnessEvent WMI Event. using System; using System.Collec

it1352 1 2019-05-16

Determine Network Adapter Type via WMI

I'm using WMI (Win32_NetworkAdapter) and trying to get the details of attached physical network adapters either wired or wireless and avoid virtual adapters, etc. Reading this article it explains that you have to do some clever querying on WMI to eliminate virtual adapters and attempt to only return real physical adapters. Reading this post it ex

it1352 3 2019-05-06

Recommended libraries/howtos for using WMI with java?

Hey Folks. I have a reasonably large commercial project (so for-pay licensing is always an option) that is moving into the windows space and I am planning on doing alot of polling with WMI. This is a Java 1.6 client app. Are there any good resources or books out there to get me started in accomplishing this in java? I feel my .NET fu is pretty stro

it1352 3 2019-05-21

detect if machine is online or offline using WMI and C#

I use vs2008, winxp, in LAN network with Win2003 servers. I want a application installed in winxp for detect if win2003 machines is online or offline , and if offline when boot it. I have this references, any more references, code samples and best practices ?? http://danielvl.blogspot.com/2004/06/how-to-ping-in-c-using.html http://snipplr.com/v

it1352 1 2019-05-14