activex - WMI in VBScript Fails -
we having issue our installer 1 customer. installer runs bit of vbscript retrieve current ip address. reason on customers machine returns following error:
script error -2146827859. microsoft vbscript runtime error: activex component can't create object: 'objwmiservice.execquery'
here vbscript running:
set objwmiservice = getobject("winmgmts:\\localhost\root\cimv2") set coladapters = objwmiservice.execquery("select * win32_networkadapterconfiguration ipenabled = true") each objadapter in coladapters if not isnull(objadapter.ipaddress) = lbound(objadapter.ipaddress) ubound(objadapter.ipaddress) if objadapter.ipaddress(i)<>"0.0.0.0" if instr(objadapter.ipaddress(i),":") > 0 'this ipv6 address. else session.property("ipaddress") = objadapter.ipaddress(i) end if end if next end if next
does know causing this?
thanks in advance.
Comments
Post a Comment