FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Vista Issue
Posts: 933
Joined: Sun Oct 09, 2005 01:05 PM
Vista Issue
Posted: Sat Nov 14, 2009 12:58 AM
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 (fw): Select all Collapse
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 16.11, xHarbour 1.2.3, Bcc730)
Posts: 1335
Joined: Fri Jun 13, 2008 11:04 AM
Re: Vista Issue
Posted: Sat Nov 14, 2009 04:28 AM

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

Posts: 190
Joined: Tue Mar 14, 2006 01:59 AM
Re: Vista Issue
Posted: Sat Nov 14, 2009 09:33 AM

Jeff,

StefanHaupt suggested checking if WMI is properly installed in the thread below.

viewtopic.php?f=3t=14675

Hi,
Davide

&

Continue the discussion