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:-
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
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