Algunas cosas Interesantes con WMI

Algunas cosas Interesantes con WMI

Postby cuatecatl82 » Thu Apr 10, 2008 2:53 pm

:D :D Saludos a toda la Comunidad: :D :D

Pongo a su disposición algunas funciones que he encontrado investigando un poco con WMI, ojala y a alguien le pueda servir, Si alguin más las puede complementar que mejor para que tengamos un mejor conocimiento de las posibilidades que podemos tener con esta tecnología.


Code: Select all  Expand view
#Include "FIVEWIN.CH"

Funcion Main()

LOCAL  oDatos
LOCAL    nFree:= ""
LOCAL     oLoc:= CreateObject( "wbemScripting.SwbemLocator" )
LOCAL   objWMI:= oLoc:ConnectServer()
LOCAL oSistema:= objWMI:ExecQuery("Select * from Win32_PhysicalMedia")
LOCAL   oDisco:= objWMI:ExecQuery("Select * from Win32_LogicalDisk")
LOCAL   oParti:= objWMI:ExecQuery("Select * from CIM_DiskPartition")
LOCAL  oDisket:= objWMI:ExecQuery("Select * From Win32_LogicalDisk Where DeviceID = 'A:'")
LOCAL   objUnd:= objWMI:ExecQuery("Select * from Win32_MappedLogicalDisk")
LOCAL     oUnd:= objWMI:ExecQuery("Select * from Win32_CDROMDrive")
LOCAL  oResolu:= objWMI:ExecQuery("Select * from Win32_DesktopMonitor")
LOCAL  oSistem:= objWMI:ExecQuery("Select * from Win32_OperatingSystem")
LOCAL   oUsers:= objWMI:ExecQuery("Select * from Win32_Account")
LOCAL    oServ:= objWMI:ExecQuery("Select * from Win32_Service Where Name = 'Themes'")
LOCAL    oTime:= objWMI:ExecQuery("Select * from Win32_LocalTime")
LOCAL oJbs := oSrv:ExecQuery( "SELECT * FROM Win32_BaseBoard" )


FOR Each oDatos In oSistema
    MsgInfo("Serial de fabrica: " + ALLTRIM(cValToChar(oDatos:SerialNumber)),"Numero de serie del disco duro")
NEXT



FOR Each oDatos In oDisco
    MsgInfo("Unidad: " + ALLTRIM(cValToChar(oDatos:Name)) + "\   Serial: " + ALLTRIM(cValToChar(oDatos:VolumeSerialNumber)),"Unidad y serial lógico de las unidades de disco")
NEXT



FOR Each oDatos in oParti
    MsgInfo(ALLTRIM(cValToChar(oDatos:Name)) + " - Tamaño: " +ALLTRIM(cValToChar(oDatos:Size)) + " En: " + ALLTRIM(cValToChar(oDatos:SystemName)) + " - Tipo: " + ALLTRIM(cValToChar(oDatos:TYPE)),"Particiones disponibles")
NEXT



