I've written a command line utility that detects which network interface is connected, and sets the staitc ip address and dns servers for it (by calling netsh). However, I can't seem to figure out how to set the dns search suffixes. netsh doesnt appear capable of doing that. How do I do that otherwise (WMI perhaps)?
...
Using an idea from Bob King idea I wrote the following method.
It works great on CD's, removable drives, regular drives.
However for a floppy it always return "Not Available". Any ideas?
public static void TestFloppy( char driveLetter ) {
using( var searcher = new ManagementObjectSearcher( @"SELECT * FROM Win32_LogicalDisk WHERE ...
From http://support.microsoft.com/kb/317277:
If Windows XP restarts because of a serious error, the Windows Error Reporting tool prompts you...
How can my app know that "Windows XP has restarted because of a serious error"?
...
For my current C++ project I need to detect a unique string for every monitor that is connected and active on a large number of computers.
Research has pointed to 2 options
Use WMI and query the Win32_DesktopMonitor for all active monitors. Use the PNPDeviceID for unique identification of monitors.
Use the EnumDisplayDevices API, and...
How do you detect the number of physical processors/cores in .net?
...
What are some ways that I can query the local machine's specifications (a range of things from CPU specs, OS version, graphics card specs and drivers, etc.) through a programmatic interface? We're writing a simple app in C# to test compatibility of our main app and want to have it dump out some system metrics, but I can't seem to find w...
I'm looking for a method to acurately determine if an interface is the physical 802.3 ethernet port on a pc in windows.
Using ipconfig /all I can list all the interfaces, and when I do this on my pc several entries can be listed here including VPN, Bluetooth, Wifi and the physical ethernet interface.
I'm looking for something like, "is...
We have a .NET application that uses WMI to gather a wide range of information on machines throughout a network, such as reading the Win32_NTLogEvent to see if Symantec Antivirus has written anything. The queries work fine, but after repeatedly running a WMI query "Generic Failure" errors will start coming back. This happens very consi...
This is a follow up from this question.
I'm using this slightly modified script to enumerate all installed MSI packages:
strComputer = "."
Set objWMIService = GetObject("winmgmts:" & _
"{impersonationLevel=impersonate}!\\" & _
strComputer & _
"\root\cimv2")
Set colSoftware = objWMIService.ExecQuery _
("SELECT * FROM W...
Like many organizations, I don't have a single software application that I run to support the enterprise. I have many different software components that facilitate the business and these software components are deployed to multiple machines. All of these applications were built with some enterprise monitoring and management in mind. S...
Hi there,
I've got the following code to end a process, but I still receive an error code 2 (Access Denied).
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colProcessList = objWMIService.ExecQuery("SELECT * FROM Win32_Process WHERE Name = 'MSSEARCH.exe'")
For each objProcess in colProc...
I am looking for a way to change the password of a local user account (local Administrator) on a Windows (XP in this case) machine. I have read the CodeProject article about one way to do this, but this just doesn't seem 'clean'.
I can see that this is possible to do with WMI, so that might be the answer, but I can't figure out how to ...
I'm aware that I can grab the CPU identifier and the volume serial number for a physical drive by querying WMI, but WMI usually takes its sweet time. What other speedier options, if any, are available to retrieve this information? Are there Win32 APIs that would accomplish this?
Edit: Allow me to clarify. By CPU identifier, I'm referrin...
We are discussing development of an improved management infrastructure for our distributed system.
We use COM, web services and .NET components. Since we're based on Microsoft Windows Server XP/2003, I guess, we basically have two options:
Powershell cmdlets
WMI classes using System.Management and WMI providers for native code (class, ...
Is there a way, within the .net framework, to check to see if two different shared folders are actually pointing to the same physical directory? Do directories in Windows have some sort of unique identifier? Google-fu is failing me.
(I mean, aside from writing a temp file to one and seeing if it appears in the other)
Edit: I think I'...
I would like to be able to do "Extend my Windows desktop onto this monitor" via code. A PowerShell script would be idea. I have googled around a far amount and WMI seems the way forward but as I have zero knowledge in WMI I thought I would try here.
Hope someone can help!
Cheers,
Zi
...
I'd hate to have to relearn C++ just for this! Any libraries/URLs would be great and yes, Google didn't help much here :-(
This is for an upcoming project in which my product (Java based) would provide support for Microsoft's Hyper-V virtualization platform. Unlike VMware, which provides a Web-service, the Hyper-V APIs are mere extensi...
Is there a WMI event you can subscribe to that will fire when a remote machine boots up and comes online, or goes offline?
My application needs to be able to monitor machines for their availability, and ideally, I'd like something that can work via events instead of continuous polling.
...
Trying to find the product is installed in remote pC or not, it takes long time to execute,
is there any ways we can achieve this faster.
//usage:
//uninstall4("hostname", "productname", "{AC9C1263-2BA8-4863-BE18-01232375CE42}", "10.0.0.69");
public void uninstall4(string targetServer, string product,string guid , string ve...