WMI Error when adding user to a group and .NET

WMI Error when adding user to a group and .NET

Post by paayal.pat » Fri, 24 Sep 2004 06:59:31


Hi all,

I have a vb.net page in which I want to embed the following WMI
code. Everything works fine other than the 'Array' ojbect in WMI.

The code is as follows


Const ADS_PROPERTY_APPEND = 3
Set objGroup = GetObject _
("LDAP://cn=Sea-Users,cn=Users,dc=NA,dc=fabrikam,dc=com")
objGroup.PutEx ADS_PROPERTY_APPEND, "member", _
Array("cn=Scientists,ou=R&D,dc=NA,dc=fabrikam,dc=com",
_
"cn=Executives,ou=Management,dc=NA,dc=fabrikam,dc=com",
_
"cn=MyerKen,ou=Management,dc=NA,dc=fabrikam,dc=com")
objGroup.SetInfo


when I execute my vb.net page. it gives me the error that Array is
a type and cannot be used in this way. and without specifying the word
Array I get 'unspecified error' in my page.

So does anybody know the substitute of word 'Array' to use in the
vb.net page OR is there something else that I am missing.

Thanks,
Payal
 
 
 

WMI Error when adding user to a group and .NET

Post by bortol » Thu, 03 Feb 2005 06:49:27

I have your same problem!!! Have u find a solution? Thanks!!

Cris