Hi

I have created a kix script and a batch file to add new users

usercreator.kix
code:
? "Creating users from file " + $list

If open(1, $list) = 0
$x = Readline(1)
While @error = 0
shell "usercreator.bat " + $x + " password fullname c:\temp\" + $year + " server"
$x = Readline(1)
Loop

Endif

$list is a plain text file containing a list of users to be created and is defined at the command line

As you can see i have staticly defined values for the users fullname and password.

Can anyone sujest a better way to define the users that need to be created, so that i can pass multiple values to usercreator.bat??

Also any sujestions on other ways i might improve this code, or do this better in anyway, are more than welcome

usercreator.bat
code:
@ECHO OFF

Echo Creating User Account %1
NET USER %1 %2 /add

Echo Adding setting profile settings
NET USER %1 /scriptpath:LOGIN.BAT /passwordchg:yes /passwordreq:yes

Echo Adding Fullname: %3
NET USER %1 /fullname:%3 /comment:Student

Echo Adding To Students Group
NET GROUP STUDENTS %1 /ADD

Echo Creating Home Folder
MD %4\%1

Echo Sharing Folder
RMTSHARE \\%5\%1$=%4\%1 /grant %1:f users:5 /remark:%3

Echo Setting Permissions for Administrators
RMTSHARE \\%5\%1$ /grant administrators:f

Echo Removing 'Everyone' permissions
RMTSHARE \\%5\%1$ /remove everyone

Echo Adding Homedrive to profile
NET USER %1 /homedir:\\%5\%1$

variables list
%1 = username
%2 = password
%3 = full name
%4 = path on the server to the home shares
%5 = server name

The stuff in this batch file comes from what JackLothian posted in this thread

[ 15 May 2002, 08:34: Message edited by: Redback ]