Jump to content

Strange WMI problem on Intel hardware


Recommended Posts

The rest of my post isn't showing up... Here it is in a new reply, maybe that will help.

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)
Edited by Tripredacus
Link to comment
Share on other sites

  • Moderators

And...? Did you mean to put this in Chat, or do you have a specific script to post that is giving you problems??

 

Edit: LOL, I was wondering - not like you to post a bunch of nothing like that :)

Edited by JLogan3o13

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

What variable is not being declared correctly? (You should do some error trapping see @error and seterror()) also you could run the script in scite(F5) on an affected machine to show when the program fails)

 

It is not a problem with variables being declared incorrectly.

I already know what the "error" is, the variable is an object but there is no data in it.

I have not been able to replicate this from a running OS, only from WinPE.

Link to comment
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
 Share

×
×
  • Create New...