Vista Issue

Post Reply
User avatar
Jeff Barnes
Posts: 912
Joined: Sun Oct 09, 2005 1:05 pm
Location: Ontario, Canada
Contact:

Vista Issue

Post by Jeff Barnes »

Hi,

The following code works fine in Windows XP but gives an error in Vista.
Anyone know how I can have it work in Vista ?

Code: Select all

FUNCTION cSerialMB()
   LOCAL oLoc := CREATEOBJECT( "wbemScripting.SwbemLocator" )
   LOCAL oSrv := oLoc:ConnectServer()
   LOCAL oJbs := oSrv:ExecQuery( "SELECT * FROM Win32_BaseBoard" )
   LOCAL oJob
   LOCAL cMBSerial
   FOR EACH oJob IN oJbs
       cMBSerial := oJob:SerialNumber
   NEXT
RETURN cMBSerial

The error I get is:
Error description: Error wbemScripting.SwbemLocator/16389 E_FAIL: CONNECTSERVER
Thanks,
Jeff Barnes

(FWH 12.01, xHarbour 1.2.1, Bcc582)
User avatar
anserkk
Posts: 1280
Joined: Fri Jun 13, 2008 11:04 am
Location: Kochi, India

Re: Vista Issue

Post by anserkk »

Dear Mr.Jeff,

Your code is working fine here on my Vista Business Service Pack 2 and I am using FWH 9.08
I am not getting any error and your function is returning a value "To be filled by O.E.M.

Regards
Anser
Davide
Posts: 190
Joined: Tue Mar 14, 2006 1:59 am
Location: Italy

Re: Vista Issue

Post by Davide »

Jeff,

StefanHaupt suggested checking if WMI is properly installed in the thread below.
http://forums.fivetechsupport.com/viewt ... =3&t=14675

Hi,
Davide
Post Reply