Page 1 of 1 1
Topic Options
#78519 - 2001-10-31 12:05 AM COM Error.
Bryce Offline
KiX Supporter
*****

Registered: 2000-02-29
Posts: 3167
Loc: Houston TX
When ever i try yo run the following script to rename a NT account.

code:

$OldUser = "Admin1"
$newuser = "Admin"

$Computer = getobject("WinNT://@wksta")
$user = getobject("WinNT://@wksta/$olduser,user")
$Computer.MoveHere($user.adspath,$newuser)

? "@error:@serror"

exit(0)


I get this error and kix exits.

quote:

Script error : Error in expression: Dispatch pointers not allowed in expressions. !
? "@error:@serror"

It is erroring out on this line when ran in debug mode.

code:

$Computer.MoveHere($user.adspath,$newuser)

The weird thing is, the rename command works, but causes kix to error out.

Bryce

Top
#78520 - 2001-10-31 12:32 AM Re: COM Error.
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
Bryce,

The short answer is that it's a bug in RC3 ... Ruud has since fixed it ... work-around is our good friend, the $= ala:

$= $Computer.MoveHere($user.adspath,$newuser)

Bryce, are you going to be around for a while tonight bud - I want to email chat !

-Shawn

Top
#78521 - 2001-10-31 12:41 AM Re: COM Error.
Bryce Offline
KiX Supporter
*****

Registered: 2000-02-29
Posts: 3167
Loc: Houston TX
getting ready to walk out the door for home... or that is the plan for now
Top
Page 1 of 1 1


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

Who's Online
0 registered and 302 anonymous users online.
Newest Members
Sir_Barrington, batdk82, StuTheCoder, M_Moore, BeeEm
17886 Registered Users

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