FOR Each oDatos in oDisket
    nFree:= oDatos:FreeSpace
   
   IF VALTYPE(nFree) = "U"
         MsgInfo("No hay diskete en la unidad A:\","Aviso del WMI de Windows")
   ELSE
         MsgStop("Hay un diskete en la unidad A:\","Aviso del WMI de Windows")
   ENDIF
   
NEXT



FOR Each oDatos In objUnd
    MsgInfo("Device ID: " + oDatos:DeviceID +" Nombre: " + oDatos:Name +" Espacio Libre: " + cValtoChar(oDatos:FreeSpace) + " Tamaño: " + cValtoChar(oDatos:Size),"Lista de unidades Mapeadas en Mi PC")   
NEXT



FOR Each oDatos in oUnd
    MsgInfo("Unidad: " + oDatos:Drive + " " + "Nombre: " + oDatos:Caption,"Unidades de CD instaladas en el equipo")
NEXT



FOR Each oDatos in oResolu
   MsgInfo("Trabajando a Resolución de Alto: " + cValToChar(oDatos:ScreenHeight) + "  y Ancho: " + cValToChar(oDatos:ScreenWidth),"Resolucion de Panralla")
NEXT



FOR Each oDatos In oSistem
    MsgInfo(oDatos:InstallDate,"Fecha de Instalación de Windows XP")
NEXT



FOR Each oDatos in oSistem
    MsgInfo("Directorio de Windows es: " + oDatos:WindowsDirectory +"  Directorio del Sistema es: "+ oDatos:SystemDirectory,"Directorio de Windows y del Sistema")
NEXT



FOR Each oDatos in oUsers
    MsgInfo(cValToChar(oDatos:Name) + " - " + cValToChar(oDatos:Caption),"Lista de Usuarios de Windows")
NEXT



MsgInfo("Deshabilitarndo los Themes en Windows XP")
FOR Each oDatos in oServ   
    oDatos:StopService()
    SysRefresh()
NEXT



MsgInfo("Habilitando los Themes en Windows XP")
FOR Each oDatos in oServ   
    oDatos:StartService()
    SysRefresh()
NEXT



FOR Each oDatos in oSistem
    MsgInfo(oDatos:Caption + " " + oDatos:VERSION,"Sistemas operativos instalados en el PC")
NEXT



FOR Each oDatos in oTime
     MsgInfo( "Día: " + cValToChar(oDatos:DAY) + CRLF +;
              "Día de la semana: " + cValToChar(oDatos:DayOfWeek) + CRLF +;
              "Hora: " + cValToChar(oDatos:Hour) + CRLF +;
              "Minutos: " + cValToChar(oDatos:Minute) + CRLF +;
              "Mes: " + cValToChar(oDatos:MONTH) + CRLF +;
              "Segundos: " + cValToChar(oDatos:Second) + CRLF +;
              "Semana en el mes: " + cValToChar(oDatos:WeekInMonth) + CRLF +;
              "Año: " + cValToChar(oDatos:YEAR),"Dia, Hora, Mes y Año desde WMI")
NEXT


FOR EACH oDatos IN oJbs
        MsgInfo("El Número de Serie de la MotherBoard es: "+Alltrim(cValtoChar(oJob:SerialNumber)),"Desde WMI")
NEXT

Return nil



Un furte Abrazo y Saludos...
Soluciones y Diseño de Software
Damos Soluciones...

I.S.C. Victor Daniel Cuatecatl Leon
Director y Diseñador de Proyectos

http://www.soldisoft.unlugar.com
http://www.sisa.unlugar.com
danyleon82@hotmail.com
www.facebook.com/victordaniel.cuatecatlleon
User avatar
cuatecatl82
 
Posts: 625
Joined: Wed Mar 14, 2007 6:49 pm
Location: San Cristobal de las Casas, Chiapas México

Postby JOSEMAR » Thu Apr 10, 2008 3:57 pm

BIEN CHIAPAS,

ME AHORRASTE LA INVESTIGACION, Y SE PRODRIA SABER DONDE LO CONSULTASTE?
SALUDOS, JOSE MARQUEZ
JUAN DIAZ COVARRUBIAS,VERACRUZ ,MEXICO
JOSEMAR
 
Posts: 73
Joined: Thu Dec 06, 2007 4:51 pm
Location: J.D.COVARRUBIAS,VER.,MEXICO

Postby cuatecatl82 » Thu Apr 10, 2008 4:58 pm

Saludos al Bello estado de Veracruz: :D :D


Estimado Josemar.. .

Todos estos datos lo he recopilado de:

http://www.davphantom.net/modulo.asp?op=3

Hay algunas cosillas más por ahi en esa pagina, pero algunas no me funcionaron y algunas otras no les tome mucha importancia...

Revisa alomejor algomas te puede servir...

Saludos..
Soluciones y Diseño de Software
Damos Soluciones...

I.S.C. Victor Daniel Cuatecatl Leon
Director y Diseñador de Proyectos

http://www.soldisoft.unlugar.com
http://www.sisa.unlugar.com
danyleon82@hotmail.com
www.facebook.com/victordaniel.cuatecatlleon
User avatar
cuatecatl82
 
Posts: 625
Joined: Wed Mar 14, 2007 6:49 pm
Location: San Cristobal de las Casas, Chiapas México

Postby JOSEMAR » Thu Apr 10, 2008 5:16 pm

chiapas,

ya vi el enlace y como dices hay buscar las cosas interesantes, gracias por el tip y le voy a ivestigar mas.
SALUDOS, JOSE MARQUEZ
JUAN DIAZ COVARRUBIAS,VERACRUZ ,MEXICO
JOSEMAR
 
Posts: 73
Joined: Thu Dec 06, 2007 4:51 pm
Location: J.D.COVARRUBIAS,VER.,MEXICO

Re: Algunas cosas Interesantes con WMI

Postby mmercado » Thu Apr 10, 2008 6:19 pm

cuatecatl82 wrote:Pongo a su disposición algunas funciones que he encontrado investigando un poco con WMI, ojala y a alguien le pueda servir, Si alguin más las puede complementar que mejor para que tengamos un mejor conocimiento de las posibilidades que podemos tener con esta tecnología.

Muchas gracias Víctor por seguir compartiendo con nosotros tus trabajos que siempre resultan tan útiles.

cuatecatl82 wrote:Un furte Abrazo y Saludos...

Me quedo con el abrazo y los saludos, no sea que el "furte" resulte ser una grosería Chiapaneca :lol:

Yo nada más te mando un abrazote.

Manuel Mercado
User avatar
mmercado
 
Posts: 782
Joined: Wed Dec 19, 2007 7:50 am
Location: Salamanca, Gto., México

Postby cuatecatl82 » Thu Apr 10, 2008 9:29 pm

Gracias Estimado Manuel Mercado:

Gracias por tus palabras, siempre he dicho que si algo valioso aprendes, o sabes es bueno compartirlo con todos los que te rodean, es posible que a alguien ayudes aunque sea con un granito de arena...

Me gusta aprender y enseñar lo aprendido, si a alguien puedo ayudar con lo poco que se, será para mi un placer poderlo ayudar...

Y que más que aportar un poquito a toda esta comunidad de compañeros fivewineros que tanto me han ayudado...

Perdón por lo de "furte", la palabra correcta es "fuerte"..


Saludos desde Chiapas.. 8) 8)
Soluciones y Diseño de Software
Damos Soluciones...

