in reply to Re: Win32::OLE and WMI
in thread Win32::OLE and WMI

That's great. I wondered if OLE::Variant was implicated in some way, but frankly its documentation could be enhanced for those at intermediate level like me. Now you've pointed that out, I've been able to get the DACL's out which was my main aim all along. Thanks.
use Win32::OLE; use Win32::OLE::Variant; $wmiFileSecSetting = Win32::OLE->GetObject("winmgmts:Win32_LogicalFile +SecuritySetting.path='D:\\Programming\\test\\a.pl'"); my $wmiSecurityDescriptor = Win32::OLE->GetObject('winmgmts:Win32_Secu +rityDescriptor'); my $v = Variant(VT_DISPATCH|VT_BYREF,$wmiSecurityDescriptor); $RetVal = $wmiFileSecSetting->GetSecurityDescriptor($v); foreach my $ace (@{$v->Value->{DACL}}) { print $ace->{Trustee}->{Domain}.'\\'.$ace->{Trustee}->{Name}.': '. +$ace->{AccessMask}."\n"; }