Page 1 of 1 1
Topic Options
#89823 - 2002-11-27 07:58 PM Error 6 when .setinfo is executed
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
What am I missing?

Does this mean I have to wait for replication to complete? [Smile]

{Edit - Completed code}

code:
 ; ListGroupMembership.kix
BREAK ON
CLS
$cfilename = "H:\groupchange\BC.xls"

$oxl = Createobject("Excel.application")
$rc = $oxl.workbooks.open($cfilename)
$nrow = 1 ; -- Assume Row one is column Headings
WHILE $oxl.cells($nrow, 1).value <> "" ; -- If this is not NULL, keep going
$adsgroup = ""
$userobj = ""
$nrow = $nrow + 1 ; -- Data Starts on row two and add 1 each time
IF $oxl.cells($nrow, 1).value = ""
?"Script is Complete"
SLEEP 4
$oxl.quit
$oxl = ""
RETURN
ENDIF
; -- Get the value of the first field
$value1 = $oxl.cells($nrow, 1).value
?$value1
$domainstring="DOMAIN"
$userstring = $value1

$userobj = GetObject("WinNT://" + $domainstring + "/" + $userstring)

$group = "MMC OR BC"
;$grouppath = $domainstring + "/" + $group
$grouppath = $domainstring + "/" + $group
$adsgroup = GetObject("WinNT://" + $grouppath)
$adsgroup.add("WinNT://" + $domainstring + "/" + $userstring)
$adsgroup.setinfo
;SLEEP 1
IF @Serror <> 0
?@Serror
ENDIF
LOOP
?"Script is complete"
get $

Thanks,

Kent

[ 27. November 2002, 22:22: Message edited by: kdyer ]
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#89824 - 2002-11-27 08:01 PM Re: Error 6 when .setinfo is executed
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22344
Loc: OK
well, the error is most common (along 9) with com...
what the add gives?
_________________________
!

download KiXnet

Top
#89825 - 2002-11-27 09:00 PM Re: Error 6 when .setinfo is executed
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
I think I may need to flush -

$userobj = Nothing
$adsgroup = Nothing

each time it loops through.

Kent
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#89826 - 2002-11-27 09:01 PM Re: Error 6 when .setinfo is executed
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22344
Loc: OK
maybe you should even blush?
_________________________
!

download KiXnet

Top
#89827 - 2002-11-27 09:24 PM Re: Error 6 when .setinfo is executed
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
I think I sorted it out..

We have a child domain where the group resides and the users are in the parent.

Getting a -2147352567 error now..

May need to create the security group in the same domain as the users.

Kent
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#89828 - 2002-11-27 09:27 PM Re: Error 6 when .setinfo is executed
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
If you are adding master domain accounts to a local group in a resource domain, why does the user and group both use $domainstring? One would think that the two domain strings would be different.

[ 27. November 2002, 21:28: Message edited by: Howard Bullock ]
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#89829 - 2002-11-27 09:43 PM Re: Error 6 when .setinfo is executed
Chris S. Offline
MM club member
*****

Registered: 2002-03-18
Posts: 2368
Loc: Earth
@SERROR works too.
Top
#89830 - 2002-11-27 09:43 PM Re: Error 6 when .setinfo is executed
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
Changed that..

Still testing. [Big Grin]

Kent
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#89831 - 2002-11-27 10:20 PM Re: Error 6 when .setinfo is executed
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
Howard was right..

Yes, had to change the domain to the relevant domain.. We have users in the child and the parent domains..

Well it is now complete..

I will update the initial post for future use.

Kent
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
Page 1 of 1 1


Moderator:  Shawn, ShaneEP, Ruud van Velsen, Arend_, Jochen, Radimus, Glenn Barnas, Allen, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 307 anonymous users online.
Newest Members
Thechadpma, CestMoi, MeMyselfAndI, Praveer, Ollero
17745 Registered Users

Generated in 0.087 seconds in which 0.061 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org