I.S.C. Victor Daniel Cuatecatl Leon
Director y Diseñador de Proyectos

http://www.soldisoft.unlugar.com
http://www.sisa.unlugar.com
danyleon82@hotmail.com
www.facebook.com/victordaniel.cuatecatlleon
User avatar
cuatecatl82
 
Posts: 625
Joined: Wed Mar 14, 2007 6:49 pm
Location: San Cristobal de las Casas, Chiapas México

Postby Silvio » Fri Apr 11, 2008 9:29 am

there are many errors
Code: Select all  Expand view
[1]:Harbour.Exe testinfo.prg  /m /n0 /w2 /es2 /iC:\work\FWH\include /ic:\work\xHarbour\Include /iinclude;c:\work\BCC55\Bin\include;c:\work\xHarbour\include;c:\work\fwh\include;c:\work\include; /oObj\testinfo.c
xHarbour Compiler build 1.1.0 (SimpLex)
Copyright 1999-2007, http://www.xharbour.org http://www.harbour-project.org/
Compiling 'testinfo.prg'...
testinfo.prg(3) Error E0030  Syntax error: "parse error at 'MAIN'"
testinfo.prg(5) Error E0001  Statement not allowed outside of procedure or function
testinfo.prg(6) Error E0001  Statement not allowed outside of procedure or function
testinfo.prg(6) Warning W0001  Ambiguous reference: 'NFREE'
testinfo.prg(7) Error E0001  Statement not allowed outside of procedure or function
testinfo.prg(7) Warning W0001  Ambiguous reference: 'OLOC'
testinfo.prg(8) Error E0001  Statement not allowed outside of procedure or function
testinfo.prg(8) Warning W0001  Ambiguous reference: 'OLOC'
testinfo.prg(8) Warning W0001  Ambiguous reference: 'OBJWMI'
testinfo.prg(9) Error E0001  Statement not allowed outside of procedure or function
testinfo.prg(9) Warning W0001  Ambiguous reference: 'OBJWMI'
testinfo.prg(9) Warning W0001  Ambiguous reference: 'OSISTEMA'
testinfo.prg(10) Error E0001  Statement not allowed outside of procedure or function
testinfo.prg(10) Warning W0001  Ambiguous reference: 'OBJWMI'
testinfo.prg(10) Warning W0001  Ambiguous reference: 'ODISCO'
testinfo.prg(11) Error E0001  Statement not allowed outside of procedure or function
testinfo.prg(11) Warning W0001  Ambiguous reference: 'OBJWMI'
testinfo.prg(11) Warning W0001  Ambiguous reference: 'OPARTI'
testinfo.prg(12) Error E0001  Statement not allowed outside of procedure or function
testinfo.prg(12) Warning W0001  Ambiguous reference: 'OBJWMI'
testinfo.prg(12) Warning W0001  Ambiguous reference: 'ODISKET'
testinfo.prg(13) Error E0001  Statement not allowed outside of procedure or function
testinfo.prg(13) Warning W0001  Ambiguous reference: 'OBJWMI'
testinfo.prg(13) Warning W0001  Ambiguous reference: 'OBJUND'
testinfo.prg(14) Error E0001  Statement not allowed outside of procedure or function
testinfo.prg(14) Warning W0001  Ambiguous reference: 'OBJWMI'
testinfo.prg(14) Warning W0001  Ambiguous reference: 'OUND'
testinfo.prg(15) Error E0001  Statement not allowed outside of procedure or function
testinfo.prg(15) Warning W0001  Ambiguous reference: 'OBJWMI'
testinfo.prg(15) Warning W0001  Ambiguous reference: 'ORESOLU'
testinfo.prg(16) Error E0001  Statement not allowed outside of procedure or function
testinfo.prg(16) Warning W0001  Ambiguous reference: 'OBJWMI'
testinfo.prg(16) Warning W0001  Ambiguous reference: 'OSISTEM'
testinfo.prg(17) Error E0001  Statement not allowed outside of procedure or function
testinfo.prg(17) Warning W0001  Ambiguous reference: 'OBJWMI'
testinfo.prg(17) Warning W0001  Ambiguous reference: 'OUSERS'
testinfo.prg(18) Error E0001  Statement not allowed outside of procedure or function
testinfo.prg(18) Warning W0001  Ambiguous reference: 'OBJWMI'
testinfo.prg(18) Warning W0001  Ambiguous reference: 'OSERV'
testinfo.prg(19) Error E0001  Statement not allowed outside of procedure or function
testinfo.prg(19) Warning W0001  Ambiguous reference: 'OBJWMI'
testinfo.prg(19) Warning W0001  Ambiguous reference: 'OTIME'
testinfo.prg(20) Error E0001  Statement not allowed outside of procedure or function
testinfo.prg(20) Warning W0001  Ambiguous reference: 'OSRV'
testinfo.prg(20) Warning W0001  Ambiguous reference: 'OJBS'
testinfo.prg(23) Warning W0001  Ambiguous reference: 'ODATOS'
testinfo.prg(23) Warning W0001  Ambiguous reference: 'OSISTEMA'
testinfo.prg(24) Error E0001  Statement not allowed outside of procedure or function
testinfo.prg(24) Warning W0001  Ambiguous reference: 'ODATOS'
testinfo.prg(25) Error E0001  Statement not allowed outside of procedure or function
testinfo.prg(29) Warning W0001  Ambiguous reference: 'ODATOS'
testinfo.prg(29) Warning W0001  Ambiguous reference: 'ODISCO'
testinfo.prg(30) Error E0001  Statement not allowed outside of procedure or function
testinfo.prg(30) Warning W0001  Ambiguous reference: 'ODATOS'
testinfo.prg(30) Warning W0001  Ambiguous reference: 'ODATOS'
testinfo.prg(31) Error E0001  Statement not allowed outside of procedure or function
testinfo.prg(35) Warning W0001  Ambiguous reference: 'ODATOS'
testinfo.prg(35) Warning W0001  Ambiguous reference: 'OPARTI'
testinfo.prg(36) Error E0001  Statement not allowed outside of procedure or function
testinfo.prg(36) Warning W0001  Ambiguous reference: 'ODATOS'
testinfo.prg(36) Warning W0001  Ambiguous reference: 'ODATOS'
testinfo.prg(36) Warning W0001  Ambiguous reference: 'ODATOS'
testinfo.prg(36) Warning W0001  Ambiguous reference: 'ODATOS'
testinfo.prg(37) Error E0001  Statement not allowed outside of procedure or function
testinfo.prg(41) Warning W0001  Ambiguous reference: 'ODATOS'
testinfo.prg(41) Warning W0001  Ambiguous reference: 'ODISKET'
testinfo.prg(42) Error E0001  Statement not allowed outside of procedure or function
testinfo.prg(42) Warning W0001  Ambiguous reference: 'ODATOS'
testinfo.prg(42) Warning W0001  Ambiguous reference: 'NFREE'
testinfo.prg(44) Warning W0001  Ambiguous reference: 'NFREE'
testinfo.prg(45) Error E0001  Statement not allowed outside of procedure or function
testinfo.prg(47) Error E0001  Statement not allowed outside of procedure or function
testinfo.prg(48) Error E0001  Statement not allowed outside of procedure or function
testinfo.prg(50) Error E0001  Statement not allowed outside of procedure or function
testinfo.prg(54) Warning W0001  Ambiguous reference: 'ODATOS'
testinfo.prg(54) Warning W0001  Ambiguous reference: 'OBJUND'
testinfo.prg(55) Error E0001  Statement not allowed outside of procedure or function
testinfo.prg(55) Warning W0001  Ambiguous reference: 'ODATOS'
testinfo.prg(55) Warning W0001  Ambiguous reference: 'ODATOS'
testinfo.prg(55) Warning W0001  Ambiguous reference: 'ODATOS'
testinfo.prg(55) Warning W0001  Ambiguous reference: 'ODATOS'
testinfo.prg(56) Error E0001  Statement not allowed outside of procedure or function
testinfo.prg(60) Warning W0001  Ambiguous reference: 'ODATOS'
testinfo.prg(60) Warning W0001  Ambiguous reference: 'OUND'
testinfo.prg(61) Error E0001  Statement not allowed outside of procedure or function
testinfo.prg(61) Warning W0001  Ambiguous reference: 'ODATOS'
testinfo.prg(61) Warning W0001  Ambiguous reference: 'ODATOS'
testinfo.prg(62) Error E0001  Statement not allowed outside of procedure or function
testinfo.prg(66) Warning W0001  Ambiguous reference: 'ODATOS'
testinfo.prg(66) Warning W0001  Ambiguous reference: 'ORESOLU'
testinfo.prg(67) Error E0001  Statement not allowed outside of procedure or function
testinfo.prg(67) Warning W0001  Ambiguous reference: 'ODATOS'
testinfo.prg(67) Warning W0001  Ambiguous reference: 'ODATOS'
testinfo.prg(68) Error E0001  Statement not allowed outside of procedure or function
testinfo.prg(72) Warning W0001  Ambiguous reference: 'ODATOS'
testinfo.prg(72) Warning W0001  Ambiguous reference: 'OSISTEM'
testinfo.prg(73) Error E0001  Statement not allowed outside of procedure or function
testinfo.prg(73) Warning W0001  Ambiguous reference: 'ODATOS'
testinfo.prg(74) Error E0001  Statement not allowed outside of procedure or function
testinfo.prg(78) Warning W0001  Ambiguous reference: 'ODATOS'
testinfo.prg(78) Warning W0001  Ambiguous reference: 'OSISTEM'
testinfo.prg(79) Error E0001  Statement not allowed outside of procedure or function
testinfo.prg(79) Warning W0001  Ambiguous reference: 'ODATOS'
testinfo.prg(79) Warning W0001  Ambiguous reference: 'ODATOS'
testinfo.prg(80) Error E0001  Statement not allowed outside of procedure or function
testinfo.prg(84) Warning W0001  Ambiguous reference: 'ODATOS'
testinfo.prg(84) Warning W0001  Ambiguous reference: 'OUSERS'
testinfo.prg(85) Error E0001  Statement not allowed outside of procedure or function
testinfo.prg(85) Warning W0001  Ambiguous reference: 'ODATOS'
testinfo.prg(85) Warning W0001  Ambiguous reference: 'ODATOS'
testinfo.prg(86) Error E0001  Statement not allowed outside of procedure or function
testinfo.prg(90) Error E0001  Statement not allowed outside of procedure or function
testinfo.prg(91) Warning W0001  Ambiguous reference: 'ODATOS'
testinfo.prg(91) Warning W0001  Ambiguous reference: 'OSERV'
testinfo.prg(92) Error E0001  Statement not allowed outside of procedure or function
testinfo.prg(92) Warning W0001  Ambiguous reference: 'ODATOS'
testinfo.prg(93) Error E0001  Statement not allowed outside of procedure or function
testinfo.prg(94) Error E0001  Statement not allowed outside of procedure or function
testinfo.prg(98) Error E0001  Statement not allowed outside of procedure or function
testinfo.prg(99) Warning W0001  Ambiguous reference: 'ODATOS'
testinfo.prg(99) Warning W0001  Ambiguous reference: 'OSERV'
testinfo.prg(100) Error E0001  Statement not allowed outside of procedure or function
testinfo.prg(100) Warning W0001  Ambiguous reference: 'ODATOS'
testinfo.prg(101) Error E0001  Statement not allowed outside of procedure or function
testinfo.prg(102) Error E0001  Statement not allowed outside of procedure or function
testinfo.prg(106) Warning W0001  Ambiguous reference: 'ODATOS'
testinfo.prg(106) Warning W0001  Ambiguous reference: 'OSISTEM'
testinfo.prg(107) Error E0001  Statement not allowed outside of procedure or function
testinfo.prg(107) Warning W0001  Ambiguous reference: 'ODATOS'
testinfo.prg(107) Warning W0001  Ambiguous reference: 'ODATOS'
testinfo.prg(108) Error E0001  Statement not allowed outside of procedure or function
testinfo.prg(112) Warning W0001  Ambiguous reference: 'ODATOS'
testinfo.prg(112) Warning W0001  Ambiguous reference: 'OTIME'
testinfo.prg(120) Error E0001  Statement not allowed outside of procedure or function
testinfo.prg(120) Warning W0001  Ambiguous reference: 'ODATOS'
testinfo.prg(120) Warning W0001  Ambiguous reference: 'ODATOS'
testinfo.prg(120) Warning W0001  Ambiguous reference: 'ODATOS'
testinfo.prg(120) Warning W0001  Ambiguous reference: 'ODATOS'
testinfo.prg(120) Warning W0001  Ambiguous reference: 'ODATOS'
testinfo.prg(120) Warning W0001  Ambiguous reference: 'ODATOS'
testinfo.prg(120) Warning W0001  Ambiguous reference: 'ODATOS'
testinfo.prg(120) Warning W0001  Ambiguous reference: 'ODATOS'
testinfo.prg(121) Error E0001  Statement not allowed outside of procedure or function
testinfo.prg(124) Warning W0001  Ambiguous reference: 'ODATOS'
testinfo.prg(124) Warning W0001  Ambiguous reference: 'OJBS'
testinfo.prg(125) Error E0001  Statement not allowed outside of procedure or function
testinfo.prg(125) Warning W0001  Ambiguous reference: 'OJOB'
testinfo.prg(126) Error E0001  Statement not allowed outside of procedure or function
testinfo.prg(128) Error E0001  Statement not allowed outside of procedure or function
testinfo.prg(128) Warning W0006  Procedure returns value
55 errors

