#184732 - 2008-01-22 02:54 PM
Unchanged script no longer works... ?
|
Jeroen
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:
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
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
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 764 anonymous users online.
|
|
|