Const BcdLibraryString_Description = &h12000004 Const Current = "{fa926493-6f1c-4193-a414-58f0b2456d1e}" strComputer = "." Set objStoreClass = GetObject("winmgmts:{(Backup,Restore)}\\" & _ strComputer & "\root\wmi:BcdStore") objStoreClass.OpenStore "", objStore objStore.OpenObject Current, objDefault objDefault.GetElement BcdLibraryString_Description, objElement Wscript.Echo "Current operating system: " & objElement.String #### use strict; use Win32::OLE; use Data::Dumper; use warnings; my $BcdLibraryString_Description = "&h12000004"; my $Current = "{fa926493-6f1c-4193-a414-58f0b2456d1e}"; my $strComputer = "\\\\localhost"; my $root = "\\root\\wmi:BcdStore"; my $class = ("winmgmts:{impersonationlevel=impersonate,(Backup,Restore)}$strComputer$root"); my $wmi = Win32::OLE->GetObject($class); $wmi->OpenStore("", my $bcdst) or die "failed to get bcd"; #Also tried my $setopenstore = $wmi->OpenStore("",my $bcdst); $bcdst->OpenObject($Current, my $defaultclass ) or die "failed to openobject"; #Failing Point “Can't call method "OpenObject" on an undefined value at ASR_test2.pl” It looks like the previous line openstore is not assigning the store to $bcdst #Also tried my $setdefaultclass = $openstore->OpenObject($Current, my $defaultclass); $defaultclass->GetElement($BcdLibraryString_Description, my $debugstatus); print "\n$debugstatus\n";