ErosOlmi
12-09-2007, 22:20
Ok, guy. I say here about "Stay tuned" (http://community.thinbasic.com/index.php?topic=1184.msg8206#msg8206).
So some preview is needed.
We were experimenting about possibility to natively add WMI to thinBasic using a dedicated module.
Please find attached to this post what we was getting so far. WMI module contains just one function called WMI_GetData with the following syntax:
TWMI_GetData(sComputername, NameSpace, UserName, Password, sClassName [, sWhere [, sFields]]) AS STRING
WMI_GetData function returns a string full of tokens separated by $CRLF that is the list of all properties found inside the specified WMI class.
Unzip into a new directory under \thinBasic\SampleScripts\WMI\ and executed the test script. Experiment changing the class name and see.
For a list of WMI classes, please have a look at http://msdn2.microsoft.com/en-us/library/aa394554.aspx Attention, it is a huge huge area so quite easy to get lost.
Please test it and report any error or whatever you can think it can be useful to the development.
Important
WMI module is experimenting
Many sub-informations are still not available
produced list contains informations not part of the actual data. Those info are visible in between { and }
WMI module is only informative, so it just read data
any help is appreciated
ADDED note:
for Win95/Win98 if module does not report any info, you need to install Windows Management Instrumentation (WMI) CORE 1.5 (Windows 95/98) or above: http://www.microsoft.com/downloads/details.aspx?FamilyID=98a4c5ba-337b-4e92-8c18-a63847760ea5&DisplayLang=en
WMI works also on the net using RPC protocol
Other reference: http://www.dmtf.org/standards/wbem
CHANGED:
2007.10.13: added namespace, username, password to function TWMI_GetData. Attached updated.
So some preview is needed.
We were experimenting about possibility to natively add WMI to thinBasic using a dedicated module.
Please find attached to this post what we was getting so far. WMI module contains just one function called WMI_GetData with the following syntax:
TWMI_GetData(sComputername, NameSpace, UserName, Password, sClassName [, sWhere [, sFields]]) AS STRING
WMI_GetData function returns a string full of tokens separated by $CRLF that is the list of all properties found inside the specified WMI class.
Unzip into a new directory under \thinBasic\SampleScripts\WMI\ and executed the test script. Experiment changing the class name and see.
For a list of WMI classes, please have a look at http://msdn2.microsoft.com/en-us/library/aa394554.aspx Attention, it is a huge huge area so quite easy to get lost.
Please test it and report any error or whatever you can think it can be useful to the development.
Important
WMI module is experimenting
Many sub-informations are still not available
produced list contains informations not part of the actual data. Those info are visible in between { and }
WMI module is only informative, so it just read data
any help is appreciated
ADDED note:
for Win95/Win98 if module does not report any info, you need to install Windows Management Instrumentation (WMI) CORE 1.5 (Windows 95/98) or above: http://www.microsoft.com/downloads/details.aspx?FamilyID=98a4c5ba-337b-4e92-8c18-a63847760ea5&DisplayLang=en
WMI works also on the net using RPC protocol
Other reference: http://www.dmtf.org/standards/wbem
CHANGED:
2007.10.13: added namespace, username, password to function TWMI_GetData. Attached updated.