Jump to content

Recommended Posts

Posted

Hello,

Sorry to disturb you with my (easy for u, I hope) problem.

I just don't know how create a local user on my computer (windows XP). I try many possibilities, without succes ...

Let's just take a look on my script and please don't laught !!!!

$Domain = ObjGet("Winnt://" & @ComputerName)

$ObjUser = $Domain.Create ("User",$Login)

$ObjUser.SetPassword $mdp

$ObjUser.SetInfo

I try with LDAP://, and with other syntaxe, but no one work ... please help the noob I am !!!!

Posted

$Domain = ObjGet("Winnt://" & @ComputerName)

$ObjUser = $Domain.Create ("User",$Login)

$ObjUser.SetPassword $mdp

$ObjUser.SetInfo

The parameter belongs inside parens:

$ObjUser.SetPassword ($mdp)

Other than that, it should work. What, exactly, doesn't?

:)

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Posted

Thanks to reply me !!! :)

But this is the 2nd line who doesn't works ..

this say to me :

==> Variable must be of type "Object".:

$ObjUser = $Domain.Create ("User",$Login)

$ObjUser = $Domain^ ERROR

Posted

Thanks to reply me !!! :)

But this is the 2nd line who doesn't works ..

this say to me :

==> Variable must be of type "Object".:

$ObjUser = $Domain.Create ("User",$Login)

$ObjUser = $Domain^ ERROR

$Domain is not an object because your attempted connection to the WINNT:// interface failed. Most likely because of insufficient rights, but you can add a COM error handler to tell you more. Look in the help file under OBJ/COM reference.

:)

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Posted

$Domain is not an object because your attempted connection to the WINNT:// interface failed. Most likely because of insufficient rights, but you can add a COM error handler to tell you more. Look in the help file under OBJ/COM reference.

:)

Still Thanks,

I will search in the help file ..... Just the thing I think it strange is the WinNT:// into the code, when you know that my computer turn with Windows XP ....

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...