Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

WMI Not working in some machines

Status
Not open for further replies.

djayakum

Programmer
Feb 2, 2002
28
IN
Hello ,

Iam using WMI to access client machine information , in some computer its working in some computer not working , its working in XP machines , its not working in windows 2000 profesional.. is there any service pack i want to install ? or problem in WMI ? if any one having idea please do reply

Thanks in advance

Jay

 
Hello djayakum,

Binding, it's the same. Info exposed, not. Generally, xp exposes more info than 2k, and 2k, 9x etc. (It's ever growing.) So, it depends on what you want to find out on the client machine.

regards - tsuji
 
thaks for ur reply,

I want to get the Bios Serial Number Of the client machine

Thanks

 
djayakum,

As you said some m/c do not work, so I suppose you know how to get it. My these lines are just meant to verify with yours, in case ...

Win32_bios and win32_systembios classes have got early attention and supported by 9x up. But some lately developed properties are only supported by xp or 2k3 like .bioversion at the present realization. If you want to get bios' serial number, it is well supported from 9x up.

You may find it useful to check the detail with sdk.

Code:
set svc=getobject("winmgmts:root\cimv2")
set cBios=svc.execquery("select * from win32_bios")
for each oBios in cBios
    sSerialNumber=oBios.serialnumber
    exit for
next
set cBios=nothing
set svc=nothing
'sSerialNumber is the number in string you want to get

But, of course you know, for win9x & winnt, you need to install specifically the wbemcore component. And, that may be the reason of your posting?

regards - tsuji
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top