TechSpot

Dell E5400 WMI battery name corrupt

By Dell boy
Feb 9, 2009
  1. If I try to retrieve the Name attribute of Win32_Battery, I get non-alphanumerical information which then causes a problem with using this info as text (log file etc).

    Can anyone help?

    A simple example:-

    Code:
    Const wbemFlagReturnImmediately = &h10
    Const wbemFlagForwardOnly = &h20
    
    strComputer = "."
    
       Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\CIMV2")
       Set colItems = objWMIService.ExecQuery("SELECT * FROM Win32_BIOS", "WQL", wbemFlagReturnImmediately + wbemFlagForwardOnly)
    
       For Each objItem In colItems
          WScript.Echo "Name: " & objItem.Name
       Next
    This gives "DELL RM6618B" followed by a random set of non-alphanumerical characters.

    An example output is = (DELL RM6618B??? ??? ? Y???)

    which when viewed in a Hex Editor is :-
    44 45 4C 20 52 4D 36 36 31 38 42 (this bit is Dell RM6618B) then,
    3F 3F 3F 0C 3F 3F 3F 0C 3F 0B 59 09 3F 3F 3F
     
  2. kimsland

    kimsland Ex-TechSpotter Posts: 14,524

  3. Dell boy

    Dell boy TS Rookie Topic Starter

    Thanks for the quick reply kimsland.

    Unfortunately it does not look like this is the fix because the file "Cimwin32.dll" on my system (XP SP2) is dated 4 Aug 2004 and is version 5.1.2600.2180 which is later than the DLL spec in Microsoft's article.

    I should have said earlier that I did search MS knowlegebase but did not seem to find what I need.
     
  4. mscrx

    mscrx TS Rookie Posts: 310

    I just tried with a e6400 and get this:

    Name: Dell FU4418A

    which looks pretty normal. there is not much difference between those models.
    do you have another machine where you can test?
     
Topic Status:
Not open for further replies.

Similar Topics

Add New Comment

You need to be a member to leave a comment. Join thousands of tech enthusiasts and participate.
TechSpot Account You may also...