|I am not an expert in WMI, but the issue is not that of C++ but your use of the wmic commands. You should first check the actual syntax of the commands you are trying to use. Then run them in a command window to find out the actual correct usage. I tried them both and got the following:
C:\Users\rjmac\source\repos>wmic bootconfig get description
C:\Users\rjmac\source\repos>wmic diskdrive where DeviceID=\\.\PHYSICALDRIVE0
Node - RJM-INSPIRON15
Description = Invalid query
So I tried this to find out what options are available with the
C:\Users\rjmac\source\repos>wmic diskdrive -?
DISKDRIVE - Physical disk drive management.
HINT: BNF for Alias usage.
(<alias> [WMIObject] | <alias> [<path where>] | [<alias>] <path where>) [<verb clause>].
DISKDRIVE ASSOC [<format specifier>]
DISKDRIVE CREATE <assign list>
DISKDRIVE GET [<property list>] [<get switches>]
DISKDRIVE LIST [<list format>] [<list switches>]
The final one allows you to check the options for the command.
So the error message "Description = Invalid query" is telling you that the command is in error, and you need to find out what the correct format is.