davemabe has asked for the wisdom of the Perl Monks concerning the following question:

I am trying to set a boolean property to false on an object via ADSI with no luck. I have tried

$group->{$attribute} = 0;
and
$group->PutEx(1,$attribute,0);
and
$group->PutEx(4,$attribute,0);
and even
$group->PutEx(2,$attribute,"FALSE");
all to no avail. Any help would be greatly appreciated.

Dave

Replies are listed 'Best First'.
Re: Setting an ADSI boolean property to
by davemabe (Monk) on Aug 28, 2001 at 22:30 UTC
    Hey, hey, hey!

    A quick Google search turned up the info I needed. Apparantly you need to use Win32::OLE::Variant to create a variable of type VT_BOOL. Like this:

    my $false = Win32::OLE::Variant->new(VT_BOOL,0); $group->{$attribute} = $false;


    Dave