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

It is easy to change my script to do the reverse:
use Win32::OLE; $ADsPath = "WinNT://VAD-MM/lanmanserver"; $c = Win32::OLE->GetObject($ADsPath) or die "Невозможно получить $ADsP +ath\n"; print map {"[$_->{path}=$_->{description}]\n"} in $c;
outputs on my machine "vad-mm" (you should substitute your machine of interest there of course)
[C:\=] [D:\=]
I am not WMI expert and do not know how to use GetSecurityDescriptor method without reading proper documentation, but I do know that an example shown by me uses WMI and may be it could solve your problem as well?

Let me know if something should be clarified better.

Courage, the Cowardly Dog

Replies are listed 'Best First'.
Re: Re: Re: Re: Win32::OLE and WMI
by grmm2 (Acolyte) on Feb 03, 2004 at 08:44 UTC
    Thanks for trying to help, Courage. I've been using WMI with perl for a long time and the basic stuff all works very nicely. I think my crux of the problem is that this is the first time that I have tried to return an object from an OLE call where the object reference is supplied as an argument rather than as a result of the call. ie. This always works:
    $objectIwant = $otherobject->Method();
    but this does not:
    $returncode = $otherobject->Method($objectIwant);
      documentation inside Win32::OLE::Variant tells us how to use "byval" in Win32::OLE.

      See my comment in main thread...

      Courage, the Cowardly Dog