ShawnW Posted July 25, 2017 Share Posted July 25, 2017 I know there are threads out there for creating local accounts with similar steps and I've used them successfully in the past. When it failed now though I stripped it down to what I assume is the minimum without adding properties or passwords, but still fails and I cannot figure out why. $oSys = ObjGet("WinNT://" & @ComputerName) $oUser = $oSys.Create("user", "tester") $oUser.SetInfo It fails when autoit thinks SetInfo is a method of the object. ==> The requested action with this object has failed.: $oUser.SetInfo $oUser^ ERROR Anyway, I'm using windows 10. Any ideas are appreciated. Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted July 25, 2017 Moderators Share Posted July 25, 2017 You are not setting a password, nor (based on what you posted) are you running as Admin. This works just fine for me on Win10: #RequireAdmin $oSys = ObjGet("WinNT://" & @ComputerName & "") $oUser = $oSys.Create("user", "Jimmy") $oUser.SetPassword("Password1!") $oUser.SetInfo "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
ShawnW Posted July 25, 2017 Author Share Posted July 25, 2017 Ah thanks, scite wasn't running with admin apparently and I wasn't actually building the exe to test. I did have setpassword before but took it out when trying to find where they error was coming from. 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