That's almost perfect!

I'm a visual basic newbie, but thanks to your lovely example, I was able to conjure up this one without the file part:
Code:
alias getmethod {
  .comopen getmethod MSScriptControl.ScriptControl
  if (!$comerr) {
    var -s %v $&
      strComputer = "." $lf $&
      strNameSpace = "root\cimv2" $lf $&
      strClass = $qt($1) $lf $&
      Set objClass = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strComputer & "\" & strNameSpace & ":" & strClass) $lf $&
      For Each objClassProperty In objClass.Properties_ $lf $&
      result = result & objClassProperty.Name & " " $lf $&
      Next

    noop $com(getmethod,Language,4,bstr,VBScript)
    if (!$comerr) noop $com(getmethod,ExecuteStatement,1,bstr,%v)
    if (!$comerr) noop $com(getmethod,eval,3,bstr*,result)
    if (!$comerr) {
      tokenize 1 $com(getmethod).result
      .comclose getmethod
      return $1
    }
  }
  :error
  if ($error) reseterror
  if ($com(getmethod)) .comclose getmethod
}


It's pretty damn close to what I wanted! Thanks!

Last edited by Dazuz; 25/07/18 07:50 PM. Reason: Corrected a brainfart.