Code
alias mywmi {
  .comopen wmi.open WbemScripting.SWbemLocator
  .comclose wmi.open $com(wmi.open,ConnectServer,1,bstr,.,bstr,root\CIMV2,dispatch* wmi.locator)
  set -l %properties Caption CommandLine CreationClassName CreationDate CSCreationClassName CSName Description ExecutablePath ExecutionState Handle HandleCount InstallDate KernelModeTime MaximumWorkingSetSize MinimumWorkingSetSize Name OSCreationClassName OSName OtherOperationCount OtherTransferCount PageFaults PageFileUsage ParentProcessId PeakPageFileUsage PeakVirtualSize PeakWorkingSetSize Priority PrivatePageCount ProcessId QuotaNonPagedPoolUsage QuotaPagedPoolUsage QuotaPeakNonPagedPoolUsage QuotaPeakPagedPoolUsage ReadOperationCount ReadTransferCount SessionId Status TerminationDate ThreadCount UserModeTime VirtualSize WindowsVersion WorkingSetSize WriteOperationCount WriteTransferCount
  .comclose wmi.locator $com(wmi.locator,ExecQuery,1,bstr,SELECT * FROM Win32_Process WHERE ExecutablePath=" $+ $replacex($mircexe,\,\\) $+ ",dispatch* wmi.properties) $com(wmi.properties,Count,3)
  set -l %instances $com(wmi.properties).result
  echo -a Retrieving $numtok(%properties,32) properties(s) from %instances instances from Win32_Process class in root\CIMV2 namespace
  set -l %x 1
  while (%x <= %instances) {
    tokenize 32 %properties
    while ($1) {
      echo -a Instance $+($chr(35),%x,:) $1 = $comval(wmi.properties,%x,$1)
      tokenize 32 $2-
    }
    inc %x
  }
  .comclose wmi.properties
  :error
  if ($error) {
    if ($com(wmi.open)) .comclose wmi.open
    if ($com(wmi.locator)) .comclose wmi.locator
    if ($com(wmi.properties)) .comclose wmi.properties
  }
}
/MYWMI

It uses $mircexe and ExecutablePath to identify the right process. If more than one process has the same ExecutablePath, it'll list all of them.

You could potentially get the right PID with some tricks, but as far as I know there's no straight forward way to do it. Maybe by starting another program and checking for the parent ID or something, but I assume ExecutablePath is accurate enough in most cases.

Shameless plug: WMI Explorer for mIRC https://mircscripts.net/Ls5JN