wmi

WMI Query for list of hotfixes installed in a system?

I am writing a perl script that will list the hotfixes installed in my system and check if any pre-requisite hotfixes are not available before beginning my program; So I need to be able to enumerate the list of hotfixes in the system; Here there is a mention of using wmic to generate a html file. Is it possible to do this via a WMI quer...

How to fix the Win32_Printer.Default field so that it returns the correct value when using WMI remotely?

The Win32_Printer class returns a field per printer called Default (a boolean value). This works locally and accurately returns the Default printer. However when remotely connecting in with WMI, it always returns false. I thought it could depend on the user with which you did the remote WMI query. However, that's not the case (I tried i...

How to know a computer is rebooted

I reboot a remote computer with Wake-on-Lan and I would like to know if there is a way to know that the computer is idling at login screen (so I can start to do the stuff that need to be done). ...

Problem in getting Result of " Associators of " Statement in WMI Query ( Invalid Variant Operation ! )

Hi ... I want to Convert this example to Delphi Code , My Problem is in getting result of " Associators of " statement query : procedure TUSB.GetInfo; var WMIService : OLEVariant; DItems, PItems, LItems, VItems: OLEVariant; Drive, Partition, Logical, Volume : OLEVariant; Drives, Partitions, Logicals, Volumes : IEnumVARIANT; IValu...

WinApi Base Services tutorial?

I need to make application which gathers basic data about system, like OS version, processor & memory type, data about installed programs... Application will be written in c and will work on Win Server 2000 and 2003. So first thing on my mind was WinApi, but i can not find any tutorials for these things, every tutorial i found is about U...

Alternatives to WMI

For Windows, what other frameworks or programming languages I could use that are similar to WMI's monitoring and system management functionalities? ...

WMI hardware locking limitations

What are the limitations of using WMI services for hardware locking purposes? Wouldn't it be better to use this approach? http://www.codeproject.com/KB/mcpp/DriveInfoEx.aspx What do you think? ...

How to use ManagementObjectSearcher in Delphi?

I found on internet but I didn't got how can I use ManagementObjectSearcher in delphi. My main question which file I have to add in 'uses'. I found one code but can't make it run in my system. ...

Querying remote system via WMI returns access denied

Hi all, I have a simple WMI query that runs fine locally, but querying a remote system gives an access denied error. When I add the local user to the remote system as member of the administrator group, the query works as expected, but I don't want to have that user as a member of that group. I already tried the following things, unfort...

WMI namespace root\cimv2 not available on Win2k?

Hi, I'm trying to run the following VBScript code on a Win2k SP4: strComputer = "." Set oWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2") It works on XP and Win7 without problems, but on this 2k box I get the following error: C:\test_wmi.vbs(3, 1) (null): 0x8004100E The ...

IIS + WMI : can't get all WMI information

Hello everyone, I'm trying to make a webservice (WCF) to get information about my server. I made a class for WMI who can retreive information about cpu, ram, disks, etc... Under visual studio, the service works fine, but when I deploy the service on IIS, I get all the information ... Except one ! I have one hard disk with two partition...

What could cause the Wmi custom MSBuild task to throw "ManagementException not found"?

The Wmi task is part of the MSBuild Extension Pack. On one of our development machines, it thrown ManagementException not found. Here's the target: <Target Name="Clean"> <ItemGroup> <WmiProps Include="State"/> <WmiProps Include="DisplayName"/> </ItemGroup> <!-- Create list of VIKAD services that are currently ...

Remote WMI call to BizTalk object throws COMException (0x80131904)

I'm trying to run an WQL query(SELECT * FROM MSBTS_SendPort) on an BizTalk host but when I run this query in my console application on an remote primary BizTalkHost I get an COMException who says "Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'." If I run the same console application on the primary BizTalkHost then everything works...

WMI documentation for AntivirusProduct c#

Hey! I am attempting to find the property names for the "select * from AntivirusProduct" statement when using c#. I am wanting to find info like company / vendor / any other details about the AntivirusProduct entry - however I cannot find the documentation to find what to do i.e "select company from AntivirusProduct" Can somebody ple...

ManagementObjectSearcher Crashes on Win Server 2003?

I have a simple piece of C# 3.5 that does this: SelectQuery allProductsQuery = new SelectQuery("Win32_Product"); ManagementObjectSearcher allProducts = new ManagementObjectSearcher(allProductsQuery); foreach(ManagementObject product in allProducts.Get()) { foreach(PropertyData property in product.Properties) { Console.WriteLine("{0} = {...

Consuming WMI Events

I'm trying to use WMI to get notifications when the brightness of an Monitor. I found a WMIEvent class on MSDN called WMIMonitorBrightnessEvent http://msdn.microsoft.com/en-us/library/aa394537(v=VS.85).aspx but I can't really find any info on how to use it. I've come across a few samples for consuming WMI Events, but none of them seem t...

Can anyone explain in english this piece of WMI documentation! WMI securitycenter product state

Hey guys, I am trying to decipher the productState property in the SecurityCenter.productState WMI namespace. The product state is for example an int of : 262144 - which you then look at this page of documentation decipher into an actual product state meaning : http://msdn.microsoft.com/en-us/library/bb432509(VS.85).aspx I may have f...

Automating IP address assignments with .Net (C#)?

I need to automate IP Address assignments using .Net. Is there something already out there or can someone point me in the right direction. I know I can use WMI to do this, but some of the resources were for vbscript. I am hoping to use .Net Update: I need to assign multiple static IPs to a single NIC ...

.NET - Copying an executable across LAN to another computer, and executing it

I'm using .NET, and going crazy trying to find any helpful API that lets me transfer a file across a LAN network (trough admin credentials of course) and then execute it on that machine. I've read some thing using WMI, but googling for ".net WMI copy files" or ".net WMI execute files" isn't helping me at all. Any references would be gr...

Using WMI Code Creator to Create Code to Scan for Attached USB Devices

How can I use the WMI Code Creator to create code to scan for attached USB devices? I've downloaded the utility, but I'm a bit lost on how to use it. Thanks. ...