No code generated
Best Regards, Saludos

Falconi Silvio
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Postby rolando » Fri Apr 11, 2008 11:41 am

Silvio,

Solo cambia la línea 3, de "Funcion Main() " a Function Main()

Single it changes line 3, of "Funcion Main() " to Function Main()

Rolando :D
User avatar
rolando
 
Posts: 593
Joined: Sat May 12, 2007 11:47 am
Location: San Nicolás - BA - ARGENTINA

Postby JmGarcia » Mon Dec 08, 2008 12:21 am

Y como se leerían com WMI todos los datos de red... algo así como el ipconfig /all de consola de MS-DOS.

Este tipo de datos:
Code: Select all  Expand view
Adaptador Ethernet Conexión de área local          :

        Sufijo de conexión específica DNS :
        Descripción. . . . . . . . . . .  : NIC TX PCI 10/100 de 3Com EtherLinkXL (3C905B-TX)
        Dirección física. . . . . . . . . : ff-ff-ff-ee-ee-ee
        DHCP habilitado. . . . . . . . .  : No
        Dirección IP. . . . . . . . . . . : 194.194.194.100
        Máscara de subred . . . . . . . . : 255.255.255.0
        Puerta de enlace predeterminada   : 194.194.194.100
        Servidores DNS . . . . . . . . . .: 194.194.194.100
                                            fec0:0:0:ffff::1%1
