tommy_vercetti Posted January 4, 2006 Share Posted January 4, 2006 HiI have tried using the oobe.inf file method for adding users in Windows XP, but that method does not work on Windows 2003 Standard Server. Please tell me what Im doing worng or if anyone of you has been able to use this or get it to work, please do replyThank you Link to comment Share on other sites More sharing options...
tommy_vercetti Posted January 5, 2006 Author Share Posted January 5, 2006 Bump anyone Link to comment Share on other sites More sharing options...
Sonic Posted January 5, 2006 Share Posted January 5, 2006 Why not use standard "net user" command line ? Link to comment Share on other sites More sharing options...
tommy_vercetti Posted January 5, 2006 Author Share Posted January 5, 2006 Makes life easier, but no use will have to do that way only, could you pls tell the site owners to edit it in the Main Unattended page saying that it only works in XP and not 2003 and that you need to use the net user command, so as not to confuse some new guy who comes along....Thanks Link to comment Share on other sites More sharing options...
Sonic Posted January 5, 2006 Share Posted January 5, 2006 I don't understand all (i'm french sorry ...) but you want to have the gui part of xp in server 2003 ? WHY ?! anyone buy server2003 has a good skill in computer normally ^^++ps: I havn't any informations about custom gui part in nt 5.x ... Link to comment Share on other sites More sharing options...
tguy Posted January 18, 2006 Share Posted January 18, 2006 You could use vbScripts to add users like this:'****************************************************************Option Explicit' On Error Resume NextConst UF_SCRIPT = &H1Const UF_ACCOUNTDISABLE = &H2Const UF_HOMEDIR_REQUIRED = &H8Const UF_LOCKOUT = &H10Const UF_PASSWD_NOTREQD = &H20Const UF_PASSWD_CANT_CHANGE = &H40Const UF_TEMP_DUPLICATE_ACCOUNT = &H100Const UF_NORMAL_ACCOUNT = &H200Const UF_INTERDOMAIN_TRUST_ACCOUNT = &H800Const UF_WORKSTATION_TRUST_ACCOUNT = &H1000Const UF_SERVER_TRUST_ACCOUNT = &H2000Const UF_DONT_EXPIRE_PASSWD = &H10000Const UF_MNS_LOGON_ACCOUNT = &H20000Dim objComputer, objGroup, objUser, objWSHNetwork, ObjPwdExpires, strComputerName, strFullName, strPassword, strUserNameSet objWSHNetwork = WScript.CreateObject("WScript.Network")strComputerName = objWSHNetwork.ComputerNameSet objComputer = GetObject("WinNT://" & strComputerName)Set objGroup = GetObject("WinNT://" & strComputerName & "/Administrators")strUserName = "Emeruser"strFullName = "Emergency User"strPassword = "Password"Set objUser = objComputer.Create("User", strUserName)objUser.SetPassword strPasswordobjUser.FullName = strFullNameobjUser.Put "description", "Local User Account for Emergencies"' WScript.Echo objUser.UserFlagsobjUser.Put "UserFlags", objUser.UserFlags Or UF_PASSWD_CANT_CHANGEobjUser.Put "UserFlags", objUser.UserFlags Or UF_DONT_EXPIRE_PASSWDobjUser.SetInfo'*** Add user to Administrators Group ***objGroup.Add "WinNT://" & strComputerName & "/" & strUserNameobjUser.SetInfo' MsgBox "Completed adding user " & strUserName & ".", vbInformation, "Execution completed" 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