Vista Issue

Vista Issue

Postby Jeff Barnes » 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: Select all  Expand view
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)
User avatar
Jeff Barnes
 
Posts: 929
Joined: Sun Oct 09, 2005 1:05 pm
Location: Ontario, Canada

Re: Vista Issue

Postby anserkk » Sat Nov 14, 2009 4: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
User avatar
anserkk
 
Posts: 1332
Joined: Fri Jun 13, 2008 11:04 am
Location: Kochi, India

Re: Vista Issue

Postby Davide » Sat Nov 14, 2009 9:33 am

Jeff,

StefanHaupt suggested checking if WMI is properly installed in the thread below.
viewtopic.php?f=3&t=14675

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


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 94 guests