mirror of
https://github.com/hakril/PythonForWindows
synced 2026-06-08 14:31:45 +00:00
29 lines
1.0 KiB
Plaintext
29 lines
1.0 KiB
Plaintext
(cmd) python wmi\wmi_request.py
|
|
WMI requester is <windows.winobject.wmi.WmiManager object at 0x05C70CA8>
|
|
Selecting * from 'Win32_Process'
|
|
They are <188> processes
|
|
Looking for ourself via pid
|
|
Some info about our process:
|
|
* Name -> python.exe
|
|
* ProcessId -> 8144
|
|
* OSName -> Microsoft Windows 10 Home|C:\WINDOWS|\Device\Harddisk0\Partition2
|
|
* UserModeTime -> 1875000
|
|
* WindowsVersion -> 10.0.16299
|
|
* CommandLine -> C:\Python27\python.exe wmi\wmi_request.py
|
|
<Select Caption,FileSystem,FreeSpace from Win32_LogicalDisk>:
|
|
* {'Caption': u'C:', 'FreeSpace': u'4704194560', 'FileSystem': u'NTFS'}
|
|
* {'Caption': u'D:', 'FreeSpace': u'269887504384', 'FileSystem': u'NTFS'}
|
|
|
|
==== Advanced use ====
|
|
Listing some namespaces:
|
|
* CIMV2
|
|
* SecurityCenter2
|
|
* StandardCimv2
|
|
Querying non-default namespace: <WmiRequester namespace="root\SecurityCenter2">
|
|
Listing some available classes:
|
|
* FirewallProduct
|
|
* AntiVirusProduct
|
|
* AntiSpywareProduct
|
|
Listing <AntiVirusProduct>:
|
|
* Windows Defender
|