Questions tagged [wmi-service]

62 questions
1
vote
2 answers

WMI command to connect to remote machines and retrieve Software Version and Installation Date

I need help in connecting to 2 remote machines running Windows XP and retrive details of a software version and installation date. I am new to WMI and would appreciate if someone could guide me in the right direction. At the moment , I execute the…
Namshith Hash
  • 11
  • 1
  • 2
1
vote
0 answers

How to read the contents of a log file using the WMI classes from a c++ application

I have a c++ application that queries for the log files using the WMI Query language.I have queried for the Wmi32_NTLogEvent class and retrieved some information.The problem is i'm not able to read all the properties from the log file. When i…
D vignesh
  • 97
  • 1
  • 7
1
vote
2 answers

PowerShell: How to run a powershell script on a remote machine using WMI

To be specific: I want to run a powershell script on a remote windows server, but I can connect to this server using WMI only. I used, for example, Get-Wmiobject to get some data like the running processes, but I failed after a lot of searching, to…
Yasser Mohsen
  • 1,411
  • 1
  • 12
  • 29
1
vote
0 answers

What's the correct way to escape a WMI string?

Is there a "best practice" way of escaping characters in a WMI query (or a preferred alternative, such as some sort of WMI equivalent to DbParameter)? Currently I've rolled my own, but generally for this sort of thing there are safer options; though…
JohnLBevan
  • 22,735
  • 13
  • 96
  • 178
1
vote
1 answer

how to run a powershell script as a windows service from inside a Java program?

I have the following code that runs a windows service from inside Java.The code uses JInterop Java library, JInterop is a pure Java COM client for windows COM server. More details of JIntop are available here…
Manjur
  • 29
  • 1
  • 1
  • 6
1
vote
1 answer

How does one start and stop services using WMI from .NET?

How would one go about using WMI to start, stop, and query services on the local computer from .NET code? (I'm using C#) I have found good and accurate answers for using the ServiceController class to do this, but I'd like to use WMI if I can.
Boinst
  • 3,365
  • 2
  • 38
  • 60
1
vote
1 answer

register for an event in Windows

Hi I want to do something when a memory stick attached to PC. Now I use a timer and check it in every tick whether any memory stick is plugged(use DriveInfo or with querying WMI) Is there any event driven model available to do? for example i use an…
dr_csharp
  • 63
  • 3
1
vote
1 answer

WMI: Kind request for WMI-QL Event Class Definition: SESSION_RECONNECTED, WORKSTATION_LOCKED, SCREENSAVER_INVOKED

Would you please review the WMI-QL or share the correct MSDN section or WMI man page to lookout for these following WMI Event class QL definitions ? Setup using Win7 laptop with WMI enabled and working for many WMI-QL for system info. WMI EVENT-ID …
sam
  • 13
  • 4
1
vote
2 answers

Win32_Service is missing

I have C# code that tries to load some property from WMI object - Win32_Service. But it returns to me 'System.Management.ManagementException: Invalid class ' error. My simplified code: static void Main(string[] args) { string serviceName =…
Sergey Litvinov
  • 7,408
  • 5
  • 46
  • 67
1
vote
0 answers

wmi query fails for remote machine if asynchronus mode is selected

I am trying to execute wmi query (select * from win32_ntlogevent) in remote machine using wbemtest. It is successful in semi-synchronous mode. if asynchronous mode is selected, the query fails and returns an error message, which shows Access is…
Vivek
  • 11
  • 3
1
vote
1 answer

WMI IWbemClassObject::GetNames status complete

I make WMI query SELECT * FROM __InstanceCreationEvent WITHIN 1 WHERE TargetInstance ISA 'Win32_Process' hres = this->m_IWbemServicesComPtr->ExecNotificationQueryAsync( _bstr_t("WQL"), _bstr_t(query.c_str()), WBEM_FLAG_SEND_STATUS, …
Edward83
  • 6,664
  • 14
  • 74
  • 102
1
vote
1 answer

rebuild wmi classes with c#

i am writing c# code to rebuild the wmi classes. i found that it can be done with the help of these command as discussed here : Regsvr32 %SystemRoot%\System32\wbem\wmidcprv.dll cd /d %windir%\system32\wbem for %i in (*.dll) do RegSvr32 -s %i for %i…
Mohammad Arshad Alam
  • 9,694
  • 6
  • 38
  • 61
1
vote
2 answers

How can I browse for services through WMI?

At first I wasn't able to connect to the other computers with wbemtest. Now, after following this instructions: http://www.poweradmin.com/help/enableWMI.aspx I can run the following WQL query on it: Select * From Win32_Process But the following…
safejrz
  • 544
  • 1
  • 14
  • 26
1
vote
2 answers

Show processes running on remote computer using WMI

I'm using WMI in order to run commands on a remote machine. For now, and I know it's as it should be, the process which is being run is not shown on the screen of the remote, I can only see it running when I open the task manager. Like I said, I…
Idanis
  • 1,918
  • 6
  • 38
  • 69
1
vote
1 answer

Open Source/Free C# Platform Diagnosis Library (CPU, RAM, HDD etc.)

I'm writing an application which allows me to monitor various health parameters of a server system (CPU, RAM, HDD, Processes & Service Usage etc.) and then ties into a different system for data analysis. I could grab lots of values via…
Alex
  • 75,813
  • 86
  • 255
  • 348