Mi abuelo decía: Los aviones vuelan porque Dios quiere, y los helicópteros ni Dios sabe porque vuelan.
FWH 16.02, xHarbour 1.2.3, Harbour 3.2.0, WorkShop 4.5, AJ Make 0.30, Borlan BCC 7.00, VisualStudio 2013
User avatar
JmGarcia
 
Posts: 654
Joined: Mon May 29, 2006 3:14 pm
Location: Madrid - ESPAÑA

Postby Otto » Mon Dec 08, 2008 7:15 am

Thank you for this interesting function.

Regards,
Otto

This line errors out:
What object is oSrv?
//LOCAL oJbs := oSrv:ExecQuery( "SELECT * FROM Win32_BaseBoard" )
I get an error:
Error description: Error BASE/1003 Variable does not exist: OSRV
User avatar
Otto
 
Posts: 6005
Joined: Fri Oct 07, 2005 7:07 pm

Postby MGA » Mon Dec 08, 2008 10:06 am

I get an error:
Error description: Error BASE/1003 Variable does not exist: OSRV
ubiratanmga@gmail.com

FWH18.02
FWPPC
Harbour/xHarbour
xMate
Pelles´C
TDolphin
MGA
 
Posts: 1234
Joined: Mon Feb 25, 2008 2:54 pm
Location: Brasil/PR/Maringá

