Alt 1 - using a batchfile
@Echo Off
REM Set values
Set strUserName=johan
Set strPassword=P@ssw0rd
REM Create the user account in Windows 2000
net user %strUserName% /add %strPassword%
Alt 2: using vbscript, filesystem and adsi (supports more parameters
and better error-handling)
' Set values
strComputerName = "."
strUserName = "Johan"
strFullName = "Johan Arwidmark"
strDescription = "Windows Geek"
strPassword = "P@ssw0rd"
' Create the user account in Windows 2000 or XP
Set adsComputer = GetObject("WinNT://" & strComputerName &
",Computer")
Set adsUser = adsComputer.Create("user",strUserName)
adsUser.FullName = strFullName
adsUser.Description = strDescription
adsUser.SetPassword strPassword
adsUser.SetInfo
regards
Johan Arwidmark
Windows User Group - Nordic
http://www.wug-nordic.net