Page 1 of 1 1
Topic Options
#184732 - 2008-01-22 02:54 PM Unchanged script no longer works... ?
Jeroen Offline
Starting to like KiXtart

Registered: 2001-08-16
Posts: 180
Loc: Netherlands
Hi there,

I've been out of practice for a while so please bare with me if I say something stupid.

We've been using a script for a long time now to automatically add the Domain Users group of our domain in the local administrators group of a remote PC.

The script remains unchanged since january 2005, and since it has always worked (until sometime recently, not sure when) I don't think the script itself is the problem. Am I missing some prerequisite for using these functions? The computer running the script is Windows XP Pro, English, with SP2, and the Kix version is 4.10:

The relevant part of the script:
 Code:
While @ERROR = 0 AND $Computer <> ""
   ; Bind to the computer
   At ($Line,3) "Processing $Computer"
   Sleep 0.5
   $Result = GetObject("WinNT://"+$Computer+"/Administrators,group")
   ; Check if binding was successfull. If not, skip this computer
   If @ERROR=0
      ; Computer bound. Add group.
      $Result.Add("WinNT://OURDOMAIN/Domain Users")
      If @ERROR = 0
	 At ($Line,3) "Processing $Computer - Successfull!"
	 Sleep 1
      Else
	 At ($Line,3) "Processing $Computer - FAILED! ERRORCODE: @ERROR"
	 Sleep 4
      Endif
   Else
      ; Binding unsuccessfull. Notify and skip
      At ($Line,3) "Binding $Computer - FAILED! ERRORCODE: @ERROR"
      Sleep 4
   Endif
   At ($Line,3) "									    "
   ; Get next computername
   $Computer = ReadLine(1)
Loop


The error code returned is -2147024843, which seems to indicate that the path was not found to the remote computer. However, I am able to manually add the group to the remote computer so it's not a question of rights or something...

Thanks for your help!
_________________________
Regards, Jeroen. There are two ways to write error-free programs. Only the third one works.

Top
#184734 - 2008-01-22 04:12 PM Re: Unchanged script no longer works... ? [Re: Jeroen]
Jeroen Offline
Starting to like KiXtart

Registered: 2001-08-16
Posts: 180
Loc: Netherlands
Addition: I now get an error: -2147319779, which should be "Library not registered"...

ADSI is installed by default in WinXP Pro, so this should not be the problem, right? I also have the same problem on 2 computers by the way, (not an image of eachother).
_________________________
Regards, Jeroen. There are two ways to write error-free programs. Only the third one works.

Top
#184736 - 2008-01-22 04:19 PM Re: Unchanged script no longer works... ? [Re: Jeroen]
Jeroen Offline
Starting to like KiXtart

Registered: 2001-08-16
Posts: 180
Loc: Netherlands
Strange things happening here.. Restarted the script again without changing anything to test something, and now it works... ?

Anyway, I'll let it be for now, if I get any more problems I'll post again.

_________________________
Regards, Jeroen. There are two ways to write error-free programs. Only the third one works.

Top
Page 1 of 1 1


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

Who's Online
0 registered and 764 anonymous users online.
Newest Members
ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder, M_Moore
17887 Registered Users

Generated in 0.052 seconds in which 0.025 seconds were spent on a total of 13 queries. Zlib compression enabled.

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