Postby marca » Mon Dec 08, 2008 6:26 pm

Basta vc trocar


//LOCAL oJbs := oSrv:ExecQuery( "SELECT * FROM Win32_BaseBoard")
por

LOCAL oJbs := objWMI:ExecQuery( "select * from Win32_BaseBoard" )
Pos objWMI é o resultado de objWMI:= oLoc:ConnectServer()

blz

um abraço
Marcelo Ferro
Marcelo Ferro da Silveira
Fwh14.04/xHarbour 1.2.3 Simplex / Bcc582 / Pelles 8
SqlLib /xMate/WS
marca
 
Posts: 116
Joined: Mon Aug 13, 2007 5:22 pm
Location: Brazil

Postby karinha » Thu Dec 11, 2008 12:21 pm

Este esta correcto?
Code: Select all  Expand view
   FOR EACH oDatos IN oJbs
    MsgInfo("El Número de Serie de la MotherBoard es: "+Alltrim(cValtoChar(oJob:SerialNumber)),"Desde WMI")
   NEXT


??-> oJob:SerialNumber -> VARIABLE oJob no ejiste
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7214
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Postby Kleyber » Thu Dec 11, 2008 2:22 pm

Joao,

No seria oJbs en vez de oJob ??

Saludos
Kleyber Derick

FWH / xHb / xDevStudio / SQLLIB
User avatar
Kleyber
 
Posts: 581
Joined: Tue Oct 11, 2005 11:28 am
Location: São Luiz, Brasil

Postby karinha » Thu Dec 11, 2008 2:55 pm

Kleyber wrote:Joao,

No seria oJbs en vez de oJob ??

Saludos


Hi, dear friend.

te funciona asi?

Voy intentar.

Saludos y un fuerte abrazo.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7214
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Next

Return to FiveWin para Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 68 guests