Version 2 of TWAPI and WMI

Updated 2006-09-05 16:35:50 by APN

Some examples of using WMI through TWAPI COM support.

All examples assume you have initialized with

  package require twapi 1.0
  set wmi [twapi::_wmi]

and remember to do a

  $wmi -destroy

at the end


BIOS

Print BIOS information

  $wmi -with {
    {ExecQuery "select * from Win32_BIOS"}
  } -iterate bios { 
    puts [$bios GetObjectText_]
  }

Print a specific BIOS field

  $wmi -with {
    {ExecQuery "select * from Win32_BIOS"}
  } -iterate bios {
    puts [$bios BiosVersion]
  }