Jump to content

Adding Users


Recommended Posts

Hi

I 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 reply

Thank you

Link to comment
Share on other sites


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

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

  • 2 weeks later...

You could use vbScripts to add users like this:

'****************************************************************

Option Explicit

' On Error Resume Next

Const UF_SCRIPT = &H1

Const UF_ACCOUNTDISABLE = &H2

Const UF_HOMEDIR_REQUIRED = &H8

Const UF_LOCKOUT = &H10

Const UF_PASSWD_NOTREQD = &H20

Const UF_PASSWD_CANT_CHANGE = &H40

Const UF_TEMP_DUPLICATE_ACCOUNT = &H100

Const UF_NORMAL_ACCOUNT = &H200

Const UF_INTERDOMAIN_TRUST_ACCOUNT = &H800

Const UF_WORKSTATION_TRUST_ACCOUNT = &H1000

Const UF_SERVER_TRUST_ACCOUNT = &H2000

Const UF_DONT_EXPIRE_PASSWD = &H10000

Const UF_MNS_LOGON_ACCOUNT = &H20000

Dim objComputer, objGroup, objUser, objWSHNetwork, ObjPwdExpires, strComputerName, strFullName, strPassword, strUserName

Set objWSHNetwork = WScript.CreateObject("WScript.Network")

strComputerName = objWSHNetwork.ComputerName

Set 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 strPassword

objUser.FullName = strFullName

objUser.Put "description", "Local User Account for Emergencies"

' WScript.Echo objUser.UserFlags

objUser.Put "UserFlags", objUser.UserFlags Or UF_PASSWD_CANT_CHANGE

objUser.Put "UserFlags", objUser.UserFlags Or UF_DONT_EXPIRE_PASSWD

objUser.SetInfo

'*** Add user to Administrators Group ***

objGroup.Add "WinNT://" & strComputerName & "/" & strUserName

objUser.SetInfo

' MsgBox "Completed adding user " & strUserName & ".", vbInformation, "Execution completed"

Link to comment
Share on other sites

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...