Sign in to follow this  
Followers 0
Tripredacus

Strange WMI problem on Intel hardware

3 posts in this topic

Crosspost from here: http://www.autoitscript.com/forum/topic/150866-strange-wmi-problem-on-intel-hardware/

I don't think it is an AutoIT problem.

I've been getting reports from manufacturing that some of our applications have been generating an error, such as:

AUTOIT ERROR
LINE 1165(X:\windows\system32\program.exe)
ERROR: Subscript used w/ non-array variable

I have determined what is causing this error, and at which point, but not why and have not been able to determine a way to program around it. I am actually seeing this error in any application that reads from the WMI, here is an example script:

$sWMIService = "winmgmts:\\" & @ComputerName & "\root\CIMV2"
$objWMIService = ObjGet($sWMIService)
IF IsObj($objWMIService) Then
$colItems = $objWMIService.ExecQuery("SELECT * FROM Win32_ComputerSystem")
If IsObj($colItems) Then
For $oItem In $colItems
$sModel = StringReplace( $oItem.Model , "/" , "" )
Next
EndIf
EndIf

The application reads from WMI to get the Model number for 2 reasons. 1 it displays it on the screen and 2 it looks up that value on the server so that it can generate the GUI. Obviously, if the field is empty an error is generated. However, it does not care if it cannot find the value on the server, as if the value does not match, it shows a default message. So the way it is currently written, I know exactly what the error means when it appears. It means the field is empty. There was only 1 hardware I had where the field actually WAS empty, and it was a prototype unit. If a production unit had no value there, we would defect it out for obvious reasons.

Now on to where the error occurs. The application is compiled for 64bit.

Case where error occurs (not 100% of hardware, but 100% on the hardware it happens on unless workaround.)

- Intel BIOS has both UEFI and Legacy Boot enabled.

- BIOS-level PXE* boot to WinPE 4.0 x64

- Run application

- WMI value is an object, but the object is empty, or null.

* I don't think PXE is a requirement, but I don't boot via CD or USB.

Workaround

- Disable UEFI boot in the BIOS.

If you can think of any thing I could try to find out what the problem could be, let me know. I may end up posting this question elsewhere as well.

For those who are interested, hardware effected:

Intel DB75EN

Intel NUC (D33217GKE/DC3217YE)

0

Share this post


Link to post
Share on other sites

Can you boot two machines, one working and one not working and create two

WMIC Path Win32_ComputerSystem get * /Format:list>good.txt

WMIC Path Win32_ComputerSystem get * /Format:list>bad.txt

and post them?

But what is the actual problem?

I mean you can put a check in the Autoit code and if the field comes empty you write *something* to it.

Or am I missing something? :unsure:

jaclaz

0

Share this post


Link to post
Share on other sites

The actual problem is that on some of this new hardware, you can't read from WMI. Its not across the board. I am testing on a NUC now and it does not exhibit this problem. I'll keep an eye out for one that gets the error and then run the command you requested.

I just got one on the DB75EN. Wmic was able to read that field in the BIOS just fine but.... it has "technically" invalid information. I can't post what shows up, but it isn't the model number. This in itself shouldn't matter with generating the GUI. I think instead I should get a Quad opened with Intel as this might be related.

0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0

  • Recently Browsing   0 members

    No registered users viewing this page.