wmi

Is there a WMI Redistributable Package?

I've been working on a project that accesses the WMI to get information about the software installed on a user's machine. We've been querying Win32_Product only to find that it doesn't exist in 64-bit versions of Windows because it's an "optional component". I know there are a lot of really good alternatives to querying the WMI for this ...

Programmatically list WMI classes and their properties

Hey everyone, Is there any known way of listing the WMI classes and their properties available for a particular system? Im interested in a vbscript approach, but please suggest anything really :) P.S. Great site. ...

WMI and Win32_DeviceChangeEvent - Wrong event type returned ?

Hi everyone, and to the makers of the site - thanks. looks like a promising beta. I am trying to register to a "Device added/ Device removed" event using WMI. When I say device - I mean something in the lines of a Disk-On-Key or any other device that has files on it which I can access... I am registering to the event, and the event is ...

Unit testing with network-reliant code

I'm trying to be better about unit testing my code, but right now I'm writing a lot of code that deals with remote systems. SNMP, WMI, that sort of thing. With most classes I can mock up objects to test them, but how do you deal with unit testing a real system? For example, if my class goes out and gets the Win32_LogicalDisk object fo...

Is there a way to generate WMI code/classes?

How do you generate C# classes for accessing WMI? ...

WMI - Directly accessing the singleton instance of Win32_OperatingSystem

Hi - I've having trouble directly accessing the Win32_OperatingSystem management class that is exposed via WMI. It is a singleton class, and I'm pretty certain "[email protected]" is the correct path syntax to get the instance of a singleton. The call to InvokeMethod produces the exception listed at the bottom of the question, as...

How do I remotely get a checksum for a file on a Windows machine?

I'm trying to check, using an automated discovery tool, when JAR files in remote J2EE application servers have changed content. Currently, the system downloads the whole JAR using WMI to checksum it locally, which is slow for large JARs. For UNIXy servers (and Windows servers with Cygwin), I can just log in over SSH and run md5sum foo.j...

How do I access the non-IPM_SUBTREE Public Folder Tree with WMI?

I'm trying to verify when the OAB (Offline Address Book) root folder for a new OAB is created with powershell. Is there a WMI class that exposes this? I'm using powershell, but any examples or links will do. ...

Missing classes in WMI when non-admin

I'd like to be able to see Win32_PhysicalMedia information when logged in as a Limited User in XP (not admin rights). It works ok when logged in as Admin, WMIDiag has just given a clean bill of health, and Win32_DiskDrive class produces information correctly, but Win32_PhysicalMedia produces a count of 0 for this code set WMI = GetObjec...

How to publish wmi classes in .net?

I've created a seperate assembly with a class that is intended to be published through wmi. Then I've created a windows forms app that references that assembly and attempts to publish the class. When I try to publish the class, I get an exception of type System.Management.Instrumentation.WmiProviderInstallationException. The messag...

Bluetooth Signal Strength

Does anyone have any idea how to track the signal strength of a bluetooth connection perferably in C#? I was thinking using a WMI query but couldn't track down the WMI class encapsulating the connection. The idea is when I leave my machine with my cellphone in pocket the bluetooth signal weakens and my machine locks and I don't get goa...

missing WMI namespace on Vista/Server 2008

What is equivalent to the root\CIMV2\Applications\MicrosoftIE namespace on Vista/Server 2008? The root\cimv2\Applications\MicrosoftIE namespace dates back to at least Internet Explorer 5.00.2920.0000, which happens to be the version of Internet Explorer that shipped with Windows 2000, but it looks like it is removed from Vista/Server 20...

Generating a unique machine id

I need to write a function that generates an id that is unique for a given machine running a Windows OS. Currently, I'm using WMI to query various hardware parameters and concatenate them together and hash them to derive the unique id. My question is, what are the suggested parameters I should use? Currently, I'm using a combination of...

Can you use WMI to create an MSMQ message queue (PRIVATE queue)?

I need to create a PRIVATE message queue on a remote machine and I have resolved to fact that I can't do this with the .NET Framework in a straight forward manner. I can create a public message queue on a remote machine, but not a PRIVATE one. I can create a message queue (public or private) locally. I am wondering if anyone knows how ...

How to remove published wmi schema?

I've published schema, and no longer have the dll's that contained the wmi provider that the schema was published from. How can I remove the schema? ...

Possible to monitor processes another process launches via WMI?

I have a setup executable that I need to install. When I run it, it launches a msi to do the actual install and then dies immediately. The side effect of this is it will return control back to any console you call it from before the install finishes. Depending on what machine I run it on, it can take from three to ten minutes so having t...

How do I get USB disk drive inserted and removed events in a service without hearing my hard drive being accessed repeatedly on some O/S's?

I use this code in my Windows Service to be notified of USB disk drives being inserted and removed: WqlEventQuery query = new WqlEventQuery("__InstanceOperationEvent", "TargetInstance ISA 'Win32_LogicalDisk' AND TargetInstance.DriveType=2"); query.WithinInterval = TimeSpan.FromSeconds(1); _deviceWatcher = new ManagementEventWatcher...

WMI calls from WebService

So I have made a webservice that interfaces with a set of data contained in a WMI namespace. It works fine when I run it with the ASP.net in built development web server, and returns the data as requested. However when I publish it to an IIS 6 server (win 2003), the webservice no longer allows me to execute the WMI method calls. However ...

Can I test a floppy drive using WMI & System.Management namespace?

I would find out the floppy inserted state: no floppy inserted unformatted floppy inserted formatted floppy inserted Can this determined using "WMI" in the System.Management namespace? If so, can I generate events when the floppy inserted state changes? ...

The RunInstaller attribute in a WMI provider assembly

Hello - I am creating a decoupled WMI provider in a class library. Everything I have read points towards including something along these lines: [System.ComponentModel.RunInstaller(true)] public class MyApplicationManagementInstaller : DefaultManagementInstaller { } I gather the purpose of this installation is because the Windows WMI i...