How do you write an in-process WMI provider as part of Windows Service written in .NET?
I've written a provider that uses the de-coupled hosting model as a standalone application, but can't figure out how to get a Windows Service that uses the Hosting Model = ManagementHostingModel.NetworkService to work.
This is the kind of provider I...
How do I run the following WMI query, both programmatically to and as a one-shot deal? Can I use Visual Studio 2008, and if so what language and type of project do I setup? I'm a complete beginner at this so please provide details. Thanks!
SELECT * FROM Win32_USBControllerDevice
For Each as USBDevice
ASSOCIATORS OF {Win32_PnPEntity.D...
I have a usb serial adapter that plug and plays at COM9 or higher on many systems. A third party package I am using in my software can only connect up to COM8. Is there some way to set a COM9 down to a lower port using WMI or something? I know I can do this in the port settings dialog in device manager, but it's easier for my end users i...
I am trying to write some code that will determine if a list of SQL servers are up. I have tried to WMI, SQLDMO, SqlDataSourceEnumerator, and Pinging port 1433 of each server, with varying degrees of success (see results below).
Using SQLDMO and SqlDataSourceEnumerator, i found 3 out of 6, it has to be said that 2 of the 3 missing SQL s...
I've already asked a related question, but sadly the answers, whilst correct, didn't actually solve my problem.
I'm using the ManagementClass/ManagementObject WMI API (because it's better at handling remote administration than the DirectoryEntry API). I'd like to completely remove the existing script maps from a
Using the common stri...
What is the proper way using .NET to discover the Microsoft SQL Servers on your internal network? I think the SQL Management interface back in the SQL Server 7 days gave you a list of servers in a dropdown. How could I do the same thing with .NET 3.5.
...
Does anyone know good current (.Net 2.0 3.0 or 3.5) basic documentation, books or urls that document the basics of how to program this in VB.Net or C#. Thanks Roy Cotton
...
I've browsed page after page after page of data on the web and everyone seems to say that you cannot have an executable remotely execute an application on another machine via WMI and have the window of that application display.
Does anyone know a way around this?
I have tried created 2 executables. 1 executable uses the Process class a...
Google let me down, I couldn't find it on MSDN. man wmi doesn't work at the windows shell...
I'm looking for a list of objects that I can query, and how to construct the queries.
With WMI I mean the query language to query stuff like "Win32_Process"
I know about the classes and example queries, but I'm looking for a complete list of al...
HI,
i have an issue regarding WMI connection through asp.net from Computer A(windows 2003 server) to Computer B(Windows XP)..
The error is as follows...
RPC server is unavailable..
If Possible Please help me out regarding the same as im struggling from 2 days and its an urgent issue
...
The normal way to get the windows serial number is WMI.
ManagementObjectSearcher mos = new ManagementObjectSearcher("Select * From Win32_OperatingSystem");
// ...
// Select number from managementobject mo["SerialNumber"]
I don't want to use WMI because the compact framework dosn't support it. The assembly must work on the desktop a...
I am using WMI to query some properties disk drive. Does WMI read this information from the Drive itself or does it query the registry? How do I read the properties directly from the drive?
...
Hello,
Im looking for a way to delete Windows restore points using C# perhaps by invoking WMI.
Any code snippet would be very helpful.
Kind regards,
...
I was searching for ways to change the start-up type of a Windows service and I found 2 ways to do this...
By editing the Registry Or By using the WMI classes
I want to know which one is the best... I want my application to run properly on both Windows and Vista.
...
I want to query our servers to see look for disconnected/idle sessions. I know I can use 'query.exe', but I'd prefer something that's easier to work with from code.
WMI would be my preference.
Thanks.
...
I have a web application where im using
WMI connection through asp.net from Computer A(Windows XP) to Computer B(Windows 2003 Server..).
the code is as follows...(and the below code works if the operating systems in both the systems are same otherwise it"s not working...)
ConnectionOptions options = new ConnectionOptions();
options.Use...
I have been tasked with finding out what is causing an issue with this bit of code:
public static ArrayList GetEthernetMacAddresses()
{
ArrayList addresses = new ArrayList();
ManagementClass mc = new ManagementClass("Win32_NetworkAdapter");
// This causes GetInstances(options)
// to return all subclasses of Win32_Netwo...
I need to migrate extremely large quantities of data (millions of files, Terabytes of data) to an SQL cluster. The migration process is partitioned into weekly migrations, with a few hundreds of new users (i.e request-generators) every week.
So far things have run pretty smoothly, but lately i've discovered that the SQL cluster started ...
Part 1:
In a Microsoft SQL Server 2005 failover scenario, how can the databases be queried to determine which server is the master and which server is the slave? I'm looking for something more elegant than attempting to query on the server and see which one throws an exception.
Part 2:
Is there a way to monitor and determine when the ...
I'm trying to get a list of currently-open sessions in Python via WMI.
What I'm after is the exact information displayed in the Computer Management thingy, when you go to System Tools -> Shared Folders -> Sessions (ie username, computer name, connected time, that sort of thing).
I know (or at least believe) it has something to do with ...