>Public Function MBSerialNumber() As String > >Dim objs As Object > >Dim obj As Object >Dim WMI As Object >Dim sAns As String > > >Set WMI = GetObject("WinMgmts:") >Set objs = WMI.InstancesOf("Win32_BaseBoard") >For Each obj In objs > sAns = sAns & obj.SerialNumber > If sAns < objs.Count Then sAns = sAns & "," >Next >MBSerialNumber = sAns >End Function > >>
oWMI = CREATEOBJECT("WbemScripting.SWbemNamedValueSet") oObj = GETOBJECT("WINMGMTS:")GETOBJECT() will fail otherwise. Now whether or not that's the ProgID you need in CREATEOBJECT(), is another question entirely. I haven't been able to duplicate your code in VBScript in VFP (yet), but the documentation shows a lot of useful information. I think (but don't know for sure) that WMI may install on Win2K Pro by default. That's a guess, however.