Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
Sorta new to batch files. What I would like to do is create two user accounts on an XP system by running a batch or VBS. I found the "net user" command for creating the user name and password, but I need to be able to set the privileges (Admin, change password at logon) basically all the functions that are available through the "manage" function in my computer. Any help is greatly appreciated!

hawcrl,
net localgroup Administrator username/add
?Dont know about how to configure to change
pwd at next login.--
Holla.

I think you need to use vbscript to change the "user must change password at next logon" option.
Dont know whether this is applicable to all OSs.
ref: http://www.microsoft.com/technet/sc...
Set usr = GetObject("LDAP://CN=adegutis, OU=Mis, OU=Accounts, DC=domainname, DC=Com")
usr.Put "pwdLastSet", CLng(-1)
usr.SetInfoJust change the first line as follows:
CN = the account name
OU = you need one for each level OU
DC = should match your domain nameIn the second line, CLng(0) means user has to change pwd at next login.
CLng(-1) means user need not change pwd at next login.--
Holla.

Thank you for your efforts in getting me an answer, but I think im out of luck since I forgot to mention that the computers I need to do this for are not on a domain, and didnt have any luck with the VBS for changing the password at next logon

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |