L'egyptien Posted June 5, 2007 Share Posted June 5, 2007 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 !!!! Link to comment Share on other sites More sharing options...
PsaltyDS Posted June 5, 2007 Share Posted June 5, 2007 $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 Link to comment Share on other sites More sharing options...
L'egyptien Posted June 6, 2007 Author Share Posted June 6, 2007 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 Link to comment Share on other sites More sharing options...
PsaltyDS Posted June 6, 2007 Share Posted June 6, 2007 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 Link to comment Share on other sites More sharing options...
L'egyptien Posted June 6, 2007 Author Share Posted June 6, 2007 $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 .... Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now