How can I get all of the property names of a class without looking them up beforehand, or having to go through PowerShell.

After browsing the web for hours and hours, I've come to the conclusion that it can be done outside of mIRC. The problem is that no matter what I do, I fail to get the same results with mIRC. Something something something Properties_ something.

Code:
alias wmitest {
  .comopen locator WbemScripting.SWbemLocator
  .comclose locator $com(locator,ConnectServer,3,bstr,.,bstr,root\cimv2,dispatch* class)

  .comclose class $com(class,InstancesOf,3,bstr,Win32_OperatingSystem,dispatch* properties)
  ;.comclose class $com(class,ExecQuery,3,bstr,select * from Win32_OperatingSystem,dispatch* properties)

  var %x = $comval(properties,0,Properties_)
  echo -a Instances of Properties_: %x
  while (%x) {
    echo -a Instance %x $+ : $comval(properties,%x,Properties_)
    dec %x
  }

  .comclose properties
}

All I can get out of it is one instance of an integer that keeps changing.

I assume I'm missing something painfully obvious.