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.