MK-2 Posted February 28, 2007 Posted February 28, 2007 I know this might be the wrong forum for it, if so, please move it as I am too stupid to know where this goes :oops: At the moment, to create single users I have a batch file. One for each yeargroup and one for staff that will: Add the user using net user commands Add that user to a group Make their home folder Change permissions on that folder Share that folder for easy admin access The thing is, every time there's a new user I have to open up a command prompt then run the batch file with the right parm's Is anybody able to do a VB GUI for me (I have no VB skills at all) that will ask for: Firstname Lastname Year (drop down box that will determine which batch file is run) and the parm's from that are then sent through to the relevant batch file? The other thing is the batch file does its job, but it doesn't tick the 'user must change password on next logon' box and also it sets their home area as a local profile whereas I need it set to map to h:\ instead. These are the only two things bugging me about our single user creation and any help would be very much appreciated. PS - If anyone can help with the GUI, please PM me so I can explain how our usernames and the batch file looks. Ta
djm968 Posted February 28, 2007 Posted February 28, 2007 I use DSADD and a csv file. This link provides a VBScript that will create users from an excel spreadsheet. http://computerperformance.co.uk/vbscript/vbscript_user_spreadsheet.htm
ChrisH Posted February 28, 2007 Posted February 28, 2007 You dont have to use VB for this. If your not familiar with anything to make a GUI from try AutoIT. Its fairly easy to make GUIs with that, then all you need to do is pass the parameters to your script.
MK-2 Posted March 1, 2007 Author Posted March 1, 2007 Thanks for the help guys. AutoIT seems just the job. The only other thing was the stuff that a batch file can't do. Ensuring that 'change password next logon' is set, and also making sure the profile is changed from local to remote h:\. Also physically moving the user from the 'users' container to the relevant container for their year. I've heard it's possible to do this using VBS or some other coding, as I'd like to tie it in with this GUI so it does everything at once.
djm968 Posted March 1, 2007 Posted March 1, 2007 I would use DSADD in the batch file to create the user it is much more flexible than net user and can do everything you need. You can also do this using DSMOD
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