Date: 14 Jan 2004 06:18:41 -0700Hello, The code below would be a possible translation of that script. I am using TWmiQuery component from WmiSet component collection: http://www.online-admin.com/twmiquery.html uses WmiConnection, WmiDatyaSet; .... var vConnection: TWmiConnection; vQuery: TWmiQuery; vResult: OleVariant; vLow, vHigh, i: integer; begin vConnection := TWmiConnection.Create(nil); vConnection.Connected := true; vQuery := TWmiQuery.Create(nil); vQuery.Connection := vConnection; vQuery.WQL.Text := 'SELECT * FROM Win32_SystemEnclosure'; vQuery.Active := true; // laptop in a docking station will have // more than one system enclosure. Iterate through all of them while not vQuery.EOF do begin vResult := vQuery.FieldByName('ChassisTypes').AsVariant; vLow := VarArrayLowBound(vResult, 1); vHigh := VarArrayHighBound(vResult, 1); for i := vLow to vHigh do if vResult = 10 then ShowMessage('Notebook'); vQuery.Next; end; end;效果图: http://www.delphibbs.com/keylife/iblog_show.asp?xid=31013