Welcome! Log In Create A New Profile

Advanced

WMI Object Classes

Posted by Michael Drechsel 
Michael Drechsel
WMI Object Classes
October 03, 2008 01:33PM
Hallo,

I will do something with the WMI Classes and have some Problem with the WD Syntax.

Here is the code:

objLocator is object Automation dynamic
objLocator = new object Automation "WbemScripting.SWbemLocator"


objService is object Automation dynamic
objService=objLocator>>ConnectServer()

objService>>Security_>>ImpersonationLevel =3

objInstance is object Automation dynamic
objInstance=objService>>ExecQuery("SELECT * FROM Win32_Bios")

sBuildnumber is string
sBuildnumber=objInstance>>Buildnumber

"objInstance>>Buildnumber" generates the errror "Name unknown".
How can I access the properties of the WMI classes with WD 12 ?

The description of the class is here:
[msdn.microsoft.com]

PS: In VB it looks like:


for each object in objectset
"BuildNumber = " & object .BuildNumber
next

Is there any syntax contruct in WD to get the members of an objectset ??


TIA Michael



Edited 1 time(s). Last edit at 10/03/2008 02:16PM by Michael Drechsel.
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: