Failure while accessing Bcd using wmic

1k views Asked by At

I am getting an error when I try to access the EnumerateObjects method of the BcdStore class using wmic.

I initially ran the GetSystemDisk method to see that I can access the BcdStore (see below). This worked fine.

______________ cmd window output begins __________________

C:>wmic /namespace:\root\wmi class BcdStore call GetSystemDisk

Executing (BcdStore)->GetSystemDisk()

Method execution successful.

Out Parameters:

instance of __PARAMETERS

{

    Disk = "\\Device\\Harddisk0\\DR0";

    ReturnValue = TRUE;

};

______________ cmd window output ends __________________

Then I ran the EnumerateObjects method, but got a failure, please see below. The different versions are just different variations of how to pass the arguments to the method, But this didn't work.

______________ cmd window output begins __________________

C:>wmic /namespace:\root\wmi class BcdStore call EnumerateObjects 10200003

Executing (BcdStore)->EnumerateObjects()

ERROR:

Description = Invalid method Parameter(s)

C:>wmic /namespace:\root\wmi class BcdStore call EnumerateObjects Type=10200003

Executing (BcdStore)->EnumerateObjects()

ERROR:

Description = Invalid method Parameter(s)

C:>wmic /namespace:\root\wmi class BcdStore call EnumerateObjects Type="H10200003"

ERROR:

Description = Type mismatch.

C:>wmic /namespace:\root\wmi class BcdStore call EnumerateObjects 0x10200003

ERROR:

Description = Type mismatch.

______________ cmd window output ends __________________

Any help would be appreciated.

1

There are 1 answers

0
JPBlanc On

This is not an answer because I'am not sure to really understand what you want to do, but it can be an explanation of why what you do does not work.

The following works because GetSystemDisk is a static method of the class BcdStore :

wmic /namespace:\root\wmi class BcdStore call GetSystemDisk

As you can see in the method qualifier of WMI Cim studio :

enter image description here

But EnumerateObjects is an instance method of the class BcdStore, so you can't call it from the class itself, you must call it from an instance. WMI Object Browser show no instance on my W2K8R2 for BcdStore class.

enter image description here