mirror of
https://github.com/hakril/PythonForWindows
synced 2026-06-08 14:31:45 +00:00
28 lines
1.0 KiB
Plaintext
28 lines
1.0 KiB
Plaintext
(cmd) python wmi\wmi_request.py
|
|
WMI requester is <windows.winobject.wmi.WmiManager object at 0x000001CD1A46E150>
|
|
Selecting * from 'Win32_Process'
|
|
They are <329> processes
|
|
Looking for ourself via pid
|
|
Some info about our process:
|
|
* Name -> python.exe
|
|
* ProcessId -> 28460
|
|
* OSName -> Microsoft Windows 11 Pro|C:\Windows|\Device\Harddisk0\Partition3
|
|
* UserModeTime -> 0
|
|
* WindowsVersion -> 10.0.22631
|
|
* CommandLine -> C:\Users\cleme\AppData\Local\Programs\Python\Python311\python.exe wmi\wmi_request.py
|
|
<Select Caption,FileSystem,FreeSpace from Win32_LogicalDisk>:
|
|
* {'Caption': 'C:', 'FileSystem': 'NTFS', 'FreeSpace': '925749731328'}
|
|
|
|
==== Advanced use ====
|
|
Listing some namespaces:
|
|
* CIMV2
|
|
* SecurityCenter2
|
|
* StandardCimv2
|
|
Querying non-default namespace: <WmiNamespace "root\SecurityCenter2">
|
|
Listing some available classes:
|
|
* <WmiObject class "AntiSpywareProduct">
|
|
* <WmiObject class "AntiVirusProduct">
|
|
* <WmiObject class "FirewallProduct">
|
|
Listing <AntiVirusProduct>:
|
|
* Windows Defender
|