Page 1 of 1

WMI Plugin

Posted: February 5th, 2014, 9:59 am
by dperrow
Hi,
I've created a plugin to call the windows wmi service. It's similar to the 'WMI Query' plugin but uses the wmic interface.

it's called by $dll(wmi,1,GET <Alias>,<WMIObject>

for example $dll(wmi,1,GET CDROM,VolumeName) will provide the name of the cd/dvd currently in the cd/dvd drive.

The following alias/es are available :

Code: Select all

ALIAS                    - Access to the aliases available on the local system
BASEBOARD                - Base board (also known as a motherboard or system board) management.
BIOS                     - Basic input/output services (BIOS) management.
BOOTCONFIG               - Boot configuration management.
CDROM                    - CD-ROM management.
COMPUTERSYSTEM           - Computer system management.
CPU                      - CPU management.
CSPRODUCT                - Computer system product information from SMBIOS.
DATAFILE                 - DataFile Management.
DCOMAPP                  - DCOM Application management.
DESKTOP                  - User's Desktop management.
DESKTOPMONITOR           - Desktop Monitor management.
DEVICEMEMORYADDRESS      - Device memory addresses management.
DISKDRIVE                - Physical disk drive management.
DISKQUOTA                - Disk space usage for NTFS volumes.
DMACHANNEL               - Direct memory access (DMA) channel management.
ENVIRONMENT              - System environment settings management.
FSDIR                    - Filesystem directory entry management.
GROUP                    - Group account management.
IDECONTROLLER            - IDE Controller management.
IRQ                      - Interrupt request line (IRQ) management.
JOB                      - Provides  access to the jobs scheduled using the schedule service.
LOADORDER                - Management of system services that define execution dependencies.
LOGICALDISK              - Local storage device management.
LOGON                    - LOGON Sessions.
MEMCACHE                 - Cache memory management.
MEMORYCHIP               - Memory chip information.
MEMPHYSICAL              - Computer system's physical memory management.
NETCLIENT                - Network Client management.
NETLOGIN                 - Network login information (of a particular user) management.
NETPROTOCOL              - Protocols (and their network characteristics) management.
NETUSE                   - Active network connection management.
NIC                      - Network Interface Controller (NIC) management.
NICCONFIG                - Network adapter management.
NTDOMAIN                 - NT Domain management.
NTEVENT                  - Entries in the NT Event Log.
NTEVENTLOG               - NT eventlog file management.
ONBOARDDEVICE            - Management of common adapter devices built into the motherboard (system board).
OS                       - Installed Operating System/s management.
PAGEFILE                 - Virtual memory file swapping management.
The full list and object names can be found by opening a cmd windows and typing wmic /? or wmic <alias> /? e.g. wmic cdrom /?

Hope this is useful to someone - i'm using it to display the DVD name when running TotalMediaTheatre.
wmi.zip

Re: WMI Plugin

Posted: August 30th, 2016, 10:36 pm
by steavenku
How can i switch the namespace of wmi using this plugin?

Re: WMI Plugin

Posted: September 12th, 2016, 10:39 am
by dperrow
This plugin creates a subprocess to execute the command:

"c:\windows\system32\wbem\wmic.exe /output:wmic.tmp <param1> <param2> /value"

so, in theory you could put "/namespace:value param1" as param 1 but I think you'd need to enclose it in quotes and replace any single \ with \\.

I don't understand what the namespace parameter does but by all means